Questions tagged [async]
60 questions
25
votes
4 answers
How can I run an async process in the background without popping up a buffer?
I have defined some functions to run async background process using async-shell-command in my .emacs, but everytime I run the commands a new window (not frame) is created and the process' buffer is shown there. How could I run the command without…

rlazo
- 983
- 8
- 13
14
votes
1 answer
Turning active M-! into M-& (a'ka emacs equiv to bash Ctrl-Z)
From time to time I happen to M-! some_command just to find that the command runs longer than I expected and keeps my emacs frozen for long seconds. So I glaze at my frozen emacs and kick myself for not using M-& some_command and promise myself to…

Mekk
- 1,017
- 7
- 14
13
votes
1 answer
Asynchronously wait for output from a comint process
First of all, a disclaimer. I have researched this many times, and I
am pretty sure that I have already found the answer one way or
another, but I just don't understand it.
My problem is the following:
I have a process running through comint
I want…

T. Verron
- 4,233
- 1
- 22
- 55
9
votes
4 answers
Async shell process buffer always clobbers window arrangement
I frequently launch external programs from emacs using M-!, such as Firefox or Evince, etc. Whenever I do, a buffer pops up full of results for the process, which clobbers whatever else I've got going on in terms of windows arrangement.
Is there a…

Steven Arntson
- 1,313
- 9
- 27
7
votes
1 answer
Run elisp when `async-shell-command` is done
I want to run some Elisp when my command executed by async-shell-command terminates.
How can I do this? Does it have completion hooks?

Matthew Piziak
- 5,958
- 3
- 29
- 77
6
votes
0 answers
How can I wrap org-preview-latex-fragment to be async?
Calling org-preview-latex-fragment blocks user input for a second or two depending on the size of your fragment, and with universal args, converting all fragments in buffer can take minutes. It would be nice to have this be async, so I could…

sooheon
- 481
- 2
- 8
6
votes
1 answer
Regenerate ctags TAGS file without freezing Emacs for a while?
When I'm currently in a large project and I call the command
projectile-regenate-tags, the project will be scanned by ctags and the tags will be stored in the TAGS file.
While all this action is progressing, Emacs will be unreachable until the tags…

ReneFroger
- 3,855
- 22
- 63
6
votes
2 answers
Silent/Asynchronous gnus-demon?
Is it possible for gnus-demon to be asynchronous and silent?
I have this:
(gnus-demon-add-handler 'gnus-demon-scan-news 5 nil)
And every 5 minutes, emacs gets stuck fetching new stuff. Which is annoying.
If gnus-demon itself can't do that (and…

Florian Margaine
- 283
- 2
- 7
5
votes
1 answer
Almost working smoothly attempt to get terminal Emacs to copy to clipboard
I'm running this emacs
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu) of 2017-09-22, modified by Debian
directly in a Gnome terminal by calling emacs, which is actually a link to /etc/alternatives/emacs. This is on an Ubuntu 18.04 Linux.
Emacs copy…

Craig Hicks
- 304
- 2
- 9
5
votes
1 answer
Asynchronous version of shell-command-on-region?
I have a problem which is very similar to this one. I have some text that I'd like to listen to with macOS's say utility. Unfortunately, Emacs locks up when I use shell-command-on-region because it is not asynchronous. In other words, Emacs waits…

GDP2
- 1,340
- 9
- 25
5
votes
0 answers
Is there some way to continue reading from a STDIN file descriptor when data is PIPED to Emacs on Command-line?
Historical Perspective
On Unix like operating systems, it is common practice to redirect IO between shell commands using pipes.
For example, the command below would insert all the lines that didn't match "10.1.2.3" into the *scratch* buffer in…

Melioratus
- 4,504
- 1
- 25
- 43
4
votes
2 answers
async-shell-command: run COMMAND without displaying the output
I want to use async-shell-command to run a .bat file on Windows.
Reading the function documentation it says:
(defun async-shell-command (command &optional output-buffer error-buffer)
"Execute string COMMAND asynchronously in background.
...
To run…

nephewtom
- 2,219
- 17
- 29
4
votes
1 answer
disable async new buffer question
When I give a new async command with an interactively called async-shell-command, it gives a message "A command is running in the default buffer. Use a new buffer? (y or n)". I think this behaviour is unnecessary, every time I'm giving a new…

mangelmentmanager
- 55
- 4
4
votes
1 answer
How does one create back and forth communication to a process
I am writing an emacs mode that interfaces with a shell process. The shell process is expensive to start which means that I would like to do it once and then send commands to it from emacs as need be. How is it possible to do this asyncronous two…

Jules
- 1,275
- 7
- 12
4
votes
2 answers
avoid emacs to lock down or crash when used for many tasks
I consider to start using emacs for IRC, SQL, Shell and maybe twitter and Feed reading. But than I wonder how power users of emacs deal with emacs being single threaded.
So if I have one long-running task, like updating melpa packages, I can not…

Thomas Koch
- 173
- 2