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: Sun, 10 Jun 2007 00:31:28 +0300 Organization: JURTA Message-ID: <87hcpg7r2n.fsf@jurta.org> References: <58643.128.165.123.132.1146179153.squirrel@webmail.lanl.gov> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181425752 7818 80.91.229.12 (9 Jun 2007 21:49:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2007 21:49:12 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 09 23:49:11 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 1Hx8nz-00024U-Ph for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2007 23:49:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hx8nz-00017G-BB for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2007 17:49:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hx8mR-0000Cm-R9 for emacs-devel@gnu.org; Sat, 09 Jun 2007 17:47:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hx8mQ-0000CP-V5 for emacs-devel@gnu.org; Sat, 09 Jun 2007 17:47:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hx8mQ-0000CK-RC for emacs-devel@gnu.org; Sat, 09 Jun 2007 17:47:30 -0400 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hx8mQ-00051B-7B for emacs-devel@gnu.org; Sat, 09 Jun 2007 17:47:30 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1Hx8mM-00034W-78; Sun, 10 Jun 2007 00:47:28 +0300 In-Reply-To: <54274.128.165.0.81.1181350302.squirrel@webmail.lanl.gov> (Davis Herring's message of "Fri\, 8 Jun 2007 17\:51\:42 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Scanner-Signature: 8fcfa5a562f326ba64a474cd1db6e25e 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:72549 Archived-At: >> I have in .emacs >> (run-at-time 3600 3600 'desktop-save "~") >> so desktop-save silently saves the desktop every hour. >> >> Does you patch cause a problem by asking questions about file locks >> inside such a timer? > > Er, I'm guessing it does... it certainly doesn't check to see if it's > being run in a less than interactive fashion. (How does one even do that? > Either of the standard interactive checks?) But the real question is > what would you want it to do there instead of ask? > > - Is this sort of call supposed to automatically get priority and steal > locks and such? If so, what happens when two Emacs instances run this > timer (as in interleaved, not even simultaneously)? Overwriting the desktop of another Emacs instance is not a good thing to do. > - Alternatively, is it supposed to always fail if a clash is detected? Not writing the desktop would be acceptable if it displayed a message about this failure. > - Or should there be entirely different heuristics...? Another alternative is to write the desktop file with a different name. > I guess I should note (partly just to give this message more than one > declarative sentence) that if you don't save the desktop from another > Emacs (even if you start one and re-use this autosaved desktop), it won't > prompt the next time the timer runs. So if you actually "respect" the > clash detection and don't create a conflicting desktop, there won't be a > problem. 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. -- Juri Linkov http://www.jurta.org/emacs/