emacs-devel
[Top][All Lists]
Advanced

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

Re: On desktop loking


From: Davis Herring
Subject: Re: On desktop loking
Date: Wed, 1 Aug 2007 10:26:22 -0700 (PDT)
User-agent: SquirrelMail/1.4.8-6.el3.2lanl

>> Yes, don't load desktop-save-mode.
>
> This does not look as a solution ("Do not eat, you beacome fat!").
>
> I confirm it is very, very annoying!

If what you want is to make such "secondary" Emacs sessions not use the
desktop, you want to (approximately as Juanma suggested) set
`desktop-load-locked-desktop' to nil.  Then locked desktops will simply be
ignored.

The secondary Emacs processes will still consider saving the desktop file,
though they will prompt you for a new directory in which to do so; if you
want to preempt this, further (approximately as Leo suggested) add
`desktop-save-mode-off' to `desktop-not-loaded-hook' (it's even a
Customize option for that hook).  Then any Emacs that comes across a
locked desktop will completely forget about desktops of any kind.

If, on the other hand, you do want to use the desktop in all of your Emacs
processes, and are simply annoyed by it bothering you, you'll have to tell
Emacs what to do with all the different states it could choose to save in
the one file.  This is what you'll get if you set
`desktop-load-locked-desktop' to t; then most of your Emacs processes will
politely ask for permission to overwrite each other's desktops when they
exit.

> Suppose that the system crashes, the '.emacs.desktop.lock' is not deleted
> and you have to restart the PC and emacs: it says
>
>    'Warning: desktop file appears to be in use by PID...'
>
> but it is the firt tipe you starts emacs! there are not processes using
> the desktop file!
>
> Is this a clean logic?

There's no way for Emacs to know that the file is out of date; the lock
could very well have been placed by an Emacs that is still quite alive but
is running on a different system (with NFS).  This is the downside of my
previous suggestions: with such a stale lock, no Emacs will ever use the
desktop again!  Faced with that possibility, what is desktop.el supposed
to do but ask you for advice?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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