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.

Filter by
Sorted by
Tagged with
13
votes
1answer
3k 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
213 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
549 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
25k 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
994 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 ...

1 2
3