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: Jan D.
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r100117: Run kill-emacs when exiting for display closed or SIGTERM/HUP.
Date: Tue, 04 May 2010 16:26:47 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 2010-05-04 15:54, Stefan Monnier wrote:

Yes, --chdir solves partially the problem you encountered.  The problem
with that is the "partially".  Adding a new feature to *partially* fix
a bug is only a good idea if that bug can't be solved fully some other
way (e.g. by adding a different feature).

The --chdir was introduced to restore a feature we had earlier, it is not a new feature. It is a new command line option, but an old feature w.r.t. session management.


This assumes you are using desktop.  If you restart an Emacs without any
desktop saved, the default directory is still wrong.  But with --chdir it
is not.

If you don't use desktop, then Emacs is restarted in a completely
different state, so it's really no surprise that the default-directory
in *scratch* is different.  It's just a very minor detail in
this respect.

It may be to you, but it is not to me. I open files all the time from *scratch* just because the default directory there is right. It is a bug for Emacs not to restore this after a session restart.

I'd like desktop.el to be more modular so we could save desktop automatically in the session specific restore data file. I tried once, but it was so hard coded to use just one file, so I gave up.


desktop.el would have to add a function to the hook
emacs-save-session-functions that stores whatever data it needs to
recover.  For example, the desktop file name in use.

That would sound like The Right Way to solve the problem, don't you think?


It solves another problem, that of not having the desktop file in Emacs current directory. It still does not solve the problem of default directory for buffers like *scratch*.

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. When the session manager then restarts Emacs in $HOME it will read my desktop file in $HOME. That is a bug also.

        Jan D.






reply via email to

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