From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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 09:52:05 +0200 Message-ID: <838utmxcre.fsf@gnu.org> References: <83eh3eyjvs.fsf@gnu.org> <87iosqsntr.fsf@mail.jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391845954 4816 80.91.229.3 (8 Feb 2014 07:52:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 07:52:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 08 08:52:38 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 1WC2iM-0001Rg-79 for ged-emacs-devel@m.gmane.org; Sat, 08 Feb 2014 08:52:38 +0100 Original-Received: from localhost ([::1]:45552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC2iL-0002Qn-P5 for ged-emacs-devel@m.gmane.org; Sat, 08 Feb 2014 02:52:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC2iE-0002Qd-Hq for emacs-devel@gnu.org; Sat, 08 Feb 2014 02:52:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WC2i9-0003XH-Bh for emacs-devel@gnu.org; Sat, 08 Feb 2014 02:52:30 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC2i9-0003XB-3M for emacs-devel@gnu.org; Sat, 08 Feb 2014 02:52:25 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0O0050035V4A00@mtaout25.012.net.il> for emacs-devel@gnu.org; Sat, 08 Feb 2014 09:51:35 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0O004P935ZER00@mtaout25.012.net.il>; Sat, 08 Feb 2014 09:51:35 +0200 (IST) In-reply-to: <87iosqsntr.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 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:169481 Archived-At: > From: Juri Linkov > Cc: emacs-devel@gnu.org > Date: Fri, 07 Feb 2014 21:42:00 +0200 > > >> + * desktop.el (desktop-read): Claim the lock when the owner is not > >> + the current process. (Bug#16157) > > > > What happens if an Emacs session that locked the desktop file is still > > alive? > > 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, 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.