Questions tagged [process]

A process is a running instance of a program. Use this tag for how Emacs interacts with programs that it runs (compilers, viewers, network backends, etc.)

141 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
23
votes
5 answers

Does emacs have a process viewer (resource manager) or equivalent?

Occasionally emacs will hit 100% cpu usage. Obviously when this occurs there is an issue with a runaway process. Just wondering if there is a way to view all running processes in emacs? Kind of like unix htop, the interactive system process…
orion
  • 805
  • 8
  • 16
19
votes
5 answers

Kill process buffer without confirmation?

I have C-x C-k bound to kill-this-buffer. But when I enter into a buffer which is running a process like Python or MySQL, if I do C-x C-k it asks Buffer "*Python*" has a running process; kill it (y or n)? How can I kill process buffers without…
Chillar Anand
  • 4,042
  • 1
  • 23
  • 52
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
12
votes
3 answers

Possible to "detach" a child process?

I use browse-url/browse-url-firefox to open links in Firefox from within Emacs 24.5.1 under Linux (Fedora 23) which in essence executes the firefox executable with the URL by start-process. If there is already a Firefox instance running, this will…
Tim Landscheidt
  • 467
  • 3
  • 8
10
votes
3 answers

Send process output to *Messages* buffer, but bypass the echo area

Is it possible to send the output from a process-filter to the *Messages* buffer and suppress that message output from appearing in the echo area, such that I am able to simultaneously use interactive commands without having the minibuffer-prompt…
lawlist
  • 18,826
  • 5
  • 37
  • 118
10
votes
4 answers

How to make shell-command run using shell profile and current directory hooks (ex. direnv)

I am trying to get shell-command and async-shell-command to integrate seamlessly with a couple of programs in my .bashrc file, specifically direnv in this example. I found that if I customized shell-command-switch, I could get shell processes to…
waymondo
  • 1,384
  • 11
  • 16
9
votes
1 answer

Process input seems buggy in Emacs on OS X

I have a process that I'm trying to send input to on OS X. I'm using Emacs' builtin functions for doing this: process-send-string and process-send-region. However, it seems that there are issues when doing this on OS X. Specifically, it seems that I…
GDP2
  • 1,340
  • 9
  • 25
9
votes
3 answers

Persistent environment for M-x compile

When I run M-x compile it spawns a new subshell to execute my compile command. As soon as the compile command returns, the shell process is killed. I can see why this would be desirable in most cases, but I am currently in a situation where it is…
nispio
  • 8,175
  • 2
  • 35
  • 73
8
votes
3 answers

Set environment variables for spawned subprocesses

I would like to set the environment variables for a spawned subprocess only. They are controlled by process-environment. The documentation says: binding that variable with let is also reasonable practice. In this example I try to unset HOME…
antonio
  • 1,762
  • 12
  • 24
8
votes
2 answers

Exiting emacs without confirmation to kill running processes

It turned out not to be the same problem as Kill process buffer without confirmation?: emacs asks for different kind of confirmations when exiting and when just killing a buffer. How to specify for all or specific processes (e.g. one launched with…
user905686
  • 327
  • 2
  • 11
8
votes
2 answers

Print process output line by line

Read process output line by line gives some partial ideas about how to deal with sub-process output in an intelligent manner, but no example and no working solution. I have a couple of examples, one of them works (badly) and the other doesn't. To…
Joe Corneli
  • 1,786
  • 1
  • 14
  • 27
8
votes
2 answers

Applying a timeout on call-process/shell-command?

In some cases, when delegating work to an external process, it's useful to set a timeout on the command to prevent Emacs from hanging indefinitely. Unfortunately, the following does not work. (with-timeout (1 nil) (call-process "/usr/bin/bash" nil…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
7
votes
1 answer

How to run a process without Emacs freezing?

When editing TeX files, programming, upgrading packages, etc. we often need to perform tasks - such as compiling code or downloading files from internet - that take a long time to achieve. We can do all of them in Emacs, however executing such…
Spirine
  • 153
  • 1
  • 8
6
votes
2 answers

how to set environment variables={EDITOR, VISUAL} to prefer running emacs?

my usecase I'm currently running GNU Emacs version=24.3.1 graphically (i.e., under GNOME/X though started from a script invoked from a gnome-terminal running bash) on a Debian Linux. Just now I was using commandline abcde to rip audio CDs when its…
TomRoche
  • 592
  • 3
  • 20
1
2 3
9 10