From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 21 02:44:49 2025 Received: (at submit) by debbugs.gnu.org; 21 Jul 2025 06:44:49 +0000 Received: from localhost ([127.0.0.1]:54772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udkGW-0002rf-H8 for submit@debbugs.gnu.org; Mon, 21 Jul 2025 02:44:49 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49272) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1udkGR-0002qt-67 for submit@debbugs.gnu.org; Mon, 21 Jul 2025 02:44:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1udkGL-0008Dc-FC for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2025 02:44:37 -0400 Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1udkGJ-0003vD-2F for bug-gnu-emacs@gnu.org; Mon, 21 Jul 2025 02:44:36 -0400 Received: from urania (p200300cbaf001400c670eee5151c57e5.dip0.t-ipconnect.de [IPv6:2003:cb:af00:1400:c670:eee5:151c:57e5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id D395F340E37; Mon, 21 Jul 2025 06:44:22 +0000 (UTC) From: =?utf-8?Q?Ulrich_M=C3=BCller?= To: bug-gnu-emacs@gnu.org Subject: 30.1; emacsclient.desktop may start a new instance of the daemon Date: Mon, 21 Jul 2025 08:44:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=140.211.166.183; envelope-from=ulm@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) 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: -0.3 (/) The desktop file calls emacsclient with the --alternate-editor= option (with empty option argument). I find this problematic for two reasons: 1. The user may run the Emacs daemon unter the control of the service manager (like OpenRC or systemd). So in the regular case the option is not needed because a daemon would always be running. However, if for some reason the daemon failed to start or if the Emacs process crashed, then it is very surprising behaviour for emacsclient to start a "rogue" daemon that isn't under the service manager's control. 2. The user can get the present behaviour (or any other behaviour that they prefer) by defining the ALTERNATE_EDITOR environment variable in their startup files. The desktop file is the wrong place to override the user's configuration with the --alternate-editor= option, therefore taking away control from the user. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 21 08:00:32 2025 Received: (at 79066) by debbugs.gnu.org; 21 Jul 2025 12:00:32 +0000 Received: from localhost ([127.0.0.1]:56072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udpC3-0001kG-Qz for submit@debbugs.gnu.org; Mon, 21 Jul 2025 08:00:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33544) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1udpC1-0001k0-Mh for 79066@debbugs.gnu.org; Mon, 21 Jul 2025 08:00:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1udpBv-0005CY-9M; Mon, 21 Jul 2025 08:00:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/lM+tUEr6Ud3vY6FZ0P1EHOa5Zir7beW7Rruk5DPkPA=; b=GlJEbiu4DyzFqaU3Ogqy JdQu7c1pPhJwod3+FbRQK0pqxJCSjm/ShT4DdoGi1pO0xJsQ0xAbUN+CLHM1eARN3c0xZI5xgjf+6 qM7zhg5r3qOgJ+jfTr3/IA9SV/+Mwt7dENH4couXaKriWtp6+oNjjlqcEUtBxi9RNn8UdpcyzRKD6 FGOC9eExqCiFUH2Ryy4E3g2hwMfYORNejsOmUrJLXnmE9fQLkyqieV0qnJok/g9t2kFE0GlVxUaNX IASOF4Wr6jjSnKK2zEPOlKTB9CvCaLiftbHrULJHLuGSj8A6kix7NNKjHFqtx1bXsCGiYvN5tPOy/ BN2i0xvzRyGGiQ==; Date: Mon, 21 Jul 2025 15:00:20 +0300 Message-Id: <86zfcxbvor.fsf@gnu.org> From: Eli Zaretskii To: Ulrich =?iso-8859-1?Q?M=FCller?= In-Reply-To: (message from Ulrich =?iso-8859-1?Q?M?= =?iso-8859-1?Q?=FCller?= on Mon, 21 Jul 2025 08:44:18 +0200) Subject: Re: bug#79066: 30.1; emacsclient.desktop may start a new instance of the daemon References: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79066 Cc: 79066@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: -3.3 (---) > From: Ulrich Müller > Date: Mon, 21 Jul 2025 08:44:18 +0200 > > The desktop file calls emacsclient with the --alternate-editor= option > (with empty option argument). I find this problematic for two reasons: > > 1. The user may run the Emacs daemon unter the control of the service > manager (like OpenRC or systemd). So in the regular case the option is > not needed because a daemon would always be running. > > However, if for some reason the daemon failed to start or if the Emacs > process crashed, then it is very surprising behaviour for emacsclient to > start a "rogue" daemon that isn't under the service manager's control. > > 2. The user can get the present behaviour (or any other behaviour that > they prefer) by defining the ALTERNATE_EDITOR environment variable in > their startup files. The desktop file is the wrong place to override > the user's configuration with the --alternate-editor= option, therefore > taking away control from the user. I can only reiterate my deep unhappiness that we agreed to add these files to the Emacs distribution, and thus agreed to maintain it. I think this should be the job of the downstream distributions: they know much better how the Emacs server is started, and thus can do a much better job with the file. One of these days I will simply remove these desktop files from the tree. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 21 08:18:33 2025 Received: (at 79066) by debbugs.gnu.org; 21 Jul 2025 12:18:34 +0000 Received: from localhost ([127.0.0.1]:56125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1udpTV-0002hi-HQ for submit@debbugs.gnu.org; Mon, 21 Jul 2025 08:18:33 -0400 Received: from woodpecker.gentoo.org ([140.211.166.183]:51872 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1udpTS-0002hT-Lh for 79066@debbugs.gnu.org; Mon, 21 Jul 2025 08:18:31 -0400 Received: from urania (p200300cbaf001400c670eee5151c57e5.dip0.t-ipconnect.de [IPv6:2003:cb:af00:1400:c670:eee5:151c:57e5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id C317A340DC4; Mon, 21 Jul 2025 12:18:22 +0000 (UTC) From: =?utf-8?Q?Ulrich_M=C3=BCller?= To: Eli Zaretskii Subject: Re: bug#79066: 30.1; emacsclient.desktop may start a new instance of the daemon In-Reply-To: <86zfcxbvor.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Jul 2025 15:00:20 +0300") References: <86zfcxbvor.fsf@gnu.org> Date: Mon, 21 Jul 2025 14:18:18 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 79066 Cc: Ulrich =?utf-8?Q?M=C3=BCller?= , 79066@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: -1.0 (-) >>>>> On Mon, 21 Jul 2025, Eli Zaretskii wrote: > One of these days I will simply remove these desktop files from the > tree. > No objections. :/ In fact, Gentoo packages its own versions of emacs.desktop and emacsclient.desktop since a long time (since 2007). So we're not directly affected, but I still tend to file upstream bugs for any problems that we see. Similarly, we loosely sync our files to the ones in the Emacs tree. (And the last change that we copied was support for org-protocol, which caused bug #79068 ...)