emacs-devel
[Top][All Lists]
Advanced

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

Re: How to stop desktop.lock file creation


From: Eli Zaretskii
Subject: Re: How to stop desktop.lock file creation
Date: Sat, 26 Mar 2022 08:48:41 +0300

> Date: Fri, 25 Mar 2022 23:53:19 +0100 (CET)
> From: Angelo Graziosi <angelo.g0@libero.it>
> Cc: emacs-devel@gnu.org
> 
> > Why do you need to delete the desktop lock file?  If you are annoyed
> 
> The alternative is to accept to load it or not but why should i play this 
> game.. 

You don't need to play this game.  If you set
desktop-load-locked-desktop to t, Emacs will unconditionally load the
desktop even if locked, no questions asked.  Its effect is the same as
not having the lock at all, when the process which locked the desktop
no longer runs.

> > by the question Emacs asks when you invoke it the next time, you can
> > simply customize desktop-load-locked-desktop to the value t, then it
> > will not ask any questions.
> 
> You do not say if Emacs can be configured to avoid its creation, i.e. the 
> creation of the 'desktop.lock' file..

That's because you cannot, not without changing desktop.el.  Maybe you
can do that by customizing desktop-base-lock-name to "NUL", but I
didn't test that and am not sure it will work.  The customization of
desktop-load-locked-desktop I suggested above will have the same
effect, so I see no reason for you to try something that is
unsupported and untested instead.

> > If there's some other problem with that lock file, please describe it,
> > so we understand what problem you are trying to solve.
> 
> I don't like it, I don't see its usefulness in my case, I am the only user of 
> this PC and the only user of Emacs and I only start it once.

Then I think customizing desktop-load-locked-desktop to t is exactly
for your situation.  Does it cause any further problems?  If not, why
not use it?

> Emacs worked the same before its introduction...

The lock was introduced in Emacs 22.2, quite some time ago.  It isn't
a new feature.



reply via email to

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