1
vote
0answers
51 views

Edit text file contain unknown format

I have a text file when I open it with gedit warn me: and when I open with emacs: I have another file with this character and I want to remove this character from that file with a bash script.
0
votes
2answers
61 views

In Emacs on my Mac, how can `Compile Command` see PATH set in ~/.bashrc?

In Emacs v23.4.1 on my Mac OSX Mavericks, how can Meta-x compile see $PATH for bash as set in my ~/.bashrc? Right now, PATH=/usr/bin:/bin:/usr/sbin:/sbin whereas in a normal shell it is ...
0
votes
0answers
46 views

Take back Ctrl-/ from Debian console configuration

My Debian Testing console is stealing my Ctrl-/ and using it as Backspace; Ctrl-/ is the single key-press Undo in bash and emacs. After some research, it looks like the Ctrl-/ -> Backspace mapping ...
2
votes
2answers
99 views

How can I get the shell-script-mode in Emacs to intepret #PBS -S /bin/bash to be a bash shell code?

I am using Emacs on a LINUX system that uses Portable Batch System (PBS) for controlling the use of resources. The PBS scripts require "#PBS -S /bin/..." as the first line in the script to declare the ...
2
votes
1answer
79 views

How can I have my terminal emulator exit when Emacs does?

This can be considered a follow-up to: How to save shell history from emacs and use it in terminal? I'm trying to force bash to exit with the following in my .emacs file, but it doesn't work, even if ...
1
vote
1answer
43 views

Use emacs to edit in-memory text

Is it possible to somehow edit in-memory text in emacs? (I.e. without going via the file system.) I'm writing a script in which I need to edit the output of a command and then process the edited text ...
0
votes
0answers
80 views

bash bind ctrl+Mode_switch+f?

I've messed with xmodmap to get more shortcuts for Emacs. I have stuff like this in my ~/.Xmodmap: keycode 41 = f F U03C6 U03A6 The unicode ones are φ and Φ. In graphical Emacs, I can bind: φ ...
0
votes
1answer
59 views

Use a modern locale, but retain asciibetical sorting?

I bought a new laptop (an Ideapad Yoga), and put Linux Mint on it. Everything seems to be working well, but Mint's default LOCALE settings for my language choice (en-CA... not sure why CA when I'm in ...
1
vote
4answers
221 views

Emacs tramp mode - filename auto complete doesn't work

I am using tramp mode in Emacs to edit files over ssh. But the problem is that on remote shell I have aliased ls as "ls --color". Tramp uses ls for auto completion and it is unable to parse color ...
4
votes
1answer
447 views

Whats the meaning of “set -o emacs” command?

Whats the meaning, or what it does: set -o emacs ? I saw it somewhere, and I a emacs user, so It make me curious.
1
vote
1answer
175 views

Vim text messed up on remote server

I often work on remote servers. There is one server that seems to get "confused" about the number of available columns (my best guess), but only when working in Vim (not bash). Specifically, when I ...
2
votes
1answer
58 views

Why does sorting in Emacs produce a different output from sorting in bash?

Why does sorting in Emacs vs bash produce differing outputs? What can I do to get the same result in both? This is the output of diff two files, one sorted in Emacs with sort-lines, and the other in ...
1
vote
1answer
125 views

Make emacs autocomplete cpp files over binary files

My question is similar to this one, except for emacs instead of vim. The issue is that I have a cpp file that I want to open and when I type f[TAB] it autocompletes to foo the binary file foo instead ...
1
vote
0answers
56 views

How can I use the PROMPT_COMMAND feauture in emacs shell?

In my regular shell I have PROMPT_COMMAND set up to run a script which keeps track of certain information about all the commands I run from any host I connect to. This is very helpful. I often find ...
0
votes
3answers
105 views

Emacs and Shell in the same window?

Just wondering if there is any way to put emacs and shell in the same window. Like split the shell in to two parts, one for shell it self, the other one for emacs. Or is there any way to switch the ...
3
votes
1answer
345 views

How to open a file from bash command line in the already open Emacs instead of a new instance?

How to open a file from bash command line in the already open Emacs instead of a new instance? When I type $ emacs file.txt it opens a new Emacs instance, instead of opening the file in the ...
3
votes
1answer
348 views

How to specify for emacs tramp which remote shell to open?

Besides opening remote files, tramp can be used to run a remote shell. Unfortunately, there is a problem. On a local machine i have zsh and on remote server only bash is installed. Issuing M-x shell ...
0
votes
1answer
523 views

using emacs shell with gnu screen?

How can I use a bash shell in emacs (M-x shell) when I am trying to connect restart a GNU screen session (on a remote ssh connection)? When I try it, I get: avilella@remote-machine-002~$ bash ...
5
votes
3answers
719 views

How do I prevent emacs from loading `update_terminal_cwd` with autojump?

On MacOSX 10.7, Apple puts into /etc/bashrc a function: update_terminal_cwd that checks to see if Apple Terminal is running AND if we are not in emacs (snippet pasted below). Unfortunately, by ...
3
votes
1answer
1k views

How can I use Emacs in terminal mode and use Alt + ? shortcuts?

I want to use emacs in terminal mode, but in Ubuntu 11.10 the bash terminal already has many Alt started shortcuts, how can I handle with that ? Bye.
6
votes
1answer
200 views

Is there a way of using ctrl-r after typing part of command in bash?

In bash the Ctrl+r command is very useful, I type Ctrl+r whatever and it searchs my history for commands containing the word whatever. But if I type whatever and realize that I would like search that ...
2
votes
1answer
362 views

Messy output in zsh working in emacs M-x shell

I have changed my shell to oh-my-zsh, which is working great in iTerm. However when I open up my Emacs, M-x shell, I see it also changes to zsh, but the output from executing commands is messy: ➜ ...
0
votes
1answer
200 views

Which emacs shortcuts are useful in bash? [closed]

Other than Ctrl+{k, u, a, e}, what other emacs shortcuts are worth remembering and useful in the Terminal?
3
votes
1answer
997 views

Easy way to swap characters in command line with emacs key bindings?

If I'm in vi, and I see that I've transposed two characters, it is easily fixed by putting the cursor over the first and typing x followed by p in command mode. Is there a similar trick that works at ...
3
votes
1answer
325 views

Emacs Shell: Reset Command

In bash, I can clear the screen with the clear command and I can clear the whole "buffer" with the reset command. I'm looking to accomplish the reset in Emacs *shell* terminal. Is there a command / ...
3
votes
2answers
362 views

How to set the exit status for emacsclient

I have found myself using my main Emacs session (CocoaEmacs in OSX) to edit my bash command line. To do so I have my EDITOR set to emacsclient. Then I edit the line in Emacs and save and quit that ...
2
votes
2answers
546 views

How to source a bash script in emacs' eshell

I'm trying to use eshell inside emacs, so I don't have to switch between emacs and a terminal. When using bash, I have few bash scripts I usually source to export some env variables (in order to ...
1
vote
2answers
1k views

emacs, colors in term-mode

I use Emacs and I run bash with M-x term command. There is a problem: colors in the *terminal* buffer aren't the same as in Gnome Terminal, and they are worse (do you need a screen shot?). How can I ...
1
vote
2answers
198 views

How to bust out of bash terminal in Emacs

I may have gotten myself in a bind. I have 3 windows in emacs, 2 of which are buffers and one of which is a bash shell that I created using: M-x term Now I can't switch out of that window (C-x o) ...
2
votes
1answer
438 views

how to choose printer in emacs on Mac OSX

I am new to both emacs and also do not have much experience with bash. I have a few questions which are related? (1) Can I set up emacs such that I can choose the printer that I print to? I have ...
4
votes
2answers
624 views

How do I get bash to respect my physical directory structure? (And likewise for Emacs?)

If in bash, I do "set -P" then bash follows the "physical directory structure" when doing "pwd" and "cd .." etc, rather than the "logical one" that might be defined via symlinks. Unfortunately, bash ...
10
votes
4answers
6k views

How do I fix my prompt in emacs shell-mode?

I'm doing some programming on a colleague's machine. He has a version of emacs (23.1.1) I haven't used before. My problem is that when I go to shell-mode, my bash prompt looks like this: ...
1
vote
1answer
931 views

Emacs and /etc/profile on OS X

When I run a shell (M-x shell) in Emacs.app, the shell spawned doesn't read (or more specifically, source), /etc/profile during initialization (I have a lot of shell customizations located there). ...