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: [Emacs-diffs] trunk r116304: * lisp/desktop.el (desktop-read): Claim the lock when the owner is not the current process. Date: Sat, 08 Feb 2014 12:14:44 +0200 Organization: JURTA Message-ID: <871tzdq5er.fsf@mail.jurta.org> References: <83eh3eyjvs.fsf@gnu.org> <87iosqsntr.fsf@mail.jurta.org> <838utmxcre.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391854645 20932 80.91.229.3 (8 Feb 2014 10:17:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 10:17:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 08 11:17:30 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WC4yY-0006j6-1Z for ged-emacs-devel@m.gmane.org; Sat, 08 Feb 2014 11:17:30 +0100 Original-Received: from localhost ([::1]:45995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC4yX-0002h3-JI for ged-emacs-devel@m.gmane.org; Sat, 08 Feb 2014 05:17:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC4y6-0002FS-Kq for emacs-devel@gnu.org; Sat, 08 Feb 2014 05:17:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WC4y0-0008TE-Kt for emacs-devel@gnu.org; Sat, 08 Feb 2014 05:17:02 -0500 Original-Received: from [69.163.184.122] (port=43870 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC4xu-0008Sa-3R; Sat, 08 Feb 2014 05:16:50 -0500 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 036AA302B7B790; Sat, 8 Feb 2014 02:16:48 -0800 (PST) In-Reply-To: <838utmxcre.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 08 Feb 2014 09:52:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.184.122 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169484 Archived-At: >> The one that comes last wins. The last session will do auto-saving, >> the previous won't. At least, there should be no conflict of both sessions >> trying to auto-save to the same file, because auto-saving checks the ownership. >> The conflict might occur when during exiting both sessions will try writing >> to the same file. I see nothing in `desktop-kill' that would prevent saving >> to a non-locked desktop, except the question "Save desktop?" > > That's not what I see today, I think. When I need to test something > in a fresh session, I sometimes by mistake invoke "emacs" instead of > "emacs -Q", which reads my ~/.emacs and activates desktop saving. The > main Emacs session is alive, of course. Then, when I exit, I'm asked > whether to save desktop and given the opportunity to say NO, When you invoke "emacs" instead of "emacs -Q" by mistake, it warns you about the mistake by asking "Warning: desktop file appears to be in use by PID %s. Using it may cause conflicts. Use it anyway? " so you could just say NO. > because I certainly don't want my main desktop file to be overwritten > by this mistaken session. I'm not sure this change doesn't eliminate > this useful capability. Even when you answer YES, and a new session will auto-save the desktop, you still can save the final version of the desktop from the first session if you exit it later than the auto-saving session, so it will overwrite the desktop from the latest exited session.