Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: long-standing tty related issue: wrapped Emacs not suspended



On 2018-09-20 05:43:42 -1000, Joey Pabalinas wrote:
> I don't actually know if you can resume emacs in that state, but anyway the
> simpler workaround is to use something like `f() { emacs -nw "$@" & }; f`
> where having the & inside the function itself avoids the extra subshell and
> gives you expected behavior.

Well, this is not a workaround in my case, since I do not necessarily
want the "-nw" and the "&" (that was just for testing). But thanks to
your explanations, I could find a workaround:

1. Instead of using a shell function, use a script.

2. And in the script, replacing

  emacs "$@"

by

  exec emacs "$@"

seems to avoid the problem, because the subshell is replaced by
emacs (I can do this because emacs is the last command).

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author