From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: A few questions about desktop.el Date: Mon, 11 Jun 2007 23:54:57 +0300 Organization: JURTA Message-ID: <87ir9umcta.fsf@jurta.org> References: <877j55gb6p.fsf@jurta.org> <4458C031.5060201@soem.dk> <36957.128.165.123.132.1146760030.squirrel@webmail.lanl.gov> <35277.128.165.123.18.1181337422.squirrel@webmail.lanl.gov> <87d506hz80.fsf@jurta.org> <54274.128.165.0.81.1181350302.squirrel@webmail.lanl.gov> <87hcpg7r2n.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181595563 27584 80.91.229.12 (11 Jun 2007 20:59:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2007 20:59:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 11 22:59:21 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hxqyt-0007MG-4I for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2007 22:59:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hxqys-0001Rs-FS for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2007 16:59:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hxqyo-0001Rn-K4 for emacs-devel@gnu.org; Mon, 11 Jun 2007 16:59:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hxqym-0001Nu-6C for emacs-devel@gnu.org; Mon, 11 Jun 2007 16:59:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hxqyl-0001Nl-UU for emacs-devel@gnu.org; Mon, 11 Jun 2007 16:59:11 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hxqyl-0000aA-Du for emacs-devel@gnu.org; Mon, 11 Jun 2007 16:59:11 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1Hxqyf-000GuT-Ie; Mon, 11 Jun 2007 23:59:06 +0300 In-Reply-To: (Juanma Barranquero's message of "Mon\, 11 Jun 2007 01\:28\:00 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Scanner-Signature: f7f1c38b0b2d7aeba17750d70212ab70 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1133 [June 09 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) 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:72648 Archived-At: >> Overwriting the desktop of another Emacs instance is not a good thing to do. > > Well, that's exactly what happens without this patch. > >> Not writing the desktop would be acceptable if it displayed a message >> about this failure. > > What is the exact use case? Something like a message saying "Can't write the desktop because it is locked by another Emacs instance". Not a good solution either. >> Another alternative is to write the desktop file with a different name. > > You can already do that, with or without the patch. The patch offers > you the alternative of detecting the conflict when you run the second > Emacs instance, so you chose not to load the desktop, and then > manually set another name for it or create it in another directory. But this requires complicate configuration on the user's part. >> All on all, we could leave this to the user's discretion. The user >> should be careful about not creating a configuration where two Emacs >> instances automatically write to the same file. > > I'm not sure what this means: are you proposing not installing the > patch? Because the point (to me anyway) is not having a configuration > where two instances write to the same file, but detecting the case > when that happens by accident. No, I propose installing this patch. I had only doubts how it would behave with my configuration. But with the functions Davis implemented in his patch, it is easy to write a configuration which won't fail, e.g.: (unless (desktop-owner) (run-at-time 3600 3600 'desktop-save "~")) that starts automatic saving only when the desktop is not locked in another Emacs session. > The patch is very useful and works quite well (though I've added it an > option to configure whether the second instance should automatically > overwrite a conflicting desktop file, automatically skip loading it, > or ask the user, instead of always asking as Davis' original patch > does). Such an option would be useful. > I propose installing it and seeing what other people thinks of it. I agree. -- Juri Linkov http://www.jurta.org/emacs/