1

Currently I'm using shell command - which makes a buffer, showing the output, sometimes locking emacs.

What is a good way to run a process that:

  • Doesn't make a buffer.
  • Doesn't lock emacs.
  • Ignores the stdout/stderr.
2
  • 2
    start-process with nil for the buffer argument: gnu.org/software/emacs/manual/html_node/elisp/…
    – lawlist
    Jul 27, 2017 at 15:49
  • async-shell-command might be interesting as well. It should be trivial to write another interactive wrapper that doesn't create a buffer with output.
    – user12563
    Jul 27, 2017 at 16:27

1 Answer 1

1

call-process, despite normally being used for synchronous process calls:

call-process is a built-in function in `C source code'.

(call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)

[...]
Insert output in DESTINATION before point[...]0 means discard and don't wait
[...]
If DESTINATION is 0, `call-process' returns immediately with value nil.
[...]
1
  • call-process requires commands to be split up. I ended up using: (call-process-shell-command my_command nil 0)))))
    – ideasman42
    Aug 1, 2017 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.