From unknown Fri Sep 12 17:52:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#30421 <30421@debbugs.gnu.org> To: bug#30421 <30421@debbugs.gnu.org> Subject: Status: 25.3; desktop.el: Steal lock when no living "emacs" process owns it Reply-To: bug#30421 <30421@debbugs.gnu.org> Date: Sat, 13 Sep 2025 00:52:55 +0000 retitle 30421 25.3; desktop.el: Steal lock when no living "emacs" process o= wns it reassign 30421 emacs submitter 30421 Pierre Neidhardt severity 30421 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 04:54:32 2018 Received: (at submit) by debbugs.gnu.org; 11 Feb 2018 09:54:32 +0000 Received: from localhost ([127.0.0.1]:37621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekoLA-0006xS-5A for submit@debbugs.gnu.org; Sun, 11 Feb 2018 04:54:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekoL8-0006xE-In for submit@debbugs.gnu.org; Sun, 11 Feb 2018 04:54:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekoL2-0000hh-G1 for submit@debbugs.gnu.org; Sun, 11 Feb 2018 04:54:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekoL2-0000hN-CM for submit@debbugs.gnu.org; Sun, 11 Feb 2018 04:54:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekoL0-0005Nk-Un for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 04:54:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekoKz-0000cs-Qb for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 04:54:23 -0500 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:40872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekoKz-0000aK-Js for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 04:54:21 -0500 Received: by mail-wm0-x231.google.com with SMTP id v123so4752044wmd.5 for ; Sun, 11 Feb 2018 01:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=l2h+w4CoAMHhpESjsiyGQuG/lJ74c5KfuhW9Tf+3iuE=; b=J0DcT06FlY9fFBTRVSW0Uv+ACzG6/p6eNoBIe5spzYbsjbKOU75Afa1lQn89o/cAaa jIZUQ1uu3k09uMg5vU7seKtWfrsdMGtCheRTbU60zOdGkPgjbPt8HTyjlI5LxCt2Hr6n yGwWA731apfb0UBlXrUiYe0SsGgQVN/3SROYk433Um65ZVZVLyFX2Dvk7cDKt5jheggI uAxghKA2/1lkNvkZpew/ttM7oMGdMBdNUJkfGKO5W4jQpO9l2PiS6mhdOvC33ZyfBZHY gumX0JErjBRTYjYGImei9htjtB1mCMIPTc9avVBSHsqGVb09mfvvKLq0STwli5vBmJzJ VVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=l2h+w4CoAMHhpESjsiyGQuG/lJ74c5KfuhW9Tf+3iuE=; b=UUC4H5ghLpqWmSnJxB+CgBlQHvqsapSjhZkWpVqrdRLSrbnxIMgin25oxcxw+fWjT/ IQovlhP60T0//6Vtrof1RnC38DScmeaCVbbkWgWT2ULIDm9qWj5W86vl4hoqlvgCmxQQ lzt5/nM4/EzFV/n/CkAVjtbRhcYMhPzkbRWmVnYrE9ZRxo4Mq7wPyqdj9cQ+W9wA5fwQ ffZsFTpXO64Jgn4QXdTmh4PpkbC1EcZhrfyclZRme3dXsf/z1uV9p/snfmF2m2VPlrPz xog+8wzSdsIEzHnYUjuw2vwFPzFsH3ySJ3FIBBv3J1JbKUg6Z6faHXlownx9yZWe1pOU MrAw== X-Gm-Message-State: APf1xPDtgUN0nPKFWIQ3V/Vjx0josPjjXx7vlA/YtSKhtqo4Xc350YmZ Jp5zGc8mWbY4d/S8g9ECTufybA== X-Google-Smtp-Source: AH8x227Pb+0IMA8z5/sEfKPVWl1+2zYDx86orv6RBFrh1OtQuQr7wct/1w7yGx+KWjRPa5mUawx02Q== X-Received: by 10.28.218.12 with SMTP id r12mr842819wmg.157.1518342859949; Sun, 11 Feb 2018 01:54:19 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id p14sm5775281wrg.42.2018.02.11.01.54.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 01:54:19 -0800 (PST) User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: bug-gnu-emacs@gnu.org Subject: 25.3; desktop.el: Steal lock when no living "emacs" process owns it Date: Sun, 11 Feb 2018 10:54:13 +0100 Message-ID: <871shram2i.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) By default, desktop-save-mode will not save (and will set desktop-dirname to nil) if a lock file exists with a PID in it. It's problematic however when Emacs gets killed and does not release the lock. Upon next start, desktop-save-mode will refuse to save because the lock exists, even though no process is using it. In terms of user experience, it's pretty bad considering the error feedback is just one line in the *Messages* buffer (I almost never notice it when it happens) and the problem is persistent across reboots (the lock file will remain as long as the user does not remove it manually). Furthermore, isn't it strange to just check if there lock file contains a number and not actually check if it's an existing PID? I think it would make much more sense to actually check if the owner is an _existing_ process named "emacs". Here is my suggested patch: (defun desktop-owner (&optional dirname) "Return the PID of the Emacs process that owns the desktop file in DIRNAME. Return nil if no desktop file found or no Emacs process is using it. DIRNAME omitted or nil means use `desktop-dirname'." (let (owner (file (desktop-full-lock-name dirname))) (and (file-exists-p file) (ignore-errors (with-temp-buffer (insert-file-contents-literally file) (goto-char (point-min)) (setq owner (read (current-buffer))) (integerp owner) + (process-attributes owner) + (string= "emacs" (alist-get 'comm (process-attributes owner))))) owner))) In GNU Emacs 25.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.26) of 2017-12-16 built on build Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Void Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-xwidgets --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin --mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var --with-file-notification=inotify --with-modules --with-jpeg --with-tiff --with-gif --with-png --with-xpm --with-rsvg --without-imagemagick --with-xml2 --with-gnutls --with-sound --with-m17n-flt --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu 'CFLAGS=-fno-PIE -mtune=generic -O2 -pipe -g' 'CPPFLAGS= ' 'LDFLAGS=-no-pie -Wl,--as-needed '' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 10:50:28 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 15:50:28 +0000 Received: from localhost ([127.0.0.1]:38486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekttb-00029p-VU for submit@debbugs.gnu.org; Sun, 11 Feb 2018 10:50:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ektta-00029d-OS for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 10:50:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekttQ-000506-HJ for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 10:50:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekttQ-0004zj-Ci; Sun, 11 Feb 2018 10:50:16 -0500 Received: from [176.228.60.248] (port=4985 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekttP-0008Bp-R6; Sun, 11 Feb 2018 10:50:16 -0500 Date: Sun, 11 Feb 2018 17:50:02 +0200 Message-Id: <83mv0f1q6t.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <871shram2i.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 11 Feb 2018 10:54:13 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Date: Sun, 11 Feb 2018 10:54:13 +0100 > > > By default, desktop-save-mode will not save (and will set > desktop-dirname to nil) if a lock file exists with a PID in it. > > It's problematic however when Emacs gets killed and does not release the > lock. Upon next start, desktop-save-mode will refuse to save because > the lock exists, even though no process is using it. In terms of user > experience, it's pretty bad considering the error feedback is just one > line in the *Messages* buffer (I almost never notice it when it happens) > and the problem is persistent across reboots (the lock file will remain > as long as the user does not remove it manually). When this happens to me, the next time I start Emacs, I'm asked whether to use the desktop file that appears to be locked, and if I answer YES, desktop.el goes on to restore the session, no other questions asked, and saves the desktop upon exit with no problems. I'm confused as to why you see something different. Could it be that your activation of desktop-save-mode is somehow different from mine? > Furthermore, isn't it strange to just check if there lock file contains > a number and not actually check if it's an existing PID? You are assuming that the locking process runs on the same machine, but that is not guaranteed. The directory where the desktop file lives could be mounted via the network, I think. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 11:08:20 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 16:08:21 +0000 Received: from localhost ([127.0.0.1]:38506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuAu-0002aJ-Ku for submit@debbugs.gnu.org; Sun, 11 Feb 2018 11:08:20 -0500 Received: from mail-wr0-f171.google.com ([209.85.128.171]:45022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuAs-0002a6-K2 for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 11:08:18 -0500 Received: by mail-wr0-f171.google.com with SMTP id v65so6041056wrc.11 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 08:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Q6pld81rEk8M6z0s/7RgoSzASDqveRDZRZCEU4yv8HI=; b=gSKtfEw/9EuBkZ72z4OmbZVGpKV0Aq5hyn0aEDfbx+Hhb+LUt9jTVWhYdN9p4XjJJ1 Ew2N5oQyg5q3O5N8uylwoWM9uPbmDzMjgh08RFrsbJyeJwdbPUwvdUNFby7mWiL61EgR Vaz7KkGVZCa3Z3KuVs61qJbh3eJYcMYeagz+gHDMl4wY58kNeK9cF25ut1ONbSwVymKI HG05QC65Y+mWa886kx9RR0resH/uslPghtqC0Cji5nmIOBzPykU3iexx/8MmXRLCENm6 Fg4QrEj3swG1bEn8YLyHttqI85ZrQjU4ARizYbZkjucySkbLaDkBMpE/IKEK6rSPMT6E PknA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Q6pld81rEk8M6z0s/7RgoSzASDqveRDZRZCEU4yv8HI=; b=j73nVBs9cmjG5pS/Iyt4GRDXs3M24ZISGeTryKHhlkPAtpvt0YAFtnCDKaLCVitIJN dBxpH5r1/v35f4hiq9WvRi0U553cmZ2FEzC4u0xO6qgEbNeQ6O0vy/n6o1OwX70IfNZ1 2xS0XLYyygKJ7qPzBYIA6AIZyaP7Yu0hwHv0cNfe+wq67eq4w1xPFzhUjsT+fcIfZHZE /ftkS2KC55DAdb/W8NGIlFkOXLjYwcFdUFKBl/CVbelRyq6W0PUeYy/dWGM3zZY5/2OI ML14Lo7oaz7mQv6reHIM/n3et1lRVhh/K63FBkXK+NYOa+SdSYtUDq/iddDimjETiSwd fsHA== X-Gm-Message-State: APf1xPAmc3vpGii+gZYvo7p/lpTeUukugQtXYWV9hfiq6NG2XfuEC/Z+ dIx8HkgLYiHo1NhSxKYderLZ8A== X-Google-Smtp-Source: AH8x227bqz7NVcOGnU0QpFgAiogcru1mMuJStfWTVZty43asJw7eZJnxD8gRgh6MU43jmVQ7WUfW4A== X-Received: by 10.223.200.74 with SMTP id e10mr7482577wrh.128.1518365292624; Sun, 11 Feb 2018 08:08:12 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id y90sm13528200wrc.24.2018.02.11.08.08.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 08:08:11 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83mv0f1q6t.fsf@gnu.org> Date: Sun, 11 Feb 2018 17:08:10 +0100 Message-ID: <87r2prpl05.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Pierre Neidhardt >> Date: Sun, 11 Feb 2018 10:54:13 +0100 >> >> >> By default, desktop-save-mode will not save (and will set >> desktop-dirname to nil) if a lock file exists with a PID in it. >> >> It's problematic however when Emacs gets killed and does not release the >> lock. Upon next start, desktop-save-mode will refuse to save because >> the lock exists, even though no process is using it. In terms of user >> experience, it's pretty bad considering the error feedback is just one >> line in the *Messages* buffer (I almost never notice it when it happens) >> and the problem is persistent across reboots (the lock file will remain >> as long as the user does not remove it manually). > > When this happens to me, the next time I start Emacs, I'm asked > whether to use the desktop file that appears to be locked, and if I > answer YES, desktop.el goes on to restore the session, no other > questions asked, and saves the desktop upon exit with no problems. > I'm confused as to why you see something different. Could it be that > your activation of desktop-save-mode is somehow different from mine? I always run Emacs daemon. And I think the following excerpt explains it all: (defun desktop-read (&optional dirname) ... (or (null desktop-load-locked-desktop) (daemonp) (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ Using it may cause conflicts. Use it anyway? " owner)))) Not sure why (daemonp) is here. Removing this line would solve the issue. I just realized that `desktop-load-locked-desktop' is also a solution to my problem. >> Furthermore, isn't it strange to just check if there lock file contains >> a number and not actually check if it's an existing PID? > > You are assuming that the locking process runs on the same machine, > but that is not guaranteed. The directory where the desktop file > lives could be mounted via the network, I think. You mean in case two Emacs instances on two separate machines share the same location for `desktop-full-lock-name' over network? I don't know, is there such a use case? I might not see the point. -- Pierre Neidhardt Troubles are like babies; they only grow by nursing. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqAamoACgkQm9z0l6S7 zH+eiwf+JZefk8DglqVrcxYH3Wl8RCRkrJDHgMNKSTmN9na0Lpe0N01LcSBrNV4G 8k4fqLllBS1qmxr0cnH6sOw86mqrAhh91b/dNPqDrzQyhw6Zry2VeOqYMZxyqSkv BtDzWGfyNJZbn1H/tIXmuNTmbeg1PGLJ8lO1acqVCzlTB6XrssIClr9GC0wYdvHk rA2Ujgg7JG2NkOlkrxLynW9EsdxAispkRZIthhHBhqUY/FkuFNnDIFPhsBDiU2wy +9ckbVz6LtGqBugWb2CxMAuQMkAnJHpesffATIyUsE88vk7ti91ZgDoP+jBroXjL mLfU/H7jYl0lPsyQyqJDBVVJnakTSw== =D+ua -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 11:15:12 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 16:15:12 +0000 Received: from localhost ([127.0.0.1]:38512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuHY-0002kB-Dz for submit@debbugs.gnu.org; Sun, 11 Feb 2018 11:15:12 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:33538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuHW-0002jw-7n for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 11:15:10 -0500 Received: by mail-io0-f177.google.com with SMTP id n7so14829344iob.0 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 08:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7RbtvkVFgJxTgvO5JNYokIB4RuzTvE12Ct8TXLvYzsc=; b=nSlXWkK6oJKoL87H2G3x61dNuF+t2608JxPLQf3/fzY9qflcSTT75kgB1XuQoTG2v5 uLETe7OJ4XGkcJTDMH0srPtouMjougSJ+1z6hdel07TQYDO3TiRdeTe5Be97RomRpWMF uDTOmCDk8QfoeA04XkLBcJ9yO3ylGoI6YYNmH7E6qh+QvV9U9j6Z2EGIL676xjdHYDfX LpDNSrjpM/mMHjSxORhUYHX3ayT3VYipWLX3aJ+KHQeqvD/EAf8efquboAbibi23VG3B Leh7e0IMm9AZYC0puTOEH1ckUrR8DjFaukEt3icvMg80TP/kpBRsmWN0apI6G2aNqZ9J b2/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=7RbtvkVFgJxTgvO5JNYokIB4RuzTvE12Ct8TXLvYzsc=; b=m3/DPuE5MEB36G4h2Vyc4mBfic2a0XbUOYuTwX+wlZcCzjBRs3KGdtEqD8nciyv+Uk ht0p5PVM+m5ubR41fsKaDASyovXO/7Xf6xRTOa5afU5Tr2/h6PLoAzWO04RkZSnv+XWV 7bo7vtwdufxT3sxXe1pqNN8w/p5dNzt6I4+6moISzCijI86rPrlYHhWobXzrBPMfNCdh nnO3s/GLBjQv8/jeoyg7dixvvsQQ6DXlR4FxhXCS4tHu3LuFwqphlotM/JCAaoiUOUCm SZ5OqP3XokMk4actDWTNgIUxtGer/3bvpfRH+NGJaF03EmK5U3vO7N6lNaunk300YRWz pKLw== X-Gm-Message-State: APf1xPCuk6T9HmZBBgVROM3vNDdxlCk1NnJ69SB3S6X1UzDFhIum2leT RpsgfOJwLwlYEDthvGzHK/jvvQ== X-Google-Smtp-Source: AH8x224/lJn6L+ybPEElr6noQcE88LZyZOU3dJfBUv3QLVMsjAaFnLr+j3UorOGrYZWI+9XVpJkOyA== X-Received: by 10.107.159.74 with SMTP id i71mr9802886ioe.300.1518365704550; Sun, 11 Feb 2018 08:15:04 -0800 (PST) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id b69sm9521411ioa.65.2018.02.11.08.15.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 08:15:03 -0800 (PST) From: Noam Postavsky To: Pierre Neidhardt Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> Date: Sun, 11 Feb 2018 11:15:02 -0500 In-Reply-To: <87r2prpl05.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 11 Feb 2018 17:08:10 +0100") Message-ID: <87zi4fa4ft.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 30421 Cc: Eli Zaretskii , 30421@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Pierre Neidhardt writes: > I always run Emacs daemon. And I think the following excerpt explains > it all: > > (defun desktop-read (&optional dirname) > ... > (or (null desktop-load-locked-desktop) > (daemonp) > (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ > Using it may cause conflicts. Use it anyway? " owner)))) > > Not sure why (daemonp) is here. Removing this line would solve the issue. 'git blame' brings me to Bug#11674 "desktop doesn't handle unclean restart under daemon mode". https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11674 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 11:32:38 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 16:32:38 +0000 Received: from localhost ([127.0.0.1]:38525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuYQ-0003A8-4Y for submit@debbugs.gnu.org; Sun, 11 Feb 2018 11:32:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuYO-00039v-4B for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 11:32:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekuYD-00076V-SQ for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 11:32:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekuYD-00076F-Mp; Sun, 11 Feb 2018 11:32:25 -0500 Received: from [176.228.60.248] (port=1072 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekuYC-0002jM-VO; Sun, 11 Feb 2018 11:32:25 -0500 Date: Sun, 11 Feb 2018 18:32:11 +0200 Message-Id: <838tbz1o8k.fsf@gnu.org> From: Eli Zaretskii To: Noam Postavsky In-reply-to: <87zi4fa4ft.fsf@users.sourceforge.net> (message from Noam Postavsky on Sun, 11 Feb 2018 11:15:02 -0500) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, ambrevar@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Noam Postavsky > Cc: Eli Zaretskii , 30421@debbugs.gnu.org > Date: Sun, 11 Feb 2018 11:15:02 -0500 > > Pierre Neidhardt writes: > > > I always run Emacs daemon. And I think the following excerpt explains > > it all: > > > > (defun desktop-read (&optional dirname) > > ... > > (or (null desktop-load-locked-desktop) > > (daemonp) > > (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ > > Using it may cause conflicts. Use it anyway? " owner)))) > > > > Not sure why (daemonp) is here. Removing this line would solve the issue. > > 'git blame' brings me to Bug#11674 "desktop doesn't handle unclean > restart under daemon mode". > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11674 Indeed: daemon cannot usefully ask this question. So I think desktop-load-locked-desktop is indeed the right solution to this situation. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 11:57:39 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 16:57:39 +0000 Received: from localhost ([127.0.0.1]:38533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuwd-0003iJ-IQ for submit@debbugs.gnu.org; Sun, 11 Feb 2018 11:57:39 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:40059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekuwb-0003i7-U0 for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 11:57:38 -0500 Received: by mail-wm0-f44.google.com with SMTP id v123so5793367wmd.5 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 08:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=addFRK3eY0EvOYerF/mOsin41zXX2axlLLbnCviLFCc=; b=E4LrFhOyuALt6A+YJJqOOzp14tQVi1lLQZf7z5bsVWxMKyRiHryuIGPRqBUEeMr173 hOj4heDyN+gd7DbbSYX0DcisBuaRYknXaCTWOy5CxvUI4PieZ4QmdmknzCc3UUt9HkjX +EuB9UJP10J546FUFqBUYcF3Mctzj0pteqxds48/+DfrK4gFX3SlFAEJZ7jgPvG41MPJ mYzTSeUcyQhBu1Tj2r7TsDs1jWE0wW7sc6rGbEMmYyqFnBdpDCjIAn6ublAu3S0DBkQk Y3K5RghBZR3UbBPi1KrNdqij37D4z/UNpTwxDvVg4lYZHnPkd3s6/lLVDAitSjegz7Po 47vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=addFRK3eY0EvOYerF/mOsin41zXX2axlLLbnCviLFCc=; b=AINEYpRmqZJuzRNWrxnTSwEqdgA7A+Ydoo2jyxI5136ebl9bvcUl4eM9qNq2dJQd0x rPdk9dwcJCatoxIhG3t3/Dsp42Djk1nJjuSJeAfP027DmyYk59nQOQW/21+saR5BhDj9 XavLLW9v/D5vxlLIsMdCDPK/R5OfBldsR6v0nCr/3anujXvmENszFDuIT2rmhmWyeF7B afFiAZ4VGCdvut5IBZsY3Ax7ZPkQTJJa4xYvx87BOrRg70OC2Q2Rf7QvzZtYxRHi+oEA wFSwBAj/2w5wEbcVbJf5u+zjTWy3XE/EBDzb6rG+PI9GfMDHIkv+RRqt2CMfX/HhktuA zjpQ== X-Gm-Message-State: APf1xPCxeutmAIo6hG/jJ2sQGrZ8fTEvQjU/7HXM5v1+PuCN81QDuaPw uAmZ4WvZKoXoxBmSrPf4fW05aA== X-Google-Smtp-Source: AH8x226O/CXN/Zew3om6lt/6s/ZZXRWrF6+z2MwnPdwgpOKLab9gAelEJjb5pF7rU3Hm59ifqDhMsw== X-Received: by 10.28.236.157 with SMTP id h29mr1738610wmi.160.1518368251959; Sun, 11 Feb 2018 08:57:31 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id 5sm7559587wre.35.2018.02.11.08.57.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 08:57:31 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <838tbz1o8k.fsf@gnu.org> Date: Sun, 11 Feb 2018 17:57:29 +0100 Message-ID: <87mv0f5urq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, Noam Postavsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Setting `desktop-load-locked-desktop' works _only if_ I know there is no other emacs (daemon or not) owning the lock. We still have a conflict=20 otherwise. Hence my suggested patch. It won't work in the scenario Eli mentioned, but I'm not sure how relevant that is. Isn't better than than generating conflict with local instance of Emacs? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqAdfkACgkQm9z0l6S7 zH+diAf+LaV1y537VgYdQ332lYEhyfP70Oyr2rdk/3yRD3+FuBuvZDlavtc9P2A9 6ZJd9j8YeAyA6UDP4/bgBC0gCce0Ey3iOiFckrQk+ngdll2sqsQ3wPzZJNz+NlV1 zaZdBLyX4naoTR3PReUC4tSGDcF0o8fPk69If8hhJhdVKijudsda5eBKOvfwU/gJ LBNZkmjfN2KcsgV1VoYXb5Ss6RgSBhlu5XW1tJgXRfHXKJ0/tjDfaoV0B1KU+sXH oZ1qwPuQrKqBAKNLcJfgh9qf8Oi0G1CgEqB8CG9h3Ayu7WbDR+OiTNztO4I5iv20 TJ3n6PqcpzEtHPsHh1Nb9GnOs2M+aQ== =/1Sn -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 12:18:26 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 17:18:26 +0000 Received: from localhost ([127.0.0.1]:38547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvGj-0004Ci-RG for submit@debbugs.gnu.org; Sun, 11 Feb 2018 12:18:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvGi-0004CV-8d for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 12:18:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekvGa-000273-7A for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 12:18:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekvGa-00026z-3Q; Sun, 11 Feb 2018 12:18:16 -0500 Received: from [176.228.60.248] (port=1206 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekvGZ-0000aa-Fe; Sun, 11 Feb 2018 12:18:15 -0500 Date: Sun, 11 Feb 2018 19:18:01 +0200 Message-Id: <837erj1m46.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87mv0f5urq.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 11 Feb 2018 17:57:29 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: Noam Postavsky , 30421@debbugs.gnu.org > Date: Sun, 11 Feb 2018 17:57:29 +0100 > > Setting `desktop-load-locked-desktop' works _only if_ I know there is no > other emacs (daemon or not) owning the lock. We still have a conflict > otherwise. > > Hence my suggested patch. > > It won't work in the scenario Eli mentioned, but I'm not sure how > relevant that is. Isn't better than than generating conflict with local > instance of Emacs? No, I don't think so. Why cannot you simply delete the lock file? After all, a crashing Emacs should be a somewhat rare phenomenon... Alternatively, don't read desktop until the first client connects, i.e. do that in a after-make-frame-functions hook. Reading desktop in daemon mode is problematic for other reasons as well: e.g., GUI frames cannot be created and GUI features cannot be turned on. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 12:23:59 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 17:23:59 +0000 Received: from localhost ([127.0.0.1]:38551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvM7-0004KX-F2 for submit@debbugs.gnu.org; Sun, 11 Feb 2018 12:23:59 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvM5-0004KJ-1F for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 12:23:57 -0500 Received: by mail-wm0-f52.google.com with SMTP id v71so5887110wmv.2 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 09:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=RQFAQgxBJQdasVFue+eZhcWFyQuzCDrDK3yjpQIQgqY=; b=rvEZ5UMr8Xcq4xECPZgRP6boYmsrRxlb0vL6MirXVDsOwXMbc4G3NwNVzKdmsl4MPs XjI0/DUHE1JizzbTfZxX6FMIkEQrxrD4IZh8ZFQiawPs7joWBiQ7BrrYH4LCP/QVBwjb GvbFrXeQ4YP6ElBPpj748skbqFjUSRt6y6opTw7fKX9LnP4zGkjg9tkcBPI7XzTFrnrh 6Spr+PyKZjNtlm22faUX3XY4hCJUKPFlFSbXzlW0c2mXzkU7plQujlOAgMpUm/02LkTb CuWUm5mCHQ2JgTxTIKmhPYl2651MBpRbLMqhl13RHVQLuJQ8zLO5zqJiOrpZk2eqKiiO 7L8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=RQFAQgxBJQdasVFue+eZhcWFyQuzCDrDK3yjpQIQgqY=; b=oZo1+yIte9HhXErqaKrr9ibsn0WwERXsIauONwntpINz0e7ON0VrkuRey7WSGFe8g9 JOytQ0sarDjYO+33J6G1dszqSY1LD8ebKkZQAmtEMSZXlRb9Q6GUSZPKKbYLzUYjDH+C uWEUSSA7bl/d2mNJkDdoEItvO+YiiWlM3ELDSnD0nWUUg5ZaL/NIgCQmEEi4svMSUuGw Sbfdw+/HcSJHBcDzhlWQ0jcRkxIo3ndVliQtmWK2/Te9NvqkOSnZto6AYYmczVluSllY WV8PGkbUjvhmupkaJZKN1VUTWiLQ3QrCVY5TpsCn3a7pVYVhSIVFp2U2oDV8ftVeYgiH ZYAg== X-Gm-Message-State: APf1xPB735DzTr2iea0ECt9TqVzXU46+0VdFpPqfNFzH1aG4rZhYbl1J RcRqcdTMNrb4cfx+qL0llQe7bg== X-Google-Smtp-Source: AH8x2274HabbzJGGx6dwMLmF+mUsCYEdbV6ZrxhOdxItxNq1AXG3aldAgN+g+anRiFWKov1rO1kS7Q== X-Received: by 10.28.203.142 with SMTP id b136mr1758652wmg.127.1518369831007; Sun, 11 Feb 2018 09:23:51 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id t2sm3069084wrg.59.2018.02.11.09.23.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 09:23:50 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <837erj1m46.fsf@gnu.org> Date: Sun, 11 Feb 2018 18:23:49 +0100 Message-ID: <87k1vj5tju.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain > Alternatively, don't read desktop until the first client connects, > i.e. do that in a after-make-frame-functions hook. Reading desktop in > daemon mode is problematic for other reasons as well: e.g., GUI frames > cannot be created and GUI features cannot be turned on. That's an excellent suggestions. You are right, it has been troublesome more than a few times. I think both we should mention this in the manual together with `desktop-load-locked-desktop'. Thank you! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqAfCUACgkQm9z0l6S7 zH/jGQgAoH+z5X4rFqwlFoeVgFBGW+ppgzx13YbsiqEUUM7I1jIP+8DL255DQWsW yOFZZA3tv4aW1yQozMVIsEf3UhCosJLYtco0X/PSD5gjTkcWOIcHw660VPCTakPE 0lRH52VG0rEwgvkEoAGjxeYAcb2E7ICaZwNMEG0HHBmuVThqt32gy2AdGgja55ia 1J+uTjUIzrL/h8XU1lDQSLhsGvNw5znBOE/OdpxXgDhNBTBlTjM6bAOiJb3KBiWb dN4WoOJstj1TMIwsGkHPRtpQpYV8bL1B/+TuqG0mlr+J8tJmfCiKOvlj16ixWeFW bhx1FB+4DaSKsQtkre9co5wtr08HTQ== =Lhao -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 13:00:52 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 18:00:52 +0000 Received: from localhost ([127.0.0.1]:38582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvvo-0005Di-AL for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:00:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekvvm-0005DM-1I for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 13:00:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekvve-0003WZ-2j for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 13:00:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekvvd-0003Vv-Rx; Sun, 11 Feb 2018 13:00:41 -0500 Received: from [176.228.60.248] (port=1417 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekvvd-0001jf-2c; Sun, 11 Feb 2018 13:00:41 -0500 Date: Sun, 11 Feb 2018 20:00:26 +0200 Message-Id: <834lmn1k5h.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87k1vj5tju.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 11 Feb 2018 18:23:49 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > Date: Sun, 11 Feb 2018 18:23:49 +0100 > > > Alternatively, don't read desktop until the first client connects, > > i.e. do that in a after-make-frame-functions hook. Reading desktop in > > daemon mode is problematic for other reasons as well: e.g., GUI frames > > cannot be created and GUI features cannot be turned on. > > That's an excellent suggestions. You are right, it has been troublesome > more than a few times. I think both we should mention this in the > manual together with `desktop-load-locked-desktop'. Done. > Thank you! You are welcome. is it okay to close this bug now? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 13:41:33 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 18:41:33 +0000 Received: from localhost ([127.0.0.1]:38611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwZA-00068y-Rz for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:41:33 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:33421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwZ9-00068l-A7 for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 13:41:31 -0500 Received: by mail-wm0-f42.google.com with SMTP id x4so5801416wmc.0 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 10:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=xzGKX+ttNIrUe8MUL/aHIUmIV4n7uqQUAWjhNBf/A7Y=; b=c42RW9lgzknP2pbmeoVrH7RmtroDhuDMCZL3J1okTeLruWRlcu2rnyuecsOFGknM85 ttZ2WJQRg0f/DnkihtM4UpJZcXYDqJEbkmOKZqGQ7Zmb5ugPXcjQQ0nVCSfq0drWh2sg bBdEUiiiAJ8gjogDJHMKQo9NNgyYaEKzePO94MipR70XiFyl+J8/TP4OgQfA9uvN/gfJ UxcQlWE/OesYzQS+P5JblvcoRRh7lN4AuzV0669flY3kUIKt+ip7Pjvlsu3WOezueCxS uh8zMoTHig9fuCOzuowX03QDF84khLnh6dWcQL8kuQX8DbbHREtbd8+pvcGf0O2nw/1N Cxrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=xzGKX+ttNIrUe8MUL/aHIUmIV4n7uqQUAWjhNBf/A7Y=; b=o0MRLJ3tzGE0F6t5vaU9SEwv/ihTsX1n3ruA7RPD/psXJ6eiKSlpvtynBQs6mhVL0l vyrPFXGaQr77LdgkjJv0V3Nf6YuAlXnhsrf+863aV4Ntq2jVCY486TBtaGBXs/ORnCDS wnXXFcsFKGix3G2LissayycXcg0Nbj9I9MsuIBPfuP+dKVWrpfWs5O0kqBXBsHICzb7s Q31+nrBgP3FbS2mwzg+SI8IfZRgxVAUuCKYz/9j9ejoxE4VZZBRRvTXTMdYoqB7OvyD6 eaL5nnWNamrceZKQwmRPzkaICJezYAQ29leda4o4/prFDR6T2LDFy/W7KOk7PW1c+TlG dc9g== X-Gm-Message-State: APf1xPACnvL6LcKIxLH037oA7MzMDctSSwVeUYE/kPBZ8TGZQ666fmoh mx16p5AXJ1jnCfLPBbqOsWDd70fb X-Google-Smtp-Source: AH8x227wpl6ScM/NBt+f27+B86WyWhxPIjgHCNi2nRc4V/vLLHDoN495u+CzNk9Fjp8uruT1ZUJ6OQ== X-Received: by 10.28.37.5 with SMTP id l5mr1800575wml.133.1518374485301; Sun, 11 Feb 2018 10:41:25 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id q81sm8717800wmd.3.2018.02.11.10.41.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 10:41:24 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <834lmn1k5h.fsf@gnu.org> Date: Sun, 11 Feb 2018 19:41:22 +0100 Message-ID: <876073e5d9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain One last question :) Is this the right way to initialize desktop-mode after frames are made then? (defun desktop-init (_frame) (desktop-save-mode) (desktop-read) 0) (add-hook 'after-make-frame-functions 'desktop-init) It seems that those functions are expected to return a number, hence the 0. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqAjlIACgkQm9z0l6S7 zH8zvAf+PUDHFnTuuVgwXRJ1tyN6u0SsyUnKoMZahtXSt3MWcqiCJ+Ls+yh9tjvu JREoMxVyIYoGEhZ7qF5cCHKv0GxkOPOsO0B6zpIwxlfsyfSfEIOENfzV1JAe9vsG urh1ytJBdM45G2rF+P29NQHx4aAjSvWZAYfLqSyoR95jxcu38BylO4LeF7wUBX/8 nz1+1GTQaxJ0teWpYAKwtagPsXO21aIgw7TydE8vcGYpKL8kZJP60L1/m+EjXryC z9+SUDv0I7G948i36fgkfW8z8KmyXDRbAj1j/BJ88OTyZb1x2itVM2JRQwTy7i+E PpsR/d4JpmC+H18SGVGZjB8QRsBbyg== =oGjX -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 13:55:21 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 18:55:21 +0000 Received: from localhost ([127.0.0.1]:38619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwmX-0006S0-Dk for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:55:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwmV-0006Rk-HO for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 13:55:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekwmM-0002Hc-5e for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 13:55:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekwmM-0002HM-1U; Sun, 11 Feb 2018 13:55:10 -0500 Received: from [176.228.60.248] (port=1666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ekwmL-00066W-Cl; Sun, 11 Feb 2018 13:55:09 -0500 Date: Sun, 11 Feb 2018 20:54:55 +0200 Message-Id: <83wozjz79c.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <876073e5d9.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 11 Feb 2018 19:41:22 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > Date: Sun, 11 Feb 2018 19:41:22 +0100 > > One last question :) Is this the right way to initialize desktop-mode > after frames are made then? > > (defun desktop-init (_frame) > (desktop-save-mode) > (desktop-read) > 0) > (add-hook 'after-make-frame-functions 'desktop-init) Yes, I think so. Although you may wish doing this only once, not after each frame creation (in which case, you should make the function remove itself from the hook variable). > It seems that those functions are expected to return a number, hence the 0. Hmm... where did you see that they are expected to return a number? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 14:02:00 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 19:02:00 +0000 Received: from localhost ([127.0.0.1]:38624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwsy-0006bz-54 for submit@debbugs.gnu.org; Sun, 11 Feb 2018 14:02:00 -0500 Received: from mail-wr0-f173.google.com ([209.85.128.173]:46980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekwsx-0006bn-5w for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 14:01:59 -0500 Received: by mail-wr0-f173.google.com with SMTP id 34so2852700wre.13 for <30421@debbugs.gnu.org>; Sun, 11 Feb 2018 11:01:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=t+holEOJw9vijRWgPepNCZeXopqAsRhTvA/CuQf3+kk=; b=BTCdXrRqnhZ4wXzTfexM41uBrj8RhG89Q12CK/VS1VK/XsSdfZLsHDr/ruidUPskmY LqZHIrwR1KyaPLmU16Kz1Dz4HqtbVvn0OsVh5Za3d9/cHGLmi1MqvZPaI/D25f4LSKQV cVvScOSbLbm8FlOK8y1EoLkkF0vazt22iXwRQC3Gjn6G+p5aF1t+z49uIraCyJAP8ROq nj1pI3679fYo8qxd35dHjg/owMzZKsUDyBpa0MU4Txqa7ubUnCjpAFJRZ0GDHZkd5t/E OYEM9/vVtBgFldbIjxsPtn1Sgg/HacCO495Et2zscaBz1PpZB3czqbvjXqRoaorH6DUp Ql8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=t+holEOJw9vijRWgPepNCZeXopqAsRhTvA/CuQf3+kk=; b=Wrmtx2/TJ3ueTqSQ5CvFgMoDjGNCSXWKEQZ8HHGsvJnP/esnxWGSdwRHi1xElf/XwD +5KZyjqA2xz9oSJGia2vUaq+1rhhCKNkLzwHgp+5rX6RNTGdRs38iWeuawUeJK8gN3pe eozscKSaUYYmqk+0B1nNLpTf2jxjCgV3g6GHycJ1hnf6LD99QDAb1L4BpVZG15GQPxq2 gpWOfs0RmjnCj8Q51BQJrEp0tQF9pCcsp7pVczC8V26FnRGIAUejJnwHwGECaPMb1/gS saxgfcWWFGynhTEjStLWw/wL9UntClVF63yH1XtMLW1h75M1FHHJ7kBhIiW3rZcV3bR1 H12g== X-Gm-Message-State: APf1xPAsp6bsV1GWBu2MosQ1bCDLzMjEwpP8N+TglA2BbmCnjazZ1US8 uJpha7c9+rrIyt8wiWYYZD1Ce7sq X-Google-Smtp-Source: AH8x225mVZZ2gYAPYiS3rUH3rXtUTnZi39sNTixgxJo/MlPVsKAChMASg+DnBYofP87xqX8LNtqQ7g== X-Received: by 10.223.152.193 with SMTP id w59mr7043123wrb.74.1518375713199; Sun, 11 Feb 2018 11:01:53 -0800 (PST) Received: from mimimi (2a01cb040a37a0003a915b0581181238.ipv6.abo.wanadoo.fr. [2a01:cb04:a37:a000:3a91:5b05:8118:1238]) by smtp.gmail.com with ESMTPSA id k13sm6089010wrd.61.2018.02.11.11.01.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 11:01:52 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83wozjz79c.fsf@gnu.org> Date: Sun, 11 Feb 2018 20:01:51 +0100 Message-ID: <87bmgv2vvk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain >> (defun desktop-init (_frame) >> (desktop-save-mode) >> (desktop-read) >> 0) >> (add-hook 'after-make-frame-functions 'desktop-init) > > Yes, I think so. Although you may wish doing this only once, not > after each frame creation (in which case, you should make the function > remove itself from the hook variable). Good point. >> It seems that those functions are expected to return a number, hence the 0. > > Hmm... where did you see that they are expected to return a number? Forget it, I had an error I cannot reproduce, must have been something else. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqAkx8ACgkQm9z0l6S7 zH8iCwgAqyR5QixORicaNOMVyXZt5Tnq6jVHUh5obqr9GtenUp7XqC2PHaYVfDq6 HBpHK5l/TcipzkYFMgyx+kE/iE8Yx9rKM1LX/3ogYXgIPfVvRkLCjKNUXP+GfPg9 V6Z3xmFkjytzq29mhTZHIOXDuoV00RyNEepbN/b3xAOWXwH/zMDefJ+PGtxqJaiY cFaCwvIHEXHAIekM/OCp+GA3Ram5xbaUv2TfJOg8ELB2gGSx9QqungkmMOFMUAdA wb3cycJARq3hXwpAyXr1r0jESoQLAqM61ixoyu6iBNL/CRgHn4JxlREjHI0isE/N ql6jlsh9xuiyR8P/FBA1g3ib6Trk2g== =QRvR -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 15:40:26 2018 Received: (at 30421) by debbugs.gnu.org; 11 Feb 2018 20:40:26 +0000 Received: from localhost ([127.0.0.1]:38638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekyQD-0000Jo-C5 for submit@debbugs.gnu.org; Sun, 11 Feb 2018 15:40:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekyQB-0000JY-4k for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 15:40:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekyQ4-0007C5-OO for 30421@debbugs.gnu.org; Sun, 11 Feb 2018 15:40:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekyQ1-000793-SI; Sun, 11 Feb 2018 15:40:13 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ekyQ1-0007GE-3P; Sun, 11 Feb 2018 15:40:13 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Pierre Neidhardt In-reply-to: <871shram2i.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 11 Feb 2018 10:54:13 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> Message-Id: Date: Sun, 11 Feb 2018 15:40:13 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > It's problematic however when Emacs gets killed and does not release the > lock. Upon next start, desktop-save-mode will refuse to save because > the lock exists, even though no process is using it. Does the same issue exist in VC? -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) Skype: No way! See https://stallman.org/skype.html. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 17:56:27 2018 Received: (at 30421) by debbugs.gnu.org; 15 Feb 2018 22:56:27 +0000 Received: from localhost ([127.0.0.1]:45308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emSS3-0003b3-E9 for submit@debbugs.gnu.org; Thu, 15 Feb 2018 17:56:27 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:40936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emSS1-0003ao-SX for 30421@debbugs.gnu.org; Thu, 15 Feb 2018 17:56:26 -0500 Received: by mail-wm0-f67.google.com with SMTP id v10so67260wmh.5 for <30421@debbugs.gnu.org>; Thu, 15 Feb 2018 14:56:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=0402hZfMGdc+7DhHnapXBttp4Q1J23LXtJ8MO9FY6jU=; b=prVpI/H9GsHCCCrrZNruaVzmnOF7Si/fAfhOiEKhZei7OhbFX01rDMomi3Ry4RXImi njSUmcy+D4TK0U2hTb0Z+/3pYJTwRav964AO2bHKmFKSP0lPpyNQL9IRoQiZFjlkzFC6 /EoIEfPGDVQ7sgePVelrnOJB2jRmYIGN0Z0a+ZjfWk5Ad2WvzLZexICknqN+dBECa/Q3 aZBM25UdP1+lHS5zLyFE+57PSvvFPvzRg7a0uF+O+6OSAJur377UsjzRobhe7FSfqTmN zhk/7S7/Aza8mhnbv/kbjLEUzCbiXMPlZH472SyCD3f1zz+f1OIubVF3MHHnjGc0YTMm MB/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=0402hZfMGdc+7DhHnapXBttp4Q1J23LXtJ8MO9FY6jU=; b=VyGL8hNnaryGKVSd0G5OZ0EVYd1+zB/U1gK61CntaIa396hrpAsM0cQ/OPUMI5zFgD AXAU51nNd/HVlB1N/azj/GoUXC7NfNMWhcI1EFzGV/hVpYV9p8Emug4F4QWmZyGiDWTD 8rZDteXxkTOeGqwuK9f/NARaDVe4moWoVDeDYOIgICtpCYGRDuaH/l5VPtygSAa5L0L6 S+JBsag2PIt0oWaPs1hRMo+m/dNR17C0cz5aXE+B2/TIn2mx43B1fssvqSeEb90MQb5g QOgQ1hvPn3TMMlbFeEW1AJBKxXuHj4meC//4k8k/ULZfj87ol5KLphVxxAmPf2IGqeCL Yt3w== X-Gm-Message-State: APf1xPCtMNqLDU/l8i4IUzPA0X3xGOnbXDK0cCYLPsLkqD9y1m7NZl8v vo6hsZoehkzAzsFg7mw9wgsN4p53Sho= X-Google-Smtp-Source: AH8x224GbziO+vq6/63O5Jj2MZPSf6rKl0GchQc78WVOF6Vw/ssrncaxjgVIiY9gz8Vn8naBeU3Bpg== X-Received: by 10.80.183.170 with SMTP id h39mr5497762ede.124.1518735379582; Thu, 15 Feb 2018 14:56:19 -0800 (PST) Received: from mimimi (18.160.3.93.rev.sfr.net. [93.3.160.18]) by smtp.gmail.com with ESMTPSA id y29sm4599541edl.54.2018.02.15.14.56.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 14:56:18 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> User-agent: mu4e 1.0; emacs 25.3.1 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <87bmgv2vvk.fsf@gmail.com> Date: Thu, 15 Feb 2018 23:56:17 +0100 Message-ID: <87o9kpn9pq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Actually... Deferring the loading of desktop-mode to after-make-frame cannot work (unless I'm missing the point): if (and owner (memq desktop-load-locked-desktop '(nil ask)) (or (null desktop-load-locked-desktop) (daemonp) (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ Using it may cause conflicts. Use it anyway? " owner))))) `(deamonp)` will still be true... I could set `desktop-load-locked-desktop' to `t' but then I'm assuming I'll always be the only desktop-mode client on this machine... I don't like that. What about changing `(daemonp)' to some predicate checking if there is a frame conencted? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqGEBEACgkQm9z0l6S7 zH9ZwQgAk7v04skyCcGEkz0IsQXdom815WilIjSMO/hG0HE8mJKJAiEJv1tw6nV1 HrOkt7GGhfITRTARwSiJd2W3+v8qiLYByyYxfNKIqaof35n//xLLp6RXPT5Lgi6N XjKelurxlJ0iv1/dgJzvNIIxUIKHZqkuicoYBQu5m77e31yu7VptoO1U7BIGdJ8H YJu299yPp/1ivQSrmTkJzcSnTlQP981x83+f5dNXqotk5KOEUWGYdAlvWAW2hSF0 UnOWchfCo7XWUbYTXX8zR3KC91xgaqgay+2dVct2n1P9Byh3wLYjFY3//mCQRSmq Z+KDWAKRS1aZp0polh9FAL5t5s1VXg== =0Okp -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 16 03:11:19 2018 Received: (at 30421) by debbugs.gnu.org; 16 Feb 2018 08:11:19 +0000 Received: from localhost ([127.0.0.1]:45576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emb71-00045H-Hj for submit@debbugs.gnu.org; Fri, 16 Feb 2018 03:11:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emb70-000451-0h for 30421@debbugs.gnu.org; Fri, 16 Feb 2018 03:11:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emb6p-0000Ph-RX for 30421@debbugs.gnu.org; Fri, 16 Feb 2018 03:11:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emb6p-0000PX-Nc; Fri, 16 Feb 2018 03:11:07 -0500 Received: from [176.228.60.248] (port=1656 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1emb6p-0000Cs-1v; Fri, 16 Feb 2018 03:11:07 -0500 Date: Fri, 16 Feb 2018 10:11:06 +0200 Message-Id: <83po55e4md.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87o9kpn9pq.fsf@gmail.com> (message from Pierre Neidhardt on Thu, 15 Feb 2018 23:56:17 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > Date: Thu, 15 Feb 2018 23:56:17 +0100 > > if (and owner > (memq desktop-load-locked-desktop '(nil ask)) > (or (null desktop-load-locked-desktop) > (daemonp) > (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ Using it may cause conflicts. Use it anyway? " owner))))) > > `(deamonp)` will still be true... > > I could set `desktop-load-locked-desktop' to `t' > but then I'm assuming I'll always be the only desktop-mode client on > this machine... I don't like that. > > What about changing `(daemonp)' to some predicate checking if there is a > frame conencted? Something like that, but: . it has to be _in_addition_to_ daemonp check, i.e. the predicate should only be called in a daemon session . it should test for an existence of a client frames, not just _any_ frames, because, perhaps surprisingly, a daemon session does have a frame, it just isn't displayed (and is not a GUI frame) Patches to that effect are welcome. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 16 17:59:02 2018 Received: (at 30421) by debbugs.gnu.org; 16 Feb 2018 22:59:02 +0000 Received: from localhost ([127.0.0.1]:47320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emoy6-0000S4-CI for submit@debbugs.gnu.org; Fri, 16 Feb 2018 17:59:02 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:50827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emoy5-0000Ra-4r for 30421@debbugs.gnu.org; Fri, 16 Feb 2018 17:59:01 -0500 Received: by mail-wm0-f43.google.com with SMTP id k87so5732690wmi.0 for <30421@debbugs.gnu.org>; Fri, 16 Feb 2018 14:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=T8ElL9XEi1ep7cuiT9rUbO13YvWzeeJeyUQ0v8bgczI=; b=JOgf7zE7WmrltqTTjuxoA04FL6K+OUThXoQ/r2Gk13nSfJCjpfS62PzB7HSKl7cFwi Kk/Wh2JtfIIPZacVbJJ8ZecLw/AdeXrvDLlTDRnKAJa0h2BtU7e4q5TMdGvwKv6+0wG9 ZrDrLzmf1CsUa3X2fBg2C4slJW66DoYGcsWFutAzrz7NxQBMymcgpq8FwU3P9K+6Pw85 jTMsTtxNVzlzXajfbeAMAGbFZqBy7hS/VLgr+8i3td+h0w5FI2rFarGfc6hnlQmkEmez rpXaEEmH2X+/Nog7tBnyXSy1XeyGj0ADTOa5e+Smdvvi9VowegQETrfUWiP5+so2zl0+ cAjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=T8ElL9XEi1ep7cuiT9rUbO13YvWzeeJeyUQ0v8bgczI=; b=nunzETr/jrO2+RnUqXz054QDKijZXkTzJz6h3q603u/rXT3rhU/J5ZfrpZNqJ8UYXq uhv9GBT63+Wb4efx4tofoQQuPFGTRetVYFqElSq5cxzBcvw4LoWhd5ffq5pozZJ0yP0y 0S3CLYUcwiVfBqnGLeFGrJahPE3z7LxD4AFHmAdyWYrTEexe5+xCgVIacPknzdThqu2e LkBNWZfWYUpv6ir6q0U3xcIBzvtX2h/GGSoEAzuKAcu2v5uAKDgfBSzRT3Kk4vKU0ZOf yYXbirC608CYUdFop41amMzXW/oRRYWRFwac3NX29ZAPGXDSnZCD8UOeRA3RBB7GGtTv TA4A== X-Gm-Message-State: APf1xPDfYeVhE9I/eXa2JxBRWOdKAvGP7hSe4ml4PgrGSd8bcoEMufQI q5+vc6qhM1B59sMKL1zvxKUCyxXb X-Google-Smtp-Source: AH8x224ehOiiXcU3g2AwAy1wz8rX1kUIgCA2iTsVBcNLidv+iEPMFzWg9ZSBky9qukocZQ2fa1J9NQ== X-Received: by 10.28.11.147 with SMTP id 141mr5691557wml.138.1518821935028; Fri, 16 Feb 2018 14:58:55 -0800 (PST) Received: from mimimi (18.160.3.93.rev.sfr.net. [93.3.160.18]) by smtp.gmail.com with ESMTPSA id 62sm21099216wml.24.2018.02.16.14.58.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 14:58:54 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83po55e4md.fsf@gnu.org> Date: Fri, 16 Feb 2018 23:58:52 +0100 Message-ID: <87r2pkilsj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain I tried patching with -(daemonp) +(and (daemonp) (= (length (visible-frame-list)) 1)) Then I killed the daemon, leaving a .lock behind. On restart: - In a tty, I get a black screen with a blinking cursor on the bottom left corner. If I press 'y', it proceeds with loading the desktop file. I can verify that from the *Messages* buffer. - With EXWM, I get a black screen, but 'y' does not work. So it's effectively stuck. I'm thinking that maybe `after-make-frame-functions' are run too early, before the frame is fully ready. Then I re-considered Eli's last remark: the daemon already has a frame, so I thought maybe we should also guard the hook with a check on the frames count: (defun ambrevar/desktop-init (_frame) (when (> (length (visible-frame-list)) 1) (desktop-save-mode) (desktop-read) (remove-hook 'after-make-frame-functions 'ambrevar/desktop-init))) That did not change anything. Any clue? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqHYiwACgkQm9z0l6S7 zH/w0wgAnxCE0sosAZ6luGpcBtbpEGJVeUFARuJ+9Xxp2P3PijgfN75qKlNrNLaJ 8JA1K+7PTpdCFPnRcr/u7sZ993cSJ59z7DvHZtG6674ISg5gSZuenOQyYjS2lz/W U4+5DqHnaOpmQQYoUodijlBMijPPwn0q72xBBDGmiY5b1OUczG+o7UuakzutCiDq Ci8rQhvaKba3sI1cPt9+X3GxwNY/vctenpVXzgLe4DoYFt5t6QWdnlb20+n7O5OX zDyiro+/JdBWh8mbrYQ3V1rtJJmpCWyK5+mQeQOZXu0AUL0681QgiL+7m0j9jhRQ XtIUYPTEAmglhcB6rdJmuCQxkWS/qQ== =L11s -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 02:43:52 2018 Received: (at 30421) by debbugs.gnu.org; 17 Feb 2018 07:43:52 +0000 Received: from localhost ([127.0.0.1]:47446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emx9z-00029I-TK for submit@debbugs.gnu.org; Sat, 17 Feb 2018 02:43:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emx9x-000290-O9 for 30421@debbugs.gnu.org; Sat, 17 Feb 2018 02:43:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emx9p-00038O-GK for 30421@debbugs.gnu.org; Sat, 17 Feb 2018 02:43:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emx9p-00038G-CT; Sat, 17 Feb 2018 02:43:41 -0500 Received: from [176.228.60.248] (port=3157 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1emx9o-0004fy-P3; Sat, 17 Feb 2018 02:43:41 -0500 Date: Sat, 17 Feb 2018 09:43:41 +0200 Message-Id: <83fu60cb82.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87r2pkilsj.fsf@gmail.com> (message from Pierre Neidhardt on Fri, 16 Feb 2018 23:58:52 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > Date: Fri, 16 Feb 2018 23:58:52 +0100 > > I tried patching with > > -(daemonp) > +(and (daemonp) (= (length (visible-frame-list)) 1)) > > Then I killed the daemon, leaving a .lock behind. > On restart: > > - In a tty, I get a black screen with a blinking cursor on the bottom left > corner. > If I press 'y', it proceeds with loading the desktop file. I can verify > that from the *Messages* buffer. > > - With EXWM, I get a black screen, but 'y' does not work. So it's > effectively stuck. > > I'm thinking that maybe `after-make-frame-functions' are run too early, > before the frame is fully ready. > > Then I re-considered Eli's last remark: the daemon already has a frame, so I > thought maybe we should also guard the hook with a check on the frames count: > > (defun ambrevar/desktop-init (_frame) > (when (> (length (visible-frame-list)) 1) > (desktop-save-mode) > (desktop-read) > (remove-hook 'after-make-frame-functions 'ambrevar/desktop-init))) > > That did not change anything. > > Any clue? Instead of counting frames, I'd suggest using (frame-parameter FRAME 'client) where FRAME is the argument with which your after-make-frame-functions hook was called. If this returns non-nil, FRAME is a frame created by serving a request from emacsclient. If this still doesn't work, please show the code of entire hook and the complete recipe you used to test it, maybe there's something else at work here. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 18 06:26:20 2018 Received: (at 30421) by debbugs.gnu.org; 18 Feb 2018 11:26:20 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enN6p-0005hv-EH for submit@debbugs.gnu.org; Sun, 18 Feb 2018 06:26:19 -0500 Received: from mail-wr0-f173.google.com ([209.85.128.173]:39614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enN6l-0005hg-Kk for 30421@debbugs.gnu.org; Sun, 18 Feb 2018 06:26:16 -0500 Received: by mail-wr0-f173.google.com with SMTP id w77so6899456wrc.6 for <30421@debbugs.gnu.org>; Sun, 18 Feb 2018 03:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=jY9j8P3jTNRTHrdkcYpirDZM0eNYB1i57xzQIfCOLFM=; b=F0xWS3qhT3MXemj0Dn+wgJoNYSuUinSHM3mqN+y6MXQLaxw1mG8+fTzZOpQZ6Y9OvF ZzWdlHtoDLbD1XrtYISsG122JOXArIKCYYUtuHVoNfegeAUMXatJZURaammRypFUQMHL BM+qe//Yd4IAR8lXy3Q18yits7AiYubRMUgP3BmYB3uFbSnBzOLLa3MApmsVrMMi4OPD vZWGcXhKiGhQSdf0jblL48ufnJLp0i3BlNyQYJ2QYWaVai4hytmbBr4Hg9hjbZ4w+Fbn dLbBGbwnhSyUwirD8mej0D6uJkR5bQjfK7pyIKoU0Jv9AEOlTTuZfxX7+qzv2RIBsrAQ hbaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=jY9j8P3jTNRTHrdkcYpirDZM0eNYB1i57xzQIfCOLFM=; b=Z2NODR7IOn8gZd60nNVvH6sFC46skNacxIBjCqzMT6rN/XbhhK39DWAvzKw4d7f75P RP5uMy+oESrCs9lcTxWZfgxLoKN28OjkUZ7+j02Q7RwhAUlG80N8wPGun4dOOgTibSrQ rGswayF1JlF4eGcuwIOa/I2+fMUxZOc7tKrYge8Hn7xJg58OPgdYRDqJ0ltKKq8Zn+D9 QNZbMoTwQVrSNdLI3VcrRo6QEvqQO71ByNwqRcdUoAviNnz9D1XxYR1LykRWBa4mASm6 jjecNsbshXtFXhciDk/aRSkK6ZaD2u9NxoLcsRQ8gtGrrx8yX9TM2xb0+SR0dTuAv3LE Pv3w== X-Gm-Message-State: APf1xPD3muDb/bgIyCD9R6ddp4xGYYMffTwjTMH3NZfS5nKaySkBH+a4 9T1BGB20tgPhZ/Vx9+kvht/xZg== X-Google-Smtp-Source: AH8x227FF/rR2u9/Jfo3YHxLlVBG9sODDC0OvHVHc5IzkvVD3BEtD0dipKmJTL/mHrdyNw9Y8nNkLg== X-Received: by 10.223.199.207 with SMTP id y15mr11055074wrg.158.1518953169657; Sun, 18 Feb 2018 03:26:09 -0800 (PST) Received: from mimimi (18.160.3.93.rev.sfr.net. [93.3.160.18]) by smtp.gmail.com with ESMTPSA id p1sm20396445wra.90.2018.02.18.03.26.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Feb 2018 03:26:08 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83fu60cb82.fsf@gnu.org> Date: Sun, 18 Feb 2018 12:26:06 +0100 Message-ID: <87r2pilesx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Did not work. Recipe: - init.el: (require 'desktop) (defun desktop-read (&optional dirname) "Read and process the desktop file in directory DIRNAME. Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in directories listed in `desktop-path'. If a desktop file is found, it is processed and `desktop-after-read-hook' is run. If no desktop file is found, clear the desktop and run `desktop-no-desktop-file-hook'. This function is a no-op when Emacs is running in batch mode. It returns t if a desktop file was loaded, nil otherwise." (interactive) (unless noninteractive (setq desktop-dirname (file-name-as-directory (expand-file-name (or ;; If DIRNAME is specified, use it. (and (< 0 (length dirname)) dirname) ;; Otherwise search desktop file in desktop-path. (let ((dirs desktop-path)) (while (and dirs (not (file-exists-p (desktop-full-file-name (car dirs))))) (setq dirs (cdr dirs))) (and dirs (car dirs))) ;; If not found and `desktop-path' is non-nil, use its first element. (and desktop-path (car desktop-path)) ;; Default: .emacs.d. user-emacs-directory)))) (if (file-exists-p (desktop-full-file-name)) ;; Desktop file found, but is it already in use? (let ((desktop-first-buffer nil) (desktop-buffer-ok-count 0) (desktop-buffer-fail-count 0) (owner (desktop-owner)) ;; Avoid desktop saving during evaluation of desktop buffer. (desktop-save nil) (desktop-autosave-was-enabled)) (if (and owner (memq desktop-load-locked-desktop '(nil ask)) (or (null desktop-load-locked-desktop) ;; Without a visible frame, Emacs daemon cannot ;; prompt the user so we don't load. (and (daemonp) (= (length (visible-frame-list)) 1)) (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ Using it may cause conflicts. Use it anyway? " owner))))) (let ((default-directory desktop-dirname)) (setq desktop-dirname nil) (run-hooks 'desktop-not-loaded-hook) (unless desktop-dirname (message "Desktop file in use; not loaded."))) (desktop-lazy-abort) ;; Temporarily disable the autosave that will leave it ;; disabled when loading the desktop fails with errors, ;; thus not overwriting the desktop with broken contents. (setq desktop-autosave-was-enabled (memq 'desktop-auto-save-set-timer (default-toplevel-value 'window-configuration-change-hook))) (desktop-auto-save-disable) ;; Evaluate desktop buffer and remember when it was modified. (load (desktop-full-file-name) t t t) (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))) ;; If it wasn't already, mark it as in-use, to bother other ;; desktop instances. (unless (eq (emacs-pid) owner) (condition-case nil (desktop-claim-lock) (file-error (message "Couldn't record use of desktop file") (sit-for 1)))) (unless (desktop-restoring-frameset-p) ;; `desktop-create-buffer' puts buffers at end of the buffer list. ;; We want buffers existing prior to evaluating the desktop (and ;; not reused) to be placed at the end of the buffer list, so we ;; move them here. (mapc 'bury-buffer (nreverse (cdr (memq desktop-first-buffer (nreverse (buffer-list)))))) (switch-to-buffer (car (buffer-list)))) (run-hooks 'desktop-delay-hook) (setq desktop-delay-hook nil) (desktop-restore-frameset) (run-hooks 'desktop-after-read-hook) (message "Desktop: %s%d buffer%s restored%s%s." (if desktop-saved-frameset (let ((fn (length (frameset-states desktop-saved-frameset)))) (format "%d frame%s, " fn (if (= fn 1) "" "s"))) "") desktop-buffer-ok-count (if (= 1 desktop-buffer-ok-count) "" "s") (if (< 0 desktop-buffer-fail-count) (format ", %d failed to restore" desktop-buffer-fail-count) "") (if desktop-buffer-args-list (format ", %d to restore lazily" (length desktop-buffer-args-list)) "")) (unless (desktop-restoring-frameset-p) ;; Bury the *Messages* buffer to not reshow it when burying ;; the buffer we switched to above. (when (buffer-live-p (get-buffer "*Messages*")) (bury-buffer "*Messages*")) ;; Clear all windows' previous and next buffers, these have ;; been corrupted by the `switch-to-buffer' calls in ;; `desktop-restore-file-buffer' (bug#11556). This is a ;; brute force fix and should be replaced by a more subtle ;; strategy eventually. (walk-window-tree (lambda (window) (set-window-prev-buffers window nil) (set-window-next-buffers window nil)))) (setq desktop-saved-frameset nil) (if desktop-autosave-was-enabled (desktop-auto-save-enable)) t)) ;; No desktop file found. (let ((default-directory desktop-dirname)) (run-hooks 'desktop-no-desktop-file-hook)) (message "No desktop file.") nil))) (when (daemonp) (defun ambrevar/desktop-init (frame) (when (frame-parameter frame 'client) (desktop-save-mode) (desktop-read) (remove-hook 'after-make-frame-functions 'ambrevar/desktop-init))) (add-hook 'after-make-frame-functions 'ambrevar/desktop-init)) - Leave a ~/.emacs.d/.emacs.desktop behind. - Kill all emacs instances. - `echo 0 > ~/.emacs.d/.emacs.desktop.lock` - Optional: Switch to a TTY. - Start `emacsclient -a '' -t` or `emacsclient -a '' -c` if not in a TTY. - Emacs gives a blank screen (with a blinking cursor in a TTY). Press `n`. - See the *Messages* buffer: the `n` was answering the desktop question. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqJYs4ACgkQm9z0l6S7 zH9eZwf+OOKlLj996ahuVod189YAYfGAW+YpnFwj/+0QupgxVgiY6CFEGLBUQ0Al IXxWgPmD23LZTZC3PGSS8tKzbVvn+u2M3Lb6xNZlvu+Jcl528ut7w3oYBUwDHGxb L/YVBWTlBDl81Cxt+S/akyOX7nmvSqU41VtDIjkDBAa5ywRsETbSw5wS/e9YuVA0 m6a3TFv++dpVMQcDik3HUFQeun6iNOvuOJk/Jt8d+gZqc7l2bf1b5/enea1Y3IBD uhpRrHU+gR9bU2aVmELF0aJiJzKagjWRIScgg8gu4qE2yDBoU1ow1oIGO5Z3LUH4 6RsfRQhicgHOvtDix+BLHLUvpBxa4Q== =3pE6 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 18 11:38:00 2018 Received: (at 30421) by debbugs.gnu.org; 18 Feb 2018 16:38:01 +0000 Received: from localhost ([127.0.0.1]:49969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enRyS-0006Yr-KR for submit@debbugs.gnu.org; Sun, 18 Feb 2018 11:38:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enRyR-0006Yf-5H for 30421@debbugs.gnu.org; Sun, 18 Feb 2018 11:37:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enRyI-0002nn-Pm for 30421@debbugs.gnu.org; Sun, 18 Feb 2018 11:37:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enRyI-0002nh-LW; Sun, 18 Feb 2018 11:37:50 -0500 Received: from [176.228.60.248] (port=1231 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1enRyH-0006dB-WA; Sun, 18 Feb 2018 11:37:50 -0500 Date: Sun, 18 Feb 2018 18:37:56 +0200 Message-Id: <831shib6e3.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87r2pilesx.fsf@gmail.com> (message from Pierre Neidhardt on Sun, 18 Feb 2018 12:26:06 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > Date: Sun, 18 Feb 2018 12:26:06 +0100 > > Did not work. Recipe: Thank you for your efforts. I will look into this soon if no one beats me to it. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 24 05:39:02 2018 Received: (at 30421) by debbugs.gnu.org; 24 Feb 2018 10:39:02 +0000 Received: from localhost ([127.0.0.1]:58201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epXEM-0002gP-5w for submit@debbugs.gnu.org; Sat, 24 Feb 2018 05:39:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epXEK-0002g3-Az for 30421@debbugs.gnu.org; Sat, 24 Feb 2018 05:39:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epXEC-0006bh-6d for 30421@debbugs.gnu.org; Sat, 24 Feb 2018 05:38:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epXE1-0005qe-6K; Sat, 24 Feb 2018 05:38:41 -0500 Received: from [176.228.60.248] (port=4698 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1epXE0-0005pU-32; Sat, 24 Feb 2018 05:38:40 -0500 Date: Sat, 24 Feb 2018 12:39:02 +0200 Message-Id: <83k1v24qpl.fsf@gnu.org> From: Eli Zaretskii To: ambrevar@gmail.com In-reply-to: <831shib6e3.fsf@gnu.org> (message from Eli Zaretskii on Sun, 18 Feb 2018 18:37:56 +0200) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 18 Feb 2018 18:37:56 +0200 > From: Eli Zaretskii > Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net > > > From: Pierre Neidhardt > > Cc: npostavs@users.sourceforge.net, 30421@debbugs.gnu.org > > Date: Sun, 18 Feb 2018 12:26:06 +0100 > > > > Did not work. Recipe: > > Thank you for your efforts. I will look into this soon if no one > beats me to it. If you invoke emacsclient with one or more file names, and then run your code in a function that is in the server-switch-hook list, does that work? If so, I think we lack a hook, which should run after the frame is displayed. Asking a question in after-make-frame-functions is too early, because the frame was not displayed yet at that time. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 24 14:44:56 2018 Received: (at 30421) by debbugs.gnu.org; 24 Feb 2018 19:44:56 +0000 Received: from localhost ([127.0.0.1]:59036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epfke-0004V5-3Z for submit@debbugs.gnu.org; Sat, 24 Feb 2018 14:44:56 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:43441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epfkc-0004Us-0C for 30421@debbugs.gnu.org; Sat, 24 Feb 2018 14:44:54 -0500 Received: by mail-lf0-f52.google.com with SMTP id q69so16913497lfi.10 for <30421@debbugs.gnu.org>; Sat, 24 Feb 2018 11:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=d9zaucyIozLNKGi5XYwi6p6qXZzORGHOQ4zWztI+GA8=; b=sHWJdLiY8cPeSDPemJGKy0xHXyBJeqSi4+xXM8UAIbV0e4let40twwZXtOQ3n3PYci RzYcfPWuLgTQo4aX4lCXd/znajX6qXEjZcswNO0e8U7SOZvDD09uJZpxf8sQxA1TpExk 32Y7LABZPNgnHBOlF/kSwHP2Hnea31cTUh+5XduAh5CqWMiiYOtQ8FB/D3Rrqcdgv8Z8 /WzYMiBHEvZ2Nfh794V29JpADiYgNF7UyJm7FhsFtt0HIOoh4i/xAUfKyiY20Pjc+Qes 12MCkXcwzGsPZM0wXkksVNg3TdAiogrnwQ60KwjyW4/QiXZWLeb1n37y63Dp3kT3+hdF emXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=d9zaucyIozLNKGi5XYwi6p6qXZzORGHOQ4zWztI+GA8=; b=GQo+v8K26cjABpHjRfrxeBnNifvtAdItur6Iwyp2eB6kaGk++hTLTVNNBBy6GtBiIa 2W/hGe5rG2HE5PEmM4K37ibaiZtmxnfNQpMan+R/0SlKtxxRiu1jjP+HeefYviqZQsqs brFsNNuffdm/Psm0DFOFk5HPllUs2nGQanoVkTPQL8TeT5fP/Qf8DxXEp1meHfjsxyBX 9jHVQ0rUUYuxe0g8UkUTh/oIFVwDZPiugtEeq6KIC+E1QkWC+ABf8M85IWp6YgijZnuJ 5s/xnvPN9mGhMu/zFIQvAxP2MyY/DdeIiZhpdEIrs69Gj/l3RJzno4ggcXehDpmJ5gSX 2ZRA== X-Gm-Message-State: APf1xPDYkFlsCTEkUy3jX5hfWpcHf1zmPr0ORvG6+UFfQPcfFnsK6qLi 2RIBsirldesAazB/4nM+j08= X-Google-Smtp-Source: AH8x225dilv0cPGUDXX7qZt7mqbaQzI2re/NzoUShGLqVFDCV/aUtdbhY17pZUImjIlvBsapeblaHg== X-Received: by 10.46.49.10 with SMTP id x10mr3905495ljx.5.1519501488040; Sat, 24 Feb 2018 11:44:48 -0800 (PST) Received: from mimimi (c80-217-164-188.bredband.comhem.se. [80.217.164.188]) by smtp.gmail.com with ESMTPSA id g70sm1092937lfk.76.2018.02.24.11.44.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Feb 2018 11:44:47 -0800 (PST) References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83k1v24qpl.fsf@gnu.org> Date: Sat, 24 Feb 2018 20:44:45 +0100 Message-ID: <878tbi2mvm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Correct me if I did not understand your instructions correctly. I did this: - Add this to my init.el (defun ambrevar/desktop-init () (desktop-save-mode) (desktop-read) (remove-hook 'server-switch-hook 'ambrevar/desktop-init)) (add-hook 'server-switch-hook 'ambrevar/desktop-init) - Kill Emacs, leaving a .emacs.desktop.lock behind. - Switch to a TTY. - Start `emacs --daemon`. - Run `emacsclient foo`. I correctly get prompted if I want to load the desktop then. Running `emacsclient -t` does not trigger the desktop loading, but I guess that's to be expected. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqRwK0ACgkQm9z0l6S7 zH8d1gf8D7bSom/aHHWF7c+YbRTSGOTKlY8Cmelc16AErTYeuRwg7LAzJvPblGu0 9n6wIRp+EjY0IS/j3QBl+x/54rjbQ2qX99Q5IDLS+EMhcNdLnjOWuSoLOz5TbwHX gg6M4Kk//weyT0uLCr2CrT87UXMbwhO/8JqxbZkCXFy4ZLTu89Q/GVGRdxynBJmF WVjc3s14QNhNXsRvVk1IMR72Si5SMGY7STmst3oUlpkDeNauiLGiFTDq2P3UviFm VAdgqbEH40j6MCQHFWNpmy91ecSlFXyS97CzGitU1DtvPQanrhsV1b1Cgo8byADH +5KcsqPH29oCTbgHTGYQiDUadkeG6w== =GHaZ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 24 15:09:54 2018 Received: (at 30421) by debbugs.gnu.org; 24 Feb 2018 20:09:54 +0000 Received: from localhost ([127.0.0.1]:59042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epg8o-00053a-5B for submit@debbugs.gnu.org; Sat, 24 Feb 2018 15:09:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epg8k-00053M-O5 for 30421@debbugs.gnu.org; Sat, 24 Feb 2018 15:09:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epg8c-0000kn-3c for 30421@debbugs.gnu.org; Sat, 24 Feb 2018 15:09:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epg8P-0000Zt-1y; Sat, 24 Feb 2018 15:09:29 -0500 Received: from [176.228.60.248] (port=2143 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1epg8O-0001Sf-GR; Sat, 24 Feb 2018 15:09:28 -0500 Date: Sat, 24 Feb 2018 22:09:26 +0200 Message-Id: <83fu5q2lqh.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <878tbi2mvm.fsf@gmail.com> (message from Pierre Neidhardt on Sat, 24 Feb 2018 20:44:45 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Sat, 24 Feb 2018 20:44:45 +0100 > > Correct me if I did not understand your instructions correctly. I did this: > > - Add this to my init.el > > (defun ambrevar/desktop-init () > (desktop-save-mode) > (desktop-read) > (remove-hook 'server-switch-hook 'ambrevar/desktop-init)) > (add-hook 'server-switch-hook 'ambrevar/desktop-init) > > - Kill Emacs, leaving a .emacs.desktop.lock behind. > > - Switch to a TTY. > > - Start `emacs --daemon`. > > - Run `emacsclient foo`. Yes. > I correctly get prompted if I want to load the desktop then. OK, thanks for testing. So like I said, we need a new hook, which would be called when the server creates a frame, but doesn't switch to any new buffers in that frame. > Running `emacsclient -t` does not trigger the desktop loading, but I > guess that's to be expected. Right, because in that case server-switch-hook is not run. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 03 06:33:14 2018 Received: (at 30421) by debbugs.gnu.org; 3 Mar 2018 11:33:14 +0000 Received: from localhost ([127.0.0.1]:41872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1es5Pd-0007Zf-0i for submit@debbugs.gnu.org; Sat, 03 Mar 2018 06:33:14 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1es5Pb-0007ZS-3D for 30421@debbugs.gnu.org; Sat, 03 Mar 2018 06:33:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1es5PV-0006O9-1y for 30421@debbugs.gnu.org; Sat, 03 Mar 2018 06:33:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1es5PP-0006LI-V5; Sat, 03 Mar 2018 06:32:59 -0500 Received: from [176.228.60.248] (port=4582 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1es5PP-0003Q2-A7; Sat, 03 Mar 2018 06:32:59 -0500 Date: Sat, 03 Mar 2018 13:33:14 +0200 Message-Id: <834llxv1fp.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <83fu5q2lqh.fsf@gnu.org> (message from Eli Zaretskii on Sat, 24 Feb 2018 22:09:26 +0200) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <83mv0f1q6t.fsf@gnu.org> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 24 Feb 2018 22:09:26 +0200 > From: Eli Zaretskii > Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net > > > I correctly get prompted if I want to load the desktop then. > > OK, thanks for testing. > > So like I said, we need a new hook, which would be called when the > server creates a frame, but doesn't switch to any new buffers in that > frame. Can you see if the patch below gives good results? It should work both when you invoke emacsclient with one or more file names, or without any file names. In both cases, the new hook server-after-make-frame-hook should be invoked, with the new frame being the selected frame. If you run your code in that new hook, you should get prompted whether you want to load the desktop, regardless whether or not you specify files for emacscilent to visit. diff --git a/lisp/server.el b/lisp/server.el index a892203..ff03cbe 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -188,6 +188,13 @@ server-switch-hook :group 'server :type 'hook) +(defcustom server-after-make-frame-hook nil + "Hook run when the Emacs server creates a client frame. +The created frame is selected when the hook is called." + :group 'server + :type 'hook + :version "27.1") + (defcustom server-done-hook nil "Hook run when done editing a buffer for the Emacs server." :group 'server @@ -1336,9 +1343,11 @@ server-execute ((or isearch-mode (minibufferp)) nil) ((and frame (null buffers)) + (run-hooks 'server-after-make-frame-hook) (message "%s" (substitute-command-keys "When done with this frame, type \\[delete-frame]"))) ((not (null buffers)) + (run-hooks 'server-after-make-frame-hook) (server-switch-buffer (car buffers) nil (cdr (car files))) (run-hooks 'server-switch-hook) (unless nowait From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 03 13:05:36 2018 Received: (at 30421) by debbugs.gnu.org; 3 Mar 2018 18:05:36 +0000 Received: from localhost ([127.0.0.1]:42989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1esBXL-0005kN-RB for submit@debbugs.gnu.org; Sat, 03 Mar 2018 13:05:35 -0500 Received: from mail-lf0-f53.google.com ([209.85.215.53]:33311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1esBXJ-0005k7-MN for 30421@debbugs.gnu.org; Sat, 03 Mar 2018 13:05:34 -0500 Received: by mail-lf0-f53.google.com with SMTP id o145so17664408lff.0 for <30421@debbugs.gnu.org>; Sat, 03 Mar 2018 10:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=q9DVuftgSJgTVoD/Zl1+Vo7zfJJ66elOvmDjE1CMnvY=; b=Ex8pPuUmFNerXYhWm6B055AFkwXnA8fILyv9yQd/AnbGU4/JE5/jganuG5F91xbddi +JsUsZewQ/Bb5IxmzvYq4lbMMJ566gzpeySm7VkJluA53Rkw6noqcxD+lcRas3BQCbmB yYQW3AkvOA9LfxOmZLaZsGpnk/lvGxX07zsmqa3ObTElJfhOLfCmER/9mHHVJpnLTfgW oMGOtKSM3AtpotPUlFNkjQwVC4HbYdG8InCk74hYsRUKQ2UUJGJBu5J+jKb02UG5EKxB P5279NyDUyAftz7UCzbqPj4Flp8JWgOKZhGYet67N0zGzrgAHspKuhJqFNPhu5JoVhZm cqNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=q9DVuftgSJgTVoD/Zl1+Vo7zfJJ66elOvmDjE1CMnvY=; b=dx6+Fr21qmVBLcfMd1FdWK2v7xB7I7QofD5AOqYy42N1kRBkHyLtGuALNcJRgDxye8 2BRbki5DqRKyWzJlKf98b3YKH1se/v8pjwKWxRruoKqIZZaRKBKCn6qVsPXeqCBn0Uvf Gf00K2LxezgYjjGURQD+GDr/PjLlpjEe5X7AxiUVS4GgpgsBAIeqPgUwo0TSyK7RmyAs XQuphk+sxeeKL+5ET8CtPLox/UMeNIhydyxUHwluhdrF0jWccuwKPLrkT3+5eqrftpu9 iZTAbAJn3RsVhmxE9fUroE4u9UmGyH7Neb//C01zmtvnkKrWnZ1wlMqCHbvhHrckk6c/ rUuA== X-Gm-Message-State: AElRT7GisS6LPOWZtfSf8fJbnBRAzuUrpizjwA5zOy2qvXwAOFAJqO35 UOg0WgJdVPgJHaGnFiYsuWY= X-Google-Smtp-Source: AG47ELtT1ZbHVLPD1BXYRzpP3LieyK0ZEXs9H+UVMv2eegrUGXzYpcY8DLLtN6gcG1RGSX4KroepGA== X-Received: by 10.25.222.207 with SMTP id i76mr5721271lfl.133.1520100327951; Sat, 03 Mar 2018 10:05:27 -0800 (PST) Received: from mimimi (c80-217-164-188.bredband.comhem.se. [80.217.164.188]) by smtp.gmail.com with ESMTPSA id b195sm1890248lfg.30.2018.03.03.10.05.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Mar 2018 10:05:27 -0800 (PST) References: <871shram2i.fsf@gmail.com> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> <834llxv1fp.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <834llxv1fp.fsf@gnu.org> Date: Sat, 03 Mar 2018 19:05:26 +0100 Message-ID: <87d10l11cp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Works perfectly thanks! I think my code snippet or something similar would deserve an entry in the desktop info section. =2D-=20 Pierre Neidhardt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqa4+YACgkQm9z0l6S7 zH++Ygf/eGPsVeaymdILhPolgrxSd8udSdvgeSNccQ6Nk3Ku1ddRa9vJUXVpTBBJ P5iNAT4aKAMxAd7eSocJ49wSYdv6POWb/EUsgAcCk2OiLCeJ4wbHHVo1m4b18kwq Ck2nET3p7gz4LpNPSgaCn7SYD3xDebaNQ7GVBSCjbduznNutM6Pv+XJRXXVL+gcd dvLoJVUHGs0efBI/SV4BS5NR3WqvuJMb+RBY6SubWyJ/wPzADGFCKsmaToF6IqiX zpPOjXgTavcjGTuhCypUBTPeijimaJkcbISxBStiNyDxF4q6jG48IZu7Lv9kjE3S RwofJx5lXdGnJopLrSFDDccpKMMq9Q== =P1iD -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 10 06:52:31 2018 Received: (at 30421-done) by debbugs.gnu.org; 10 Mar 2018 11:52:31 +0000 Received: from localhost ([127.0.0.1]:53169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eud38-0002vN-W1 for submit@debbugs.gnu.org; Sat, 10 Mar 2018 06:52:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eud37-0002v5-5A for 30421-done@debbugs.gnu.org; Sat, 10 Mar 2018 06:52:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eud2w-0007Yw-7w for 30421-done@debbugs.gnu.org; Sat, 10 Mar 2018 06:52:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eud2j-0007Vv-P4; Sat, 10 Mar 2018 06:52:05 -0500 Received: from [176.228.60.248] (port=3028 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eud2i-0006El-Sp; Sat, 10 Mar 2018 06:52:05 -0500 Date: Sat, 10 Mar 2018 13:52:04 +0200 Message-Id: <834lloup0b.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87d10l11cp.fsf@gmail.com> (message from Pierre Neidhardt on Sat, 03 Mar 2018 19:05:26 +0100) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <87r2prpl05.fsf@gmail.com> <87zi4fa4ft.fsf@users.sourceforge.net> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> <834llxv1fp.fsf@gnu.org> <87d10l11cp.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421-done Cc: 30421-done@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Sat, 03 Mar 2018 19:05:26 +0100 > > Works perfectly thanks! Thanks, I pushed this to the master branch. > I think my code snippet or something similar would deserve an entry in > the desktop info section. I wasn't sure how to do that. Please feel free to review the documentation changes I made and suggest where we should show code snippets, and which snippets. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 19 07:07:05 2018 Received: (at 30421-done) by debbugs.gnu.org; 19 Mar 2018 11:07:05 +0000 Received: from localhost ([127.0.0.1]:40788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exsd7-0003tt-2U for submit@debbugs.gnu.org; Mon, 19 Mar 2018 07:07:05 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:34228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exsd5-0003tP-66 for 30421-done@debbugs.gnu.org; Mon, 19 Mar 2018 07:07:03 -0400 Received: by mail-io0-f177.google.com with SMTP id r18so1468097ioa.1 for <30421-done@debbugs.gnu.org>; Mon, 19 Mar 2018 04:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=tIJhgcYiJTlaJ9Ivf4hI7JKvGut4Vnd2Bh+8oP7IQ6M=; b=POLeA3Avc+Me+MxPhNOfaQFsChTMxleF9W/YkAPOSjHFMqQP4wQ2CWlwg4CfJQrPZt 0MR2BNXq2yCc9V7c38aLMIkzfrNYDvEdp5tPVu9GZDnprRMSZSyw1DSdoP8iitM9DHQq B/XZ/7WPJs3S5KlzvMYmdqyLWyLIINMzaZJA/8wMqN1Ihl5SsAQUVGyKwqIuE77kSRiV 1OAX3Ou+LJV+r/B7Y6X/fdFnvJF6BP8lArEc4lNjBbu/o4mjdCjI/J14i3zwaUL29eoT jDDZtXbhvZeffhOd6xz3F+l+HDBTwZHB6bh2tgDeuv8oJOsy0XGA1jJASR1vHvcvnlnM bqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=tIJhgcYiJTlaJ9Ivf4hI7JKvGut4Vnd2Bh+8oP7IQ6M=; b=AMhMZXfWy5iVw04Q83TRYJ5GrbXisl0kykDzNyZMMvHcm3MpLrgEeq+lpHLWJVSjKG 9nVXNV+OtZL/wv4kcrxvjKmkWQPgFrNUV6M73syTrXU52YY8vFPS1xa0KhW29pWtS0ds YtDcNjJfyE/f1VFML0RTDSQSSzzWoxwRq2RTEjuxjgiZIs+M/UwNMRpGOxkTeGjb8G3c f7no8MWaqGQzCopnhuxFPEPb8pmEjSVgb0HgRdXiaKD6KIuzCTGmmbJBFaRDU0gpfxum APg6YB6TB+0owTBt12ueZ04uyqZ6QiMlk8R48ocfu9PBGpBC0YcLtjUfxL9epE+Ky9XC 0v3A== X-Gm-Message-State: AElRT7EyRbrLJlsC/Kj+I55qufAQOK3VkWIHY4URpaB0grTe5n9lDhtH I6jOohQFaWdI7PYHz9A0mvw= X-Google-Smtp-Source: AG47ELtby5QLhNqwknQUX0SeM0VvDvqrW7frihD9CHdCwWDM0Yx8V9/+2eT06scMKudfjHsrDMYo4Q== X-Received: by 10.107.182.67 with SMTP id g64mr12035182iof.58.1521457617477; Mon, 19 Mar 2018 04:06:57 -0700 (PDT) Received: from mimimi ([106.205.135.76]) by smtp.gmail.com with ESMTPSA id k13sm3818921ioc.27.2018.03.19.04.06.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 04:06:56 -0700 (PDT) References: <871shram2i.fsf@gmail.com> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> <834llxv1fp.fsf@gnu.org> <87d10l11cp.fsf@gmail.com> <834lloup0b.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <834lloup0b.fsf@gnu.org> Date: Mon, 19 Mar 2018 16:36:49 +0530 Message-ID: <87d1005np2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30421-done Cc: 30421-done@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain What about this? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-example-of-delayed-desktop-loading.patch Content-Transfer-Encoding: quoted-printable From=20a0b72f3c6c38308deba5da1b30e53e9b1923c7e0 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Mon, 19 Mar 2018 16:32:55 +0530 Subject: [PATCH] Add example of delayed desktop loading =2D-- doc/emacs/misc.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 68bd308983..65f6f3d75e 100644 =2D-- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2531,6 +2531,14 @@ Saving Emacs Sessions first client connects, by calling @code{desktop-read} in a hook function that you add to @code{server-after-make-frame-hook} (@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}). +A possible setup when @code{desktop-load-locked-desktop} is @code{nil}: +@example +(defun desktop-init (_frame) + (desktop-save-mode) + (desktop-read) + (remove-hook 'server-after-make-frame-hook 'desktop-init)) +(add-hook 'server-after-make-frame-hook 'desktop-init) +@end example =20 @node Recursive Edit @section Recursive Editing Levels =2D-=20 2.16.2 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Pierre Neidhardt Most people want either less corruption or more of a chance to participate in it. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqvmckACgkQm9z0l6S7 zH/vxAf/ZbHaJOOiJspYudEau1rhT9aro38AJhvNiO4M7CQugigcn1RFWUTiAXIW QlCDp7t+Jk6QQuuueFt1r8hXtXORjXB/VK0LCMW7UAuSWgzknHGzjbNjQhU6yDiH nU4JZwxeVs5EAC5MpNLp2PPGmBe2HJcBgJTB0V3Llz9FPIBG8fWdnPcFKrsSOSfo c8bwE9OMJRTdN/W5QPaHnah3Fi47woDdZ9BmzXadMnbd1i3NTyFtj5KH8NV9+kKd 7o9wMp/topc2H27D3eNicRNq0XA0ODEcRfoFZMj7W7gyNqSKkkSWjWIWHPLMbokE xiKO3YxAZVewnUrF/V++FQgApBQ9VQ== =5f77 -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 19 08:47:45 2018 Received: (at 30421) by debbugs.gnu.org; 19 Mar 2018 12:47:45 +0000 Received: from localhost ([127.0.0.1]:40826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exuCX-0008BN-IG for submit@debbugs.gnu.org; Mon, 19 Mar 2018 08:47:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exuCW-0008BB-3R for 30421@debbugs.gnu.org; Mon, 19 Mar 2018 08:47:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exuCN-000136-1F for 30421@debbugs.gnu.org; Mon, 19 Mar 2018 08:47:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exuCA-0000wn-72; Mon, 19 Mar 2018 08:47:22 -0400 Received: from [176.228.60.248] (port=2754 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1exuC9-0000l1-K9; Mon, 19 Mar 2018 08:47:22 -0400 Date: Mon, 19 Mar 2018 14:47:30 +0200 Message-Id: <83h8pcnsf1.fsf@gnu.org> From: Eli Zaretskii To: Pierre Neidhardt In-reply-to: <87d1005np2.fsf@gmail.com> (message from Pierre Neidhardt on Mon, 19 Mar 2018 16:36:49 +0530) Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it References: <871shram2i.fsf@gmail.com> <838tbz1o8k.fsf@gnu.org> <87mv0f5urq.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> <834llxv1fp.fsf@gnu.org> <87d10l11cp.fsf@gmail.com> <834lloup0b.fsf@gnu.org> <87d1005np2.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Pierre Neidhardt > Cc: 30421-done@debbugs.gnu.org, npostavs@users.sourceforge.net > Date: Mon, 19 Mar 2018 16:36:49 +0530 > > +A possible setup when @code{desktop-load-locked-desktop} is @code{nil}: Did you really mean 'nil'? I thought this was to allow Emacs to ask the user, even in daemon mode, whether to load a locked desktop, no? From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 19 09:09:35 2018 Received: (at 30421) by debbugs.gnu.org; 19 Mar 2018 13:09:35 +0000 Received: from localhost ([127.0.0.1]:40847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exuXd-0000Fi-Q9 for submit@debbugs.gnu.org; Mon, 19 Mar 2018 09:09:35 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:35144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exuXb-0000FU-Vs for 30421@debbugs.gnu.org; Mon, 19 Mar 2018 09:09:32 -0400 Received: by mail-pf0-f181.google.com with SMTP id y186so6989862pfb.2 for <30421@debbugs.gnu.org>; Mon, 19 Mar 2018 06:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=KQkdhhYF63SDNmSTF05t2jUMNY9NS2MBAdAblhUErc0=; b=Ypz/b9bBumGzyRX5Dej6Z/a5qscQYSx4b+GitGkUbHmxKe/CVlt5XEe/dVv0IPN5H1 PjM8Z0/oxIDoSlkkQIY9xJr7YHhe5XPFOVu8nViTq4FauyeD9AYOYx948LzvVNpq+Jyy vObnjnSlSihGROcRVvFOAIj8pxhOKuWR0ZWDuDVX9gDRYPWlUgn6isjLNivem10O9xmc 5NEvsajph0vS1eGkZwxapx9PcCFzsexIMGxT9wgeg7jeaiYsSSiXTPakJOcO2Ci6ie9r ydyWRzzGlAZVoVuqN6UbwMBINwj/uaeToE6L0s3rpGt9J5Df3CrV+/kVg+CzakGHZaB4 rx+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=KQkdhhYF63SDNmSTF05t2jUMNY9NS2MBAdAblhUErc0=; b=M8PRpUhJbOz+hjr4fQwDZxpqXHVnc7wo4+Je+zIr2DosOuXxCtyxShclD9K+LmxVIj xEuSrPqIQrs6/knxfRYv/3BtoKrR9+oRTnQAraGGmv/zFDq5Pc/CT5vYMxwPIPxfp2LK cp1mJmoCbWieyLYkuu2wnwuRKIYmUIuEBtSzGh6D4OEMlrYzi2Kl3v1JeVdDrshMcJyp l9c0pb1hj8qcBNcBBmg2A5SPGO4uVNNQtoV8WhvgJvBQ+oNY8xjIfVXvImyq7Oqv+VmD xYGlGq3il2dDaUb9uFnUloMo2bjUZW9eqm8ptece+10+N8FFGRKLd7jQ6QIr6BEQZXHN UsdA== X-Gm-Message-State: AElRT7EVypr4qszpUANymcvx2SX+zcpY+spiIB/X2HvPmsLgu8tFpb4c 6O0BCZPRyY86PZ9t037Lgp0= X-Google-Smtp-Source: AG47ELt6fh0Lz4qzb2uRcNUA9399C0o1NoL4jT/n2v5LvzIgCf5P3gMI3Mweay19gimA6ojACr9Aow== X-Received: by 10.99.109.142 with SMTP id i136mr9094042pgc.306.1521464965990; Mon, 19 Mar 2018 06:09:25 -0700 (PDT) Received: from mimimi ([106.205.135.76]) by smtp.gmail.com with ESMTPSA id p6sm28506788pfg.183.2018.03.19.06.09.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Mar 2018 06:09:24 -0700 (PDT) References: <871shram2i.fsf@gmail.com> <837erj1m46.fsf@gnu.org> <87k1vj5tju.fsf@gmail.com> <834lmn1k5h.fsf@gnu.org> <876073e5d9.fsf@gmail.com> <83wozjz79c.fsf@gnu.org> <87bmgv2vvk.fsf@gmail.com> <87o9kpn9pq.fsf@gmail.com> <83po55e4md.fsf@gnu.org> <87r2pkilsj.fsf@gmail.com> <83fu60cb82.fsf@gnu.org> <87r2pilesx.fsf@gmail.com> <831shib6e3.fsf@gnu.org> <83k1v24qpl.fsf@gnu.org> <878tbi2mvm.fsf@gmail.com> <83fu5q2lqh.fsf@gnu.org> <834llxv1fp.fsf@gnu.org> <87d10l11cp.fsf@gmail.com> <834lloup0b.fsf@gnu.org> <87d1005np2.fsf@gmail.com> <83h8pcnsf1.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Pierre Neidhardt To: Eli Zaretskii Subject: Re: bug#30421: 25.3; desktop.el: Steal lock when no living "emacs" process owns it In-reply-to: <83h8pcnsf1.fsf@gnu.org> Date: Mon, 19 Mar 2018 18:39:17 +0530 Message-ID: <87a7v45i0y.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30421 Cc: 30421@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Indeed, I meant 'ask! :) =2D-=20 Pierre Neidhardt You'll wish that you had done some of the hard things when they were easier to do. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlqvtn0ACgkQm9z0l6S7 zH/5rwf/eFZi+GY/zJ3twa3X6jj8iIRGkjCyGozVEMFlwpEoYFFGbR0oOzaYZRUj UXKnmtl66fCJheK9HLoGkYboBaajjqLiHWLZa67sIlAVTdDpTQNKPHnn28EO3px4 7K0lmbrRwndsOjivz9095mFB9sDZFz0CdgIimdTUSc8io+4B+XGqM+OGN8ZPwsqw nt1OUXI+AtF6xUGgy3aoguOFlLSUDfTsYVQgKxM0WdRuO9gb1RuxIxFR0emne2tt 0CGuSIUzMgjJDErt0s+t/M6rFv1WiFW8v5gkiFrexWrVf5Op1eS3qzT8HZQss7vr /IGk2HaRaQqlA4+nywFcp1anIhyiiA== =MeXY -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Sep 12 17:52:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 17 Apr 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator