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: Stefan Monnier
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 09:54:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> The way to get Emacs to load a desktop file when starting Emacs is to start
> Emacs in the directory where it was saved.  The --chdir emulated that.  I'm
> not saying that setting a desktop file to another directory is handled well
> by this, but it wasn't handeled at all previously.

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).

>> So my solution would be to (1) add `default-directory' to
>> `desktop-locals-to-save' (which handles the default directory settings
>> for *scratch* and " *Message-Log*", I think somebody already mentioned
>> this),
> 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.

> 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?


        Stefan




reply via email to

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