Arno
Arno

Reputation: 88

"exec" in Emacs lisp ?

In an Emacs lisp script, I would like the script to start a new process and replace itself with the started process, in the same way it can be achieved using "exec" in Bash or Perl.

To clarify the use case, I'm writing a command wrapper in Elisp (using emacs --script) and would like to run the wrapped command as-is in some circumstances.

Is that in any way possble ?

Upvotes: 3

Views: 370

Answers (1)

Greg A. Woods
Greg A. Woods

Reputation: 2792

nope. emacs isn't a "command shell" or true scripting language interpreter.

You could maybe turn your problem inside out though and have a wrapper shell script that either execs emacs or execs some other command, and possibly that decision could be made by some elisp code run in an initial emacs instance.

Upvotes: 3

Related Questions