From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: A few questions about desktop.el Date: Tue, 2 May 2006 08:42:18 -0700 (PDT) Message-ID: <34206.128.165.123.132.1146584538.squirrel@webmail.lanl.gov> References: <58643.128.165.123.132.1146179153.squirrel@webmail.lanl.gov><25279.128.165.0.81.1146286645.squirrel@webmail.lanl.gov><34179.128.165.123.132.1146582412.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146584640 8285 80.91.229.2 (2 May 2006 15:44:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 May 2006 15:44:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 02 17:43:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fax1O-0007wk-Ts for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 17:42:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fax1O-0001W1-BD for ged-emacs-devel@m.gmane.org; Tue, 02 May 2006 11:42:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fax17-0001Ua-LS for emacs-devel@gnu.org; Tue, 02 May 2006 11:42:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fax16-0001UC-BV for emacs-devel@gnu.org; Tue, 02 May 2006 11:42:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fax16-0001U8-2o for emacs-devel@gnu.org; Tue, 02 May 2006 11:42:24 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fax1H-000846-0x for emacs-devel@gnu.org; Tue, 02 May 2006 11:42:35 -0400 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k42FgL9C032725 for ; Tue, 2 May 2006 09:42:21 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k42FgI0M019688; Tue, 2 May 2006 09:42:18 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k42FgIiD016100; Tue, 2 May 2006 09:42:18 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k42FgIQT016098; Tue, 2 May 2006 08:42:18 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.132 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Tue, 2 May 2006 08:42:18 -0700 (PDT) In-Reply-To: Original-To: "Juanma Barranquero" User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53796 Archived-At: >> It seems to me that >> (add-hook 'desktop-not-loaded-hook (lambda () (setq desktop-save nil))) >> ...would be cumbersome (especially for non-Lispy users). > > You could always do M-x customize-variable desktop-not-loaded-hook, > couldn't you? Hey, you're right -- the answer is to give (the new, trivial function) `disable-desktop-save-mode' as an :option in the defcustom for `desktop-not-loaded-hook'. >> Is there any >> other use for such a hook (maybe `kill-emacs'? ;) > > Certainly, running an external app (likely gnuclient) to bring the > other Emacs instance to focus and then killing the current one would > be my first use, yes. I'll also put `save-buffers-kill-emacs' in the :options. >> Or instead to ask, >> when the user chooses to honor a lock, whether to then disable Desktop? > > I hate being asked (by a program :-) about things that could be automated. The only problem I see is how to inform the user (aside from etc/NEWS) that the hook exists, since the behavior with it uncustomized can be annoying but it's not an obvious customization locus. Certainly it could be given an obnoxious default value like '(announce-the-presence-of-this-hook), but that's silly. Any ideas? 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.