* On desktop loking
@ 2007-07-27 16:07 Angelo Graziosi
2007-07-27 16:26 ` Leo
0 siblings, 1 reply; 5+ messages in thread
From: Angelo Graziosi @ 2007-07-27 16:07 UTC (permalink / raw)
To: emacs-devel
I have noted using emacs-22.1.50-cvs that while emacs is running there is
a new file '.emacs.desktop.lock'.
This causes that starting a new session of emacs, it says
'Warning: desktop file appears to be in use by PID...'
and closing it:
'Directory for desktop file:...'
This is rather annoying, so there is an option to avoid this 'locking' an
to restore the previous behaviour of version 22.1 ?
TIA,
Angelo.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On desktop loking
2007-07-27 16:07 Angelo Graziosi
@ 2007-07-27 16:26 ` Leo
0 siblings, 0 replies; 5+ messages in thread
From: Leo @ 2007-07-27 16:26 UTC (permalink / raw)
To: emacs-devel
Yes, don't load desktop-save-mode.
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On desktop loking
@ 2007-07-27 20:24 Angelo Graziosi
2007-07-27 22:18 ` Juanma Barranquero
2007-08-01 17:26 ` Davis Herring
0 siblings, 2 replies; 5+ messages in thread
From: Angelo Graziosi @ 2007-07-27 20:24 UTC (permalink / raw)
To: emacs-devel
Leo wrote:
> 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!
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?
It is my opinion that there is something of 'illogic' in this.
Cheers... and sorry for the noise,
Angelo.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On desktop loking
2007-07-27 20:24 On desktop loking Angelo Graziosi
@ 2007-07-27 22:18 ` Juanma Barranquero
2007-08-01 17:26 ` Davis Herring
1 sibling, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2007-07-27 22:18 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
On 7/27/07, Angelo Graziosi <Angelo.Graziosi@roma1.infn.it> wrote:
> This does not look as a solution ("Do not eat, you beacome fat!").
You could try looking at desktop.el. Perhaps you'd find
`desktop-load-locked-desktop', which, if set to t, will
unconditionally load the desktop file.
> I confirm it is very, very annoying!
I find much more annoying to accidentally destroy a desktop used by
other instance of Emacs just because I didn't realize I already had an
Emacs running...
> 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!
No, but there's a file that says to Emacs that an Emacs instance
identified by PID was using the desktop. It is normal procedure for
your system to crash, or are you complaining because of the
possibility of it happening and Emacs asking you about it?
> Is this a clean logic?
Yes, I think so. And Davis Herring, who designed the feature, surely
agrees with me...
> It is my opinion that there is something of 'illogic' in this.
When Emacs finds the desktop locked, does it not ask you about reusing
it nonetheless?
Could you please describe as accurately as possible the use case
that's causing you trouble?
Juanma
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: On desktop loking
2007-07-27 20:24 On desktop loking Angelo Graziosi
2007-07-27 22:18 ` Juanma Barranquero
@ 2007-08-01 17:26 ` Davis Herring
1 sibling, 0 replies; 5+ messages in thread
From: Davis Herring @ 2007-08-01 17:26 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: emacs-devel
>> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-01 17:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 20:24 On desktop loking Angelo Graziosi
2007-07-27 22:18 ` Juanma Barranquero
2007-08-01 17:26 ` Davis Herring
-- strict thread matches above, loose matches on Subject: below --
2007-07-27 16:07 Angelo Graziosi
2007-07-27 16:26 ` Leo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.