Questions tagged [shell-command]
is for executing shell commands from Emacs (the default key binding is `M-!`). Shell output is shown in the echo area if it fits, in buffer `*Shell Command Output*` otherwise. Emacs comes with many supporting facilities for executing shell commands, including interactive execution, selective execution on a region, history cycling, directory tracking, connecting to serial ports, emulator options, and specifying remote hosts.
110
questions
13
votes
3answers
3k views
Persistent shell-command history
When I run shell-command in a new session I do not have access to the history of commands from the last session. How can I have that?
1
vote
2answers
864 views
Run (async-)shell-command in view-mode
How do I run (async-)shell-command (but no other shell-mode buffers) in view-mode?
1
vote
1answer
135 views
How to use Emacs to open an eshell from Terminal at a specific path
By default, if I invoke emacs from terminal by typing $ emacs C:\users a directory-like environment opens. Then if I do M-x eshell, an eshell environment opens at this path.
My question is how to ...
2
votes
1answer
349 views
call-process and Hunspell (in Emacs 24.4)
I am having problems running ezwinports Hunspell 1.3.2-3 in Emacs 24.4.1 for Windows.
When calling ispell-buffer with debug, I see the following functions are called.
ispell-buffer -> ispell-...
4
votes
1answer
1k views
Can't run Python shell in Emacs 24.4 due to a space in the path
When I try to start a Python shell in Emacs 24.4.1 running on Windows, I get an error "invalid argument" when Emacs tries to spawn the process. This is occurring because Python is installed under c:\...
13
votes
1answer
4k views
Execute external script upon save when in a certain mode?
When I'm in org-mode, I want Emacs to execute a bash script I wrote whenever I hit C-x s to save. The script automatically syncs the file I am saving to my Raspberry Pi. It expects the file name as ...
0
votes
1answer
220 views
Pulseaudio and `shell-command` calls in Emacs
I'm trying to execute shell-commands in emacs which play sounds or otherwise involve audio output, but I'm not having much luck.
When I execute:
(shell-command
(concat "espeak -v mb-en1 -k5 -s150 " ...
7
votes
1answer
574 views
How can I add default shell commands for various file types?
When I use ! on a *.tar.bz2 file in Dired, I'm presented with the following prompt:
! on WANem_3.0_Beta2.tar.bz2: {3 guesses} [bunzip2 -c * | tar xvf -] -!-
How can I add similar functionality for ...
14
votes
2answers
27k views
“cannot set terminal process group” error when running bash script
I have the following two lines of code in my init.el file:
(setq shell-file-name "bash")
(setq shell-command-switch "-ic")
I tried executing the following script to get a list of executables using ...
9
votes
2answers
1k views
Run ssh-add from Emacs and enter a passphrase
I want to call the ssh-add shell command.
So I invoke M-x shell-command RET, and
in the minibuffer, I type: ssh-add .ssh/id_rsa
The only thing I get is:
ssh_askpass: exec(/usr/bin/ssh-askpass): No ...