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: Fri, 28 Apr 2006 21:57:25 -0700 (PDT) Message-ID: <25279.128.165.0.81.1146286645.squirrel@webmail.lanl.gov> References: <58643.128.165.123.132.1146179153.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 1146286675 30841 80.91.229.2 (29 Apr 2006 04:57:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Apr 2006 04:57:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 29 06:57:53 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 1FZhWe-0005a6-8K for ged-emacs-devel@m.gmane.org; Sat, 29 Apr 2006 06:57:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZhWd-0005vy-SN for ged-emacs-devel@m.gmane.org; Sat, 29 Apr 2006 00:57:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZhWQ-0005vl-9F for emacs-devel@gnu.org; Sat, 29 Apr 2006 00:57:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZhWO-0005vI-FD for emacs-devel@gnu.org; Sat, 29 Apr 2006 00:57:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZhWO-0005vF-Ag for emacs-devel@gnu.org; Sat, 29 Apr 2006 00:57:32 -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 1FZhZf-0006NB-UY for emacs-devel@gnu.org; Sat, 29 Apr 2006 01:00:56 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k3T4vShj019653 for ; Fri, 28 Apr 2006 22:57:28 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k3T4vPrM002525; Fri, 28 Apr 2006 22:57:25 -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 k3T4vPfh029171; Fri, 28 Apr 2006 22:57:25 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k3T4vPKt029169; Fri, 28 Apr 2006 21:57:25 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.0.81 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Fri, 28 Apr 2006 21:57:25 -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:53581 Archived-At: > - Emacs process the desktop file, loading buffers and all, and only > then asks about it being in use. Can this be changed so the question > is asked at the beginning? (I imagine this could be difficult because > of the way the desktop file is loaded.) Well, the reason for it is really quite simple in my implementation -- the use tag is added at the end of the file! The other code has already run. Doing it this way let me do the file update with a single `write-region' append call. But (see other email) Richard wants that done in a separate file, and I don't blame him. So I'll move the check before the desktop file is ever opened when I do that (Monday or so). > - If you decide *not* to load the desktop file in use, on exit > you're still asked about saving a new desktop file; at least, for > certain values of `desktop-save'. My main use case is that I'm > starting a fresh Emacs by accident (I have Emacs on another virtual > desktop, or just too many open apps), and I'm going to do C-x C-c > immediately, so it's a bit cumbersome to "M-x set-variable > desktop-save nil RET". Perhaps a desktop-not-loaded-hook could be > useful there. I thought this was buggy when I first saw it too. But I realized that there's no assumption made by desktop.el that you have only one file; just because this Emacs session isn't associated with the desktop file you originally tried to load doesn't mean it shouldn't be associated with another. But since it doesn't know which other one, it asks! It's really a feature... sorta. I realize that for the common "oh wait, already have Emacs" case, it's annoying; there could be a customization option to disable Desktop if you refuse to re-load the file. I might point out, though, that I've carefully written it so that if you attempt to overwrite the file that you chose not to load (typically just pressing Enter when it offers "~/" as the save location) it'll note that you're overwriting a file that you didn't load, and if you decline to overwrite it, Emacs will still exit. Admittedly, this is still annoying, but pressing C-x C-c RET n o RET is a lot faster than doing `set-variable'. > - Not a problem with your implementation, but on Windows, using > gnuserv/gnuclient, the second Emacs instance shows a message "Server > subprocess exited" (because it wasn't able to run gnuserv a second > time) which hides the desktop question... Pressing C-l will clear this up, so long as you realize that you're in the minibuffer and need it redrawn. 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.