emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exit


From: Stephen J. Turnbull
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exiting for display closed or SIGTERM/HUP.
Date: Wed, 05 May 2010 14:17:22 +0900

Stefan Monnier writes:

 > That argues for a change in desktop.el to make it behave better with
 > session management.

Maybe.  The scheme I proposed (a thunk library in .emacs.d/session/)
will work fine with desktop.el as it is.  Modulo this problem, that is:

 > > If I start emacs in /some/dir without a desktop file and have
 > > desktop-mode enabled, there will be no desktop saved when I log
 > > out.

This is a bug in desktop.el.  .emacs.d/session/ is a reasonable place
to put the desktop file for cases where there's no opportunity for
user interaction, or the user has expressed a preference for no
interaction (which is a very plausible preference with a good session
manager).  Name it .emacs.desktop.CLIENT-ID or so for uniqueness.

 > > When the session manager then restarts Emacs in $HOME it will
 > > read my desktop file in $HOME.  That is a bug also.

My scheme deals with that issue without changing desktop.el.  I think
that is important, because you're likely to (a) break stuff for CLI
users, and (b) there's no desktop manager spec on the table yet, so
you're likely to end up changing everything a few times as the spec
becomes clearer.  The thunk gives you a way to experiment with
interacting with the GUI session manager without horking desktop.el.

Note that my scheme is also upward-compatible with the kinds of
changes you are proposing to desktop.el -- the desktop file just moves
to .emacs.d/session/.  CLI users will still need some way to select
sessions.  One possibility would be the traditional .emacs.desktop
file method, another would be for desktop to look in .emacs.d/session/
for "active" sessions and offer the user a menu at startup.  I suspect
CLI users will detest the menu idea, but it's just proof of concept.

I don't actually advocate my scheme -- I haven't time to think
carefully about it or implement it for Emacs.  But it seems to me that
you have to do at least that well.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]