Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.)

0
votes
0answers
42 views

How can I make multiple calls to external binaries?

I want to write an interactive function to Call an external binary Write the output of the binary into a buffer Process the buffer to extracts args for next call Call another external binary using ...
3
votes
1answer
44 views

Send content of region or current line to a tmp file, then execute shell script with filename as argument

I am transitioning to Emacs with evil-mode after years of Vim. For work reasons I have to use a GUI statistics program (Stata) frequently. This program does not integrate well with external editors. ...
1
vote
1answer
880 views

Windows 10 + Emacs shell--can't run processes from eshell; unwanted cmd windows open

I've been upgraded at work to a Windows 10 machine, from Windows 7. Apparently, this has caused problems. First, eshell doesn't seem to be able to launch windows processes anymore. I get "Spawning ...
2
votes
2answers
252 views

Kill inferior python in python.el mode

At the moment I am killing the Python interpreter with C-d each time I want to quit Python interpreter. What is the name of the function to kill the Python interpreter in Python mode (the one which ...
0
votes
1answer
24 views

Replacement for the sit-for function

Using currently the sit-for function, every time i hit any key and cause user input the sit-for will stop. Is there any possibility to have something like sit-for, while being able to move the cursor ...
0
votes
1answer
207 views

Reuse tramp connection details to start putty session

I often connect to remote servers using tramp to do some work, however sometimes after editing files I need to connect using PuTTY in order to do some specific task. At the moment I open up PuTTY, ...
1
vote
1answer
31 views

How to create shortcut that will kill process for buffer with fixed name

I have code like this to run R command from Emacs: (defun call-r-command (command-list) "run R command in shell buffer window if there is displayed buffer that have shell it will use that window"...
12
votes
5answers
3k views

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 ...
0
votes
0answers
37 views

Check for active ERC process in Elisp and join channel

I try to join an IRC channel with ERC in my elisp script. If there is no active ERC process running I want to create one. So far I got this: (progn (if (not (and (fboundp 'erc-buffer-list) ...
0
votes
0answers
15 views

Emacs prompt a inexistent pid when initiate [duplicate]

Every time I launch emacs, it prompts that: desktop file appears to be in use by PID ***,Use it may cause a conflicts. Actually, I only run a single one emacs me@host:~$ ps -aux | grep 'emacs' ...
4
votes
1answer
56 views

How to partially block user input while Emacs subprocess is running

I have a custom function that updates the etags file before prompting the user to input a desired tag to be located. Although I am pretty good about setting the current buffer to read-only before ...
1
vote
1answer
46 views

Launch ncurses application and cleanup once it exits

I'd like to occasionally use hg split and hg commit --interactive from Emacs, but those commands bring up a GUI. At the moment I either use a separate terminal or ansi-term for those, but would like ...
0
votes
0answers
38 views

How to kill a running process in compilation buffer in MS Windows?

I have tried using M-x kill-compilation and it doesn't kill the process (on Microsoft Windows). It just sends ^C, which makes my script to retry. When I try to M-x kill-buffer on the compilation ...
0
votes
0answers
28 views

Emacs report a process which does not exist

When start Emacs from the terminal as me@mbp: ~$ emacs --deamon It prompts that However, there does not exist such a pocesses me@mbp~$ ps 8559 PID TTY STAT TIME COMMAND me@mbp:~$ ps -el ...
1
vote
1answer
43 views

Open another emacs and cause conflicts

I have a GUI emacs running as the major working area, When I reading articles from web, need to open a emacs as a tool to keep note; Web on the left and new emacs on the right, Usually, get ...
0
votes
0answers
45 views

Unknown *emacs* process

I recently realized that every time I lunch emacs, after a minute, a strange buffer appear in buffers list that is linked to an emacs process, infact it also appear in system's process list: When I ...
1
vote
0answers
34 views

How to make process in compilation-mode think it's not running in interactive terminal?

I use minitest-mode which starts Ruby tests in compilation-mode: (compilation-start actual-command 'minitest-compilation-mode (lambda (arg) (minitest-buffer-name (or file-name "")))) Tests invoke ...
17
votes
2answers
2k views

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 (...
0
votes
1answer
22 views

External process hangs

I have written a simple Python 3 script: #!/usr/bin/env python3 print('Hello world!') The script works from the shell: $ ./hello-world Hello world! Then, I have written some Lisp to run the ...
1
vote
1answer
82 views

Why does :command argument of make-process not work when string passed as a variable? [duplicate]

This works fine: (make-process :name "my-proc2" :buffer " *my-proc2*" :command '("sh" "-c" "echo \"hi\"\nsleep 10\necho \"there\"") :connection-type 'pipe :...
5
votes
2answers
410 views

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 ...
0
votes
1answer
47 views

Inconsistent point in an elisp program and in a visible non-focused process buffer

I am able to collect output data from a process, but I don't understand the coordination of point and process-mark. In particular, the visible cursor in a non-selected window visiting the buffer does ...
0
votes
1answer
52 views

Asynchrony when collecting output in a process buffer?

I want to capture output from a process buffer. This is not a duplicate of How do I reliably get output from a process? because that questioner is presupposing comint and an architecture for a ...
0
votes
2answers
115 views

shell command on region with process substitution

If I want to execute a shell command on a region I know I can use shell-command-on-region via M-|, what if the command I want to redirect my selection does not accept redirection to it's standard ...
0
votes
1answer
120 views

ansi colors for bash process

I'm trying to get ansi colors from my bash process, but I can't get this to work. (setq shell-process-name "shell-process-name") (setq shell-process-buffer "*shell-process-buffer*") (defun open-...
0
votes
1answer
29 views

How Can I Prevent make-process from failing if the default-directory doesn't exist?

Usually, when you open a file, Emacs prompts you to run M-x make-directory RET RET if the directory doesn't exist. However, after writing my own advice, I realized that opening files in directories ...
1
vote
2answers
64 views

Introspect whether a process created with `start_process` is still running and when it exits

I'm using start-process to run a process upon certain events picked up with hooks (start-process "foo" "*Foo*" foo-command foo-args) I would like to do 2 things with this. Prevent the process from ...
2
votes
2answers
184 views

Run a process synchronously and obtain stdout and stderr in different buffers?

I'm using emacs version 25.1.1. I would like to run a process synchronously and have its stdout and stderr end up in two different buffers. I know I can use make-process to separate stdout and stderr ...
2
votes
1answer
326 views

Differences between cmdproxy.exe and cmd.exe

What is the difference between: (call-process "cmdproxy" nil "foo" nil "/c" "dir") (call-process "cmd" nil "foo" nil "/c" "dir") ? I seem to get exactly the same results in Emacs 25.1 on ...
5
votes
2answers
212 views

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 ...
2
votes
1answer
47 views

What's the idiomatic way of writing an Emacs front-end to a command which supports streaming input and output like Telnet?

I would like to write an Emacs front-end to a server which supports Telnet connections, and I was wondering if there is an idiomatic way of doing this. Specifically, the program will work like this: ...
2
votes
2answers
226 views

Make shell-command / async-shell-command respect carriage return?

Say I have a simple perl program: for my $i (0..10) { print "$i\r" } print "\n" Now if I run the program through shell-command, instead of getting a single line with 10, I will see the ...
3
votes
1answer
68 views

Show top of *Async Shell Command* buffer

Is there a way to get to the top of a buffer that is not necessarily active? What I want to do is run a shell command on the word at point and then show the top of the output in the *Async Shell ...
2
votes
1answer
520 views

Error in process filter

I am trying to play with the make-process function and get information from it. I am getting some errors in my process filter that I am having trouble understanding. When I run my ceedling-version ...
2
votes
0answers
226 views

How to get process name (or process) from PID in lisp?

I would like to check if my shell is running ssh or not by checking the process name. I tried to get the process name by: (let* ((proc (get-process "shell")) (proc-child-id (process-running-child-p ...
0
votes
2answers
208 views

How can I start a server in the background from a source code block without freezing emacs?

I am creating several org-mode documents to track code example and would like to be able to view the results of tangling or executing these code blocks in a browser. In the example below, I've created ...
6
votes
1answer
253 views

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 ...
0
votes
1answer
36 views

Can I merge the buffers opened in one emacs process into the other emacs process?

In bash in a terminal emulator, I run two independent emacs processes. I created them in bash by emacs -nw and in each, I opened several buffers. I switch between them by making one process into ...
5
votes
1answer
130 views

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 ...
3
votes
0answers
452 views

Run interactive shell script in new buffer using elisp

I am looking for a way to display and interact with long running shell scripts in a separate buffer. While using eshell works, I'd like to automate most shell tasks using elisp. The best way I came ...
0
votes
0answers
47 views

Running a single Emacs instance

I'd like to set in my dot-emacs a function to detect if an Emacs instance is already running, possibly exiting Emacs informing user. To do this I should query the OS for running processes. However (...
3
votes
0answers
153 views

Shell coding system

If, before M-x shell, I run C-x RET c (universal-coding-system-argument) I can change the coding system used by the shell. Therefore, given echo Straße > foo foo will be encoded in the related ...
2
votes
1answer
166 views

Interpolate environment variables in string

I am trying to write a function that will interpolate the enviroment variables stored in process-environment in a string. For example, if I have the string "This is $Foo and ${Bar}_none and '$skip'" ...
23
votes
3answers
3k views

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 ...
5
votes
1answer
88 views

How to attach/connect two subprocesses?

The general case: Simply put, given that I start two processes (Aand B) with, e.g., async-start-process, what is best way of killing B if A terminates? My specific usecase: I'm debugging embedded ...
0
votes
1answer
57 views

Is it possible to safely eject flash drive from Emacs

Windows 10, Emacs 25.1. If I want to safe eject usb flash drive I use this (on system tray) Is it possible to do this in Emacs?
0
votes
1answer
66 views

file-notify-add-watch : get file path string

I would to do a specific action (create an org-mod link) when a new file appears in a given directory. For that I need to catch the event but also the path of the new file. I managed to use file-...
4
votes
2answers
386 views

Pass an argument to a sentinel

From the Elisp manual at the Sentinels chapter: The sentinel receives two arguments: the process for which the event occurred, and a string describing the type of event. But I need it to receive ...
0
votes
1answer
95 views

redirect stderr to a file in call-process-region

I have been reading the documentation for call-process-region here and I am trying to redirect stderr to a file. from the the documentation, this looks correct (call-process-region beg end perltidy-...
1
vote
0answers
25 views

ANSI coloring in emacs start-process output buffer [duplicate]

I am running a process from within emacs which uses ANSI color codes in its output. I'm using start-process to create the process, and provided a custom buffer name for the process's output (start-...