On Fri 12 Apr 2019 at 18:04:45 (+0200), Pétùr wrote:
I use neomutt with emacs.
I would like to quickly save and kill a buffer in emacs. This is to
avoid typing C-x C-s and, then, C-x C-c when sending an email. I want
one shortcut to save and kill the buffer and be back quickly in mutt to
send the email.
I tried the following inside my .emacs (binded to C-q). It works but
kill also the window when inside a terminal. I am not going back to mutt
after writing inside emacs (-nw) and C-q. How can I fix that?
I just put
(global-set-key [?\C-q] "\C-x\C-s\C-x\C-c")
into my ~/.emacs file and it works just as one would expect, both when
emacs is running in a separate window (which disappears) or when emacs
is running with -nw in an xterm (the xterm is unaffected).
I will finish composing this email (in emacs -nw) by typing ^q and
expect to be left in mutt, whereupon I shall press y to send it.
Is that what you wnat?