From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Not reloading the desktop; already loaded Date: Fri, 28 Oct 2022 11:27:12 -0800 Message-ID: <5ccf9868-c656-61a7-e5e7-31faba8d4a3a@akwebsoft.com> References: <6568e483-d5d8-cd60-c51b-abbf3f4839da@akwebsoft.com> <831qqslc2e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 28 21:28:21 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ooV1g-000AKQ-SD for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 28 Oct 2022 21:28:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooV0y-0001Qk-6V; Fri, 28 Oct 2022 15:27:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooV0w-0001Q4-I9 for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 15:27:34 -0400 Original-Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooV0t-0004ZV-P6 for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 15:27:34 -0400 Original-Received: from cmgw13.mail.unifiedlayer.com (unknown [10.0.90.128]) by progateway4.mail.pro1.eigbox.com (Postfix) with ESMTP id C01FE10048C24 for ; Fri, 28 Oct 2022 19:27:16 +0000 (UTC) Original-Received: from host2075.hostmonster.com ([67.20.113.97]) by cmsmtp with ESMTP id oV0coqOPFQbwAoV0conqBJ; Fri, 28 Oct 2022 19:27:16 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=O638ADxW c=1 sm=1 tr=0 ts=635c2d14 a=aQnT3iVtBfeMReKcJ+NyPQ==:117 a=aQnT3iVtBfeMReKcJ+NyPQ==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=Qawa6l4ZSaYA:10:nop_rcvd_month_year a=ayW8BPpL5VgA:10:endurance_base64_authed_username_1 a=YVGSICyFAAAA:8 a=LEvwCxz8AAAA:8 a=isgRTya24uF7Ci9R_9IA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=_A0M0H-KnXMr_udgNV47:22 a=vUffgtpU50H2-Id-Mk4j:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tj49.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rhvqtFw3+Re3vacl/gVjNOvbAfRIVTk1esY3w7FLPmk=; b=ooUQobtb+ixjsyGj+CDgC9PflC GTaeTqVwjq/msRLL2Kuh3hRI/c0lZAZJ/dmh1yRuJ21FyRCpN9mR6l3VhBVcTboZM8MxQR8/Qhlcn UejgLEPf55KzrcZFbT22d/Itr; Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:55962 helo=[192.168.1.2]) by host2075.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ooV0c-000tu9-5C for help-gnu-emacs@gnu.org; Fri, 28 Oct 2022 13:27:14 -0600 Content-Language: en-US In-Reply-To: <831qqslc2e.fsf@gnu.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2075.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - akwebsoft.com X-BWhitelist: no X-Source-IP: 64.4.232.191 X-Source-L: No X-Exim-ID: 1ooV0c-000tu9-5C X-Source-Sender: tjohnson.mtaonline.net ([192.168.1.2]) [64.4.232.191]:55962 X-Source-Auth: tim@tj49.com X-Email-Count: 1 X-Source-Cap: bW9sZG92YXM7bW9sZG92YXM7aG9zdDIwNzUuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: neutral client-ip=69.89.18.3; envelope-from=tim@akwebsoft.com; helo=gproxy2-pub.mail.unifiedlayer.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140485 Archived-At: On 10/27/22 10:03 PM, Eli Zaretskii wrote: >> Date: Thu, 27 Oct 2022 14:41:42 -0800 >> From: Tim Johnson >> >> 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")) Thank you for the reply Eli I have for years just deleted .emacs.desktop.lock, it works for me and and I wasn't switching projects all that often. However, I would prefer a more emacsen approach, so bottom-posting your content: > 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) > 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? > And there > are probably others. Sure, such as use elisp instead of bash to delete the file lock ... cheers -- Tim tj49.com