help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Not reloading the desktop; already loaded


From: Tim Johnson
Subject: Re: Not reloading the desktop; already loaded
Date: Sat, 29 Oct 2022 07:17:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2



On 10/28/22 9:48 PM, Eli Zaretskii wrote:
Date: Fri, 28 Oct 2022 11:27:12 -0800
From: Tim Johnson <tim@akwebsoft.com>

I assume yours is an interactive (i.e., no "--batch") session, so the
condition that applies in your case is the one about the "owner" of
the desktop file.  So the problem is that the desktop file was (of
course) written by the same Emacs process as the current one, and you
need to work around that.  One way is to override the definition of
desktop-owner.
How would I do that? (feel free to point to documentation and I will
also search
on your last phrase)
The simplest way is to define your own version of that function that
is similar, but not identical.  A less brute-force way is to "advise"
the function; see the node "Advising Functions" in the ELisp manual.

    Another way is to release the desktop file lock before
you load the second one, and then re-lock it afterwards.
Again: how would I do that?
Look at the functions in desktop.el which do that: desktop-claim-lock
and desktop-release-lock.  You can call them from your code.

   And there
are probably others.
Sure, such as use elisp instead of bash to delete the file lock ...
Deleting the lock is not something I'd recommend.  It is there for a
reason.

Thank you Eli. I am good to go.
Regards

--
Tim
tj49.com




reply via email to

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