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

Filter by
Sorted by
Tagged with
0 votes
1 answer
59 views

Push to GitHub via Magit retrieves error: "error in process sentinel: Symbol’s function definition is void: compat-assoc" but works. How to fix it?

I am using Magit in my Emacs. This is my config file. I have been using this package for a long time without issues. Recently, some weird error messages started to appear. After pressing to push a ...
Pedro Delfino's user avatar
0 votes
0 answers
28 views

Opam switch not working: "error Buffer *OCaml* has no process"

I am on macOS 13.4, I set up my Ocaml environment with emacs but I'm still new at it so I got trouble solving some of my problems: For the project I am working on I had to clone my working repository ...
Tariot's user avatar
  • 23
0 votes
1 answer
117 views

Emacs is not running processes as arm process on m1 mac, rather it seems to x86 emulation? Can I make everything native?

My emacs seems to be spawning processes using x86 emuation, which then breaks certain python packages since binary modules that I install outside of emacs are for x86. A workaround I found was to ...
Att Righ's user avatar
  • 745
0 votes
1 answer
79 views

How to stop a process gracefully before killing its buffer?

I want to make a function that stops the ESS inferior process (e.g. an R or Julia shell), kills its buffer and deletes its window. ess-inf.el provides the function ess-quit to exit the inferior ...
Arch Stanton's user avatar
  • 1,575
0 votes
0 answers
13 views

compilation-mode re-run error check regexp

I have a buffer running webpack that I started with start-process. I use compilation-mode with a custom compilation-error-regexp-alist. When I first execute webpack things work as expected. However, ...
slaughter98's user avatar
0 votes
0 answers
23 views

Send stdin to a deferred process?

I want to start a deferred process with: deferred:process and send text to to it. I can't work out how to do this looking at the source code. Is this possible? For context this came up when using ...
Att Righ's user avatar
  • 745
1 vote
0 answers
35 views

Insert output of slow external process in current buffer, character-by-character

Imagine in the current buffer I have the text: Hello Bye I want to call an external program and add the output of it at the end of the buffer. The tricky thing is that the external program provides ...
scaramouche's user avatar
  • 1,772
1 vote
0 answers
62 views

How can I execute synchronously a xdotool process in an Elisp function?

I want to perform a repetitive task using Emacs and another program (which, unfortunately, runs under X). I have then set up an elisp function and a xdotool script to do the two parts of the work. The ...
Alessandro Bertulli's user avatar
1 vote
0 answers
16 views

Transfer focus to started asynchronous process

I have the opposite issue from How to avoid losing focus after starting an asynchronous process?. I would like to call start-process and have the resulting window be focused. Specifically, I am ...
xeruf's user avatar
  • 334
0 votes
0 answers
56 views

do-applescript: AppleEvent timed out

Execute this in emacs: (do-applescript "open location \"marginnote3app://note/AEB009E4-0DFB-4B2D-A47D-293018C36116\"") do-applescript: AppleEvent timed out. However, osascript -e ...
Tokubara's user avatar
  • 197
0 votes
1 answer
77 views

Why does ispell generates a process?

After fixing ispell to work on a new machine running macOS (see previous question), I was surprised to see it listed as one of my processes, see the image: As text: Process. PID. Status. Buffer. ...
Pedro Delfino's user avatar
1 vote
2 answers
89 views

Hide ^M in process output buffers?

I have stack traces that are coming either from a process or remote server that have ^M at the end of the lines. I can disable read only mode and remove trailing white space, but it would be nice if I ...
Todd's user avatar
  • 211
6 votes
1 answer
2k views

elpy error in process sentinel

I've gone a long way to get emacs set up at my company. At home I'm using Emacs for many years on Linux. However, at work on Windows I'm struggling a bit getting it functioning smoothly. When use ...
swissy's user avatar
  • 77
1 vote
1 answer
198 views

Why does `eshell` not create an active process In Emacs while `shell` and `term` do?

In Emacs, the features shell, term, and eshell are different commands used for similar goals. When executed, shell and term create active processes in Emacs. I expected the same for eshell. However, ...
Pedro Delfino's user avatar
1 vote
2 answers
256 views

How to check if a process outputs to the stderr or not?

Currently I'm using make-process and it's stderr argument which is a buffer. After the process has exited I'd like to check if the buffer-length is zero (no error output). This doesn't work as I get ...
ideasman42's user avatar
  • 8,546
1 vote
1 answer
37 views

Convenient utilities for spawning simultaneous processes with elisp and gathering the results?

Are there existing utility functions / libraries that are similar to Python's multiprocessing module? For example: Launch many processes, return when they are all complete (or return an object which ...
ideasman42's user avatar
  • 8,546
0 votes
1 answer
48 views

Start external process and communicate with it as soon as send messages

I use gnus configured to read mails from the davmail IMAP server. This one is used to read mails from outlook and translate them according to the IMAP protocol. When I start gnus, I configured emacs ...
deb2014's user avatar
  • 83
0 votes
1 answer
318 views

Automatically change encoding of process buffers

Platform Windows 10 with GNU Emacs 26.1 (build 1, x86_64-w64-mingw32). Goal To set the encoding of process buffers to UTF-8. I would like to set the input and output encoding of process buffers, like ...
henning's user avatar
  • 92
0 votes
0 answers
61 views

start-process permissions in Windows

I can open an HTML file using shell command: M-! start file.html, but when I try to write an elisp function which includes the line (some of these arguments are actually variables but I've written out ...
hatmatrix's user avatar
  • 1,056
1 vote
1 answer
154 views

Can't send/receive OSC messages to/from other processes

I made my first attempt at OSC with (Doom) Emacs. I got the example in osc.el working, but I couldn't make it either send or receive messages to/from other processes, even if they are running in ...
loopier's user avatar
  • 21
0 votes
2 answers
53 views

Looking for a better way to test whether the current Emacs process is running under GNU Screen

NB: For the sake of this question, please assume that the underlying OS is some flavor of Unix. If more specificity is required, then please assume that it is either Darwin or some flavor of Linux. ...
kjo's user avatar
  • 3,207
0 votes
1 answer
967 views

Get process id (pid) for running python (jupyter-kernel)

I've started a jupyter kernel form emacs-jupyter. I'd like to get the process id for the python process associated with the buffer so that I can attach a debugger to it. How can I do this in elisp?
James Pritts's user avatar
1 vote
0 answers
43 views

Why are eight-bit single-byte characters counted as multibyte with (byte-to-position)?

I was investigating a problem with how an Emacs process (monroe.el) decodes messages formatted in bencode, where the process would not skip over the correct number of characters in the message, ...
nonbirithm's user avatar
1 vote
1 answer
299 views

Cannot use `pbpaste` in Emacs to paste Chinese characters

I'm using macOS. I tried using the following command to paste from clipboard in Emacs(started with emacs -Q) (call-process "/usr/bin/pbpaste" nil t nil) It works fine for English characters,...
Searene's user avatar
  • 489
1 vote
1 answer
175 views

How to use Emacs to prevent screen lock from activating (Windows)

My employer has a pretty paranoid screen locking policy on Windows machines. There's no way to override the time settings for the lock. My colleagues an I have been experimenting with various homebrew ...
Wojciech Gac's user avatar
0 votes
1 answer
348 views

How to start a process with multiple arguments?

Instead running sudo su joe -s prime-run firefox in the shell I'd rather bind it to a key. Yet, nothing happens on pressing M-n (while M-i works). What am I doing wrong? (setq exwm-input-global-keys ...
jjk's user avatar
  • 721
0 votes
2 answers
434 views

How can I re-enable `C-z` in evil mode (to pause Emacs)?

I have been using Emacs for a while and recently started using evil mode. I exclusively use emacs-nox (command line emacs). The only thing that's missing for me is C-z to pause emacs and bring me back ...
marc.soda's user avatar
  • 123
0 votes
0 answers
115 views

Finitizing infinite comint output

Context I'm a teacher and I often want to show “bad” programs; in this case infinite outputting programs. But while I want to show the bad I dont want my laptop crashing in class (nowadays on zoom) ...
Rusi's user avatar
  • 329
2 votes
0 answers
133 views

Process sentinels don't run during init in GUI Emacs

Ok, this issue I'm running into seems pretty weird. I'm running an async process during init and I have set a process sentinel to tell me when it exits. This works fine in terminal Emacs but in GUI ...
PythonNut's user avatar
  • 10.3k
1 vote
1 answer
138 views

Start Process Not Working: Process List Claims Process Started but Process UI not shown

Start Process is not working when starting GUI application in WSL on Windows 10 Pro. I am calling Start Process as follows. (start-process "yekneb-exec-2" nil "/mnt/c/WINDOWS/explorer....
Benilda Key's user avatar
1 vote
0 answers
110 views

Why does calling `term-send-backspace` (just pressing backspace) create a newline in the `*terminal*` buffer in `term-mode`?

Specs: i@debord:~$ emacs --version GNU Emacs 26.3.50 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the ...
John DeBord's user avatar
2 votes
1 answer
331 views

Process shell exited abnormally with code 53 on windows 10

I'm using emacs 26.2 installed through msys2. Recently starting subprocesses from emacs has stopped working for me. Specifically M-x shell and shell-command-to-string. I get the feeling this is due to ...
Joel Nises's user avatar
0 votes
0 answers
41 views

Is it possible to control DTR and/or RTS for a serial process (serial-term)?

I create a serial port process with (serial-term), or the underlying (make-serial-process ...). Is it possible to control the DTR and/or RTS pins for the port from within Emacs? Looking at the source ...
payne's user avatar
  • 101
0 votes
0 answers
98 views

Can emacs control other programs windows?

I am using start-process to start other programs as part of my workflow. For example starting a browser to display the HTML file I am working on, or Visual Studio to debug the EXE I just compiled. ...
ppbitb's user avatar
  • 101
1 vote
0 answers
288 views

Elpy: how to stop the underlying RPC process?

Whenever elpy-mode is activated upon visiting a python file, I see a py.exe executable start, with a subtree of processes. This should be the remote procedure call (thanks @al0 for the explanation). ...
pglpm's user avatar
  • 289
2 votes
1 answer
352 views

How to pipe data through multiple processes?

Currently I'm generating text from a command, eg: (with-temp-buffer (call-process "my-command" nil t nil "my" "args") ;; operate on output in current buffer. ) How can I use pipes, something ...
ideasman42's user avatar
  • 8,546
2 votes
1 answer
792 views

Get process id for the Emacs own process

I'm supporting some elisp code that creates a temporary filename using a prefix and the user id. When I develop this, that is not enough since I will be running multiple instances concurrently. So I'...
thoni56's user avatar
  • 125
1 vote
0 answers
102 views

Send a command to Emacs from an inferior process

Is it possible to send a command to Emacs from an inferior process? For my particular use-case, I would like to instruct Emacs to run the command inferior-ess-r-reload-hook (part of the ESS package) ...
dpritch's user avatar
  • 435
0 votes
1 answer
108 views

Clojure nrepl: 'cider-jack-in returns error: "Spawning child process: Invalid argument"

Running GNUEmacs 26.3 on Windows 10, trying to set up environment per instructions for 'Clojure for the Brave and True' from here: https://github.com/flyingmachine/emacs-for-clojure/ I was able to ...
mpettis's user avatar
  • 101
0 votes
1 answer
393 views

how can I change the inferior Python process

I would like to be able to start Python 3 and ipython from Emacs in an inferior mode buffer. Currently start interpreter C-c C-p starts 2.7. I know there must be a way to change to start another ...
Stephen's user avatar
  • 101
2 votes
1 answer
202 views

How can I query Emacs from a separate process?

I'm interested in tracking how I spend my time at work. I have been using ManicTime, and it does much of what I want. However, I use Emacs as my primary editor, and ManicTime doesn't know how to get ...
mojo's user avatar
  • 125
2 votes
1 answer
80 views

Troubleshooting a hanging `list-processes`

Normally I'd use M-x list-processes to see what Emacs is running in the background. But in this case list-processes itself hangs. What is the right thing to do in this situation?
Matthew Piziak's user avatar
0 votes
1 answer
82 views

Is variable assignment an atomic operation in elisp?

I have a situation in a mode I'm writing that saves a portion of the output of a long-running asynchronous process to a variable at intermittent intervals. I need to access this data periodically. My ...
AndrewE's user avatar
  • 70
1 vote
1 answer
59 views

Lexical binding in a process filter

The code constantly prints server-process: nil instead of the server process name: -*- lexical-binding: t; -*- (let* ((port 1234) (server-process 'something)) (setq server-process (...
Damien Cassou's user avatar
0 votes
1 answer
162 views

“call-process” hangs and does not launch the program

I’m dipping my toes into reading news with Gnus. I’d like to continue using the same editor as before for composing posts, so I put these forms in my gnus.el: (setq message-tab-body-function 'edit-in-...
bdesham's user avatar
  • 111
1 vote
1 answer
77 views

How can I tell when non-interactive bash process is done executing a command?

I'm trying to write a different shell command line interface where the input line stays at the top. Output of previous commands should stack below: > INPUT LINE LAST OUTPUT (of command 1) ...
clemera's user avatar
  • 3,441
4 votes
3 answers
581 views

How to determine which program is running inside an emacs shell buffer?

I have an emacs shell buffer which may or may not be running a certain interactive program such as ftp or python. I wish to write a lisp function which will interact with this program, but I would ...
Ruy's user avatar
  • 839
0 votes
0 answers
64 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 ...
Realraptor's user avatar
  • 1,253
5 votes
1 answer
299 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. ...
ilprincipe's user avatar
0 votes
1 answer
118 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 ...
user avatar