From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo)
To: help-gnu-emacs@gnu.org
Subject: Re: how to tell graphical Emacs to shutdown cleanly from tty1?
Date: Tue, 17 Nov 2015 10:32:08 -0500 [thread overview]
Message-ID: <87mvuc3amf.fsf@yale.edu> (raw)
In-Reply-To: 87si45wbp2.fsf@pobox.com
Tom Roche writes:
> Lately I run GNU Emacs mostly as GUI on X/tty7 (which I'll call
> "the desktop" as opposed to emacs-desktop) on one of my Debian
> laptops. Occasionally the desktop hangs, in which case I usually
> can goto tty1 and `sudo shutdown -whatever now`. Unfortunately
> this does not seem to cause Emacs to shut down as cleanly as I'd
> like: I'd like Emacs to (e.g.) save any unsaved buffers and save
> its emacs-desktop, but that doesn't seem to get done. (Am I
> missing something?)
>
> So I'm thinking that, in this usecase, I should utter something
> from tty1 (before `shutdown`) to tell Emacs to shutdown cleanly
> ... but I don't know what to say. How to do this?
Start a server every time that you start your computer, from a
terminal you can do:
#+BEGIN_SRC shell
emacsclient -c -a ''
#+END_SRC
every time that you want to open emacs. That will start a server
if there is none or connect if there is one already. You will be
able to connect to that server even from TTY1, and M-x
save-buffers-kill-emacs if you want a clean exit.
But I guess the relevant question is, why is your X hanging?
--
Jorge.
next prev parent reply other threads:[~2015-11-17 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 3:23 how to tell graphical Emacs to shutdown cleanly from tty1? Tom Roche
2015-11-17 4:05 ` Emanuel Berg
2015-11-17 4:34 ` Yuri Khan
2015-11-17 15:32 ` Jorge A. Alfaro-Murillo [this message]
2015-11-17 19:01 ` Tom Roche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvuc3amf.fsf@yale.edu \
--to=jorge.alfaro-murillo@yale.edu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).