all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Help-gnu-emacs@gnu.org
Subject: Re: Not reloading the desktop; already loaded
Date: Fri, 28 Oct 2022 09:03:21 +0300	[thread overview]
Message-ID: <831qqslc2e.fsf@gnu.org> (raw)
In-Reply-To: <6568e483-d5d8-cd60-c51b-abbf3f4839da@akwebsoft.com> (message from Tim Johnson on Thu, 27 Oct 2022 14:41:42 -0800)

> Date: Thu, 27 Oct 2022 14:41:42 -0800
> From: Tim Johnson <tim@akwebsoft.com>
> 
> I have written my own project management module using 'desktop.
> If I have loaded a desktop file for a project and attempt to switch to a 
> different project
> I get the following message:
> 
> "Not reloading the desktop; already loaded"
> 
> and the loading of the second desktop file is suppressed.
> 
> I suspect that the problem will be solved by customizing 'desktop,
> but do not know how to proceed.

Look at the code which issues this message:

  (if (or noninteractive
          (and (desktop-owner)
               (= (desktop-owner) (emacs-pid))))
      (message "Not reloading the desktop%s"
               (if noninteractive
                   ""
                 "; already loaded"))

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.  Another way is to release the desktop file lock before
you load the second one, and then re-lock it afterwards.  And there
are probably others.




  parent reply	other threads:[~2022-10-28  6:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 22:41 Not reloading the desktop; already loaded Tim Johnson
2022-10-28  0:09 ` Emanuel Berg
2022-10-28  6:03 ` Eli Zaretskii [this message]
2022-10-28 19:27   ` Tim Johnson
2022-10-29  5:48     ` Eli Zaretskii
2022-10-29 15:17       ` Tim Johnson
  -- strict thread matches above, loose matches on Subject: below --
2022-10-27 22:24 Tim Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831qqslc2e.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.