GNU logs - #79889, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79889: 31.0.50; emacsclient with empty argument no longer starts emacs daemon
Resent-From: Richard Copley <rcopley@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 25 Nov 2025 20:28:05 +0000
Resent-Message-ID: <handler.79889.B.17641024597136 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 79889
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 79889 <at> debbugs.gnu.org, spwhitton@HIDDEN
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN, spwhitton@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17641024597136
          (code B ref -1); Tue, 25 Nov 2025 20:28:05 +0000
Received: (at submit) by debbugs.gnu.org; 25 Nov 2025 20:27:39 +0000
Received: from localhost ([127.0.0.1]:42106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzdT-0001qu-2J
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:27:39 -0500
Received: from lists.gnu.org ([2001:470:142::17]:43330)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rcopley@HIDDEN>) id 1vNc4W-0000WD-U4
 for submit <at> debbugs.gnu.org; Mon, 24 Nov 2025 14:18:02 -0500
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 <rcopley@HIDDEN>) id 1vNc4N-0000hG-Ky
 for bug-gnu-emacs@HIDDEN; Mon, 24 Nov 2025 14:17:53 -0500
Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <rcopley@HIDDEN>) id 1vNc4K-0000N8-UD
 for bug-gnu-emacs@HIDDEN; Mon, 24 Nov 2025 14:17:50 -0500
Received: by mail-yw1-x1132.google.com with SMTP id
 00721157ae682-78a8bed470bso27846677b3.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 24 Nov 2025 11:17:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1764011867; x=1764616667; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=08KtYL/2vktDHF3pPD5ASdo9iEw7FjH3sfSgi7SYvsY=;
 b=Rma1zJHDHmCwCiHcjLc0IocNVjL/r1kIAUfUnOfqbgjzgvLWdJ9ciwiWReUjwRWF38
 4dBszD7Ae0KDEMYJ6rly7o1P2dRCdMREVAeZYAAbiZjPNpwd9NwggRuQV5RWrx9S7Qhl
 AWEZEa0K092QurSFYxBKZq2Mf/0RlsEC+UxIkgGhN2DS6+bgo19fLlHnMQ8q2nNIv5zA
 YWoH2kpvre1/Jv6yyiFkkrfozeMya+LJffz51WTPAb7ORzeZAgx47mO63m/Ci5cGb2qQ
 hVcBvG6xFOOmu180qCXXBLHdualr+slwW/7NdSc/4v1ma8esYCEo+fIMoYQbEGDomdg1
 bQCQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1764011867; x=1764616667;
 h=to:subject:message-id:date:from:mime-version:x-gm-gg
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=08KtYL/2vktDHF3pPD5ASdo9iEw7FjH3sfSgi7SYvsY=;
 b=gUt+I2F2ns7jzyXFE2iCxURDnfjeJcKQWf12B20JgMw24Mn13AQgNP7ofjKKFcr82I
 9PnFNOd/RQ2xRfQuS4qcVehspn0LehG/BfiP35bL7vMaruBTFkuieqBhQJRAOIVzYORn
 SbB0iGxKEGobl138zaXPME0D/j4+4dxqEbLTdnrGbzY+8kSSfur1Mcw/e61ifIRCl4UV
 gU1cCYqe76HJJdHPASEgpSyShdlGC2RioVHMRutuEO7O4sLaVlAgs84Qp/bVRsvtHq1/
 kb6QzD37nIT5wV+iEgZ3/lNiayioCaBgt9ONvmoDbZDreK50C6YT8b35Ic2yFGdiophR
 +o3Q==
X-Gm-Message-State: AOJu0Yw3d43ZjqA0YweH4mNGha+fA2RNaTIt2opXwJVthWdp3JdBNmUX
 T6qDF3d8FnM8JdX2tzyqwbYTL2da8VVOYMrBhT/vSRyuN/QxF2LPs/gygDFfJEJf70s3dSRlz/+
 iXi1aGJP2Yoqekxtdq3vIHSavgi2dQUKNMUU5
X-Gm-Gg: ASbGncvDeH380v7JRlqShIuJbB1gBF3LRUfaaN6wB/zVfvU84syZVYttNQVI6Y+Mlc9
 Iy6fg4CTPt5dRT4QQrWM8D204y0Yu6j/1cQbeXL0K/B8Zli8KahDh0LMuDtHK2ZT9n80Hlg1Wbi
 BEEt5gUbpvd+FgE44BTVTfK3H1vLVFXIAExpJOT6th54YymTSbLQpFQ3YL9n04CBD/cpBlkuaVL
 Ruik9mZsVWB8AgJe4mzq8pIgc4Ccyi00sYzQvXilIXKY2jnnNjZToavfyMtqUI4KKM3a/hkpVKI
 awp0MqaUIAHIZef21Y5eSNruSdXm
X-Google-Smtp-Source: AGHT+IE9HR1yLQoXpQBkZkKOfZwajOd2WPFpxvQvkdN/FGrBmoUj6/CVDD09mMZlJec4arz9wIBzbAIkRhte5UPhExM=
X-Received: by 2002:a05:690c:3605:b0:788:bda:47c8 with SMTP id
 00721157ae682-78ab6f6fc5cmr2188557b3.55.1764011867225; Mon, 24 Nov 2025
 11:17:47 -0800 (PST)
MIME-Version: 1.0
From: Richard Copley <rcopley@HIDDEN>
Date: Mon, 24 Nov 2025 19:17:19 +0000
X-Gm-Features: AWmQ_bkd2k1WchmU5mlgyJhjJv8lz4B80hiAUOFJiXTfb_Kw6C5E3oAiwtCMulQ
Message-ID: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2607:f8b0:4864:20::1132;
 envelope-from=rcopley@HIDDEN; helo=mail-yw1-x1132.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Recipe on Windows (I did not check if the same recipe works on Linux):
In a command prompt, run the following command, including the
two double-quote characters:
  emacsclientw -nca ""

Expected behaviour: Emacs is started as a daemon (if an Emacs server is
not already running), and then a new frame is created.

Actual behaviour: Emacs is started as a daemon (if an Emacs server is
not already running), and then the server prints "Unknown command:" to
its standard output, and emacsclientw.exe shows a message box,
---------------------------
Emacsclient ERROR
---------------------------
*ERROR*: Unknown command:
---------------------------
OK
---------------------------

This happens since the following commit:

commit 68e337e630f8d0960cf971f066c27f315634bc39
Author: Sean Whitton <spwhitton@HIDDEN>
Date:   Fri Nov 7 12:33:21 2025 +0000

    Don't discard empty string arguments from emacsclient

    * lisp/server.el (server--process-filter-1): Don't discard empty
    string arguments from emacsclient.
    (server-eval-args-left):
    * doc/emacs/misc.texi (emacsclient Options):
    * etc/NEWS: Document the change.

Running emacsclient with the "-a" argument followed by an empty string
is documented in the Emacs manual, info node "emacsclient Options"
(41.3).


In GNU Emacs 31.0.50 (build 4, x86_64-w64-mingw32) of 2025-11-24 built
 on MACHINE
Repository revision: 68e337e630f8d0960cf971f066c27f315634bc39
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.6466)

Configured using:
 'configure
 PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig'

Configured features:
ACL DBUS GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr comp-run bytecomp byte-compile comp-common rx
emacsbug lisp-mnt message mailcap yank-media puny dired dired-loaddefs
rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config
gnus-util text-property-search time-date subr-x mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel touch-screen
dos-w32 ls-lisp term/w32-nt disp-table term/w32-win w32-win w32-vars
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads w32notify dbusbind w32 lcms2 multi-tty move-toolbar
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 58380 17255) (symbols 48 6284 0) (strings 32 16688 1633)
 (string-bytes 1 477857) (vectors 16 9808)
 (vector-slots 8 144867 11048) (floats 8 24 5) (intervals 56 259 5)
 (buffers 1064 10))




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Richard Copley <rcopley@HIDDEN>
Subject: bug#79889: Acknowledgement (31.0.50; emacsclient with empty
 argument no longer starts emacs daemon)
Message-ID: <handler.79889.B.17641024597136.ack <at> debbugs.gnu.org>
References: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
X-Gnu-PR-Message: ack 79889
X-Gnu-PR-Package: emacs
Reply-To: 79889 <at> debbugs.gnu.org
Date: Tue, 25 Nov 2025 20:28:07 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 79889 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
79889: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79889
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 25 Nov 2025 20:50:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:50:31 2025
Received: from localhost ([127.0.0.1]:43206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzzb-0001py-Ga
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:50:31 -0500
Received: from mail-yx1-xb12c.google.com ([2607:f8b0:4864:20::b12c]:47226)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <rcopley@HIDDEN>) id 1vNzzY-0001pc-GW
 for control <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:50:29 -0500
Received: by mail-yx1-xb12c.google.com with SMTP id
 956f58d0204a3-6432842cafdso1457532d50.2
 for <control <at> debbugs.gnu.org>; Tue, 25 Nov 2025 12:50:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1764103822; x=1764708622; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=QpcqFjYZd+FVosaIa3xiLImViWJu0i4qq4tuLshMvjQ=;
 b=eJx7u2xbUJnNwQE7n6YhpUrC9JtQTZSvM19yYOjmhR6yivkXLf+BXY24LUtOCQBKZA
 8gLDq5i80xD8C6qRNzcoJHUFOML1J1Y8r6MPm9wK8IlVLELGxXyDn4BwKrVuYxn1eo07
 RTJTb/TBX8y4FaGE6G0U0kP8SK5MJCe05uEulEHrFMNOeNV2Cp9rJFEy5qKyAL0v7vv3
 BoeihqzPJx26raF3twELCJ78zDCn8+z3AmACM7VfViQao5JNkZRXKKUzRfL8JJktdgW7
 IFZKt2E/UKYH98N+SKXQsszzOsFpff/JY7kdw2Jodq/YJ2ENyJa86vkFiiCDYkGnMRQv
 XQeg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1764103822; x=1764708622;
 h=to:subject:message-id:date:from:mime-version:x-gm-gg
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=QpcqFjYZd+FVosaIa3xiLImViWJu0i4qq4tuLshMvjQ=;
 b=rfAJkGM47E7es2x8ArKknYF/nix2ukrfuYiA3wYPs919HRdfoiTDk4nwdJ2fWKdpzS
 I/Fz8r3kclkbhDnMcsmJaoC/DCJ7/ofhcsYbn3lB+8AHyDMk/nvAvomsgUx9Hs/VRfTG
 ZF9OEhc1dGs+ssGCoO35BPB1vIlCx8plJsLAqid8d7P0Xyg5gB67Xjlb8VeihfTO8XCh
 IkVBWGnGhre8qk0h/XCt89Qor4rrO7cWvVqALlT4FCHeVxxKf6FRU7JRPLIHrJJRZR9a
 6l+bSqO73e5B3pwrcu2vAhx9GYFJwEV2jfbK2Su6ISVoujC/NuR16cFd3ozIt57T5mnB
 Zf9w==
X-Gm-Message-State: AOJu0YzFXeaydQwO1oXf2ZjuqbduoFpi4baKQxEvpq3mpD+lXYry6T6y
 bWnZYTxPH+n6iVcsVNn33bS3Gi1rKdMayEFxKPt+kaIXhWPUX5ttrYC5D/BKU6jydovTNz1iu1E
 0XtBTilg6wAaSWCSEAEbeJxDjicShc8Xkxhz5
X-Gm-Gg: ASbGnctcOpSq6PyBqquXwIIj+gEIVv5yiXGPrQz/uGgjLg7wNrwWFsj6ZWmDOQNDOOP
 xa3/XH4hQw2CsjNJ8+p8CoaFSg2vOL3EJ4VGQoPRNAwY58QM7V2K//E8i5Yr1KwopOn6v1qSfcd
 4M+e37GbFKf+rAWS+qwiKaYslxyAjy8r9Ow+Tpl6k36lMcq2o2rR9MJSJWCHNEtK9TNLNOzuS9h
 BamMfZLhH5gbZU70iolkgz/4t7sPC6uFelppMQZ7eegDmFAV+e4Kfg+bcOxiaNeQdyPiwhU3Bc+
 GgXn/smWQYFfVX28LaFmfhHPNFJW
X-Google-Smtp-Source: AGHT+IGv9eTJ+ixUDslmfAhoHZVBCdMMZWbJsYEU39X30EnXAtDIJOuv1/zbRFlVbXhdhHc2hVgRjNWqxwK4avoff/Y=
X-Received: by 2002:a53:cdc1:0:b0:63f:7da8:6b93 with SMTP id
 956f58d0204a3-64302b2bef1mr9568247d50.55.1764103822645; Tue, 25 Nov 2025
 12:50:22 -0800 (PST)
MIME-Version: 1.0
From: Richard Copley <rcopley@HIDDEN>
Date: Tue, 25 Nov 2025 20:49:56 +0000
X-Gm-Features: AWmQ_bkSQidQXWU6d9p11EfF3THX56DzL4ZyzSOYpX1pxo4ZwWQ4vALbtLbhazE
Message-ID: <CAPM58oit2XXts2ajNyL+BQYjSxTYLA+CFp57tAOOwU-ntBFMjw@HIDDEN>
Subject: 
To: GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  retitle 79889 31.0.50; emacsclient -a "" no longer works as
 documented 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (rcopley[at]gmail.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2607:f8b0:4864:20:0:0:0:b12c listed in]
 [list.dnswl.org]
 2.0 BLANK_SUBJECT          Subject is present but empty
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

retitle 79889 31.0.50; emacsclient -a "" no longer works as documented




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79889: 31.0.50; emacsclient with empty argument no longer starts emacs daemon
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Nov 2025 09:54:01 +0000
Resent-Message-ID: <handler.79889.B79889.17642372006229 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79889
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Richard Copley <rcopley@HIDDEN>
Cc: 79889 <at> debbugs.gnu.org
Received: via spool by 79889-submit <at> debbugs.gnu.org id=B79889.17642372006229
          (code B ref 79889); Thu, 27 Nov 2025 09:54:01 +0000
Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 09:53:20 +0000
Received: from localhost ([127.0.0.1]:34970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vOYgh-0001cN-W2
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2025 04:53:20 -0500
Received: from sendmail.purelymail.com ([34.202.193.197]:38716)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>)
 id 1vOYgf-0001bz-0p
 for 79889 <at> debbugs.gnu.org; Thu, 27 Nov 2025 04:53:18 -0500
DKIM-Signature: a=rsa-sha256;
 b=m3r+u5tgh0axCm7EGySXY/NEC06Obhgo9KJ9BzueAoNQWg7N9luawPhPLUd/akNkLXHaV2Xpw1+mekqWh93u6uhsJWmoCPAsaMDCN9IOevzEWoJ0+03XEOvXv4j3w6Dbc13humyKs6ThHDb3OTd0zYvrcokorzJkIWi2KlG4S42ZZm/eVs1JiAS0evgQzDBJaGtemfdg2v93j2SUF+mzfoLrsy5Qt8rWGSiCpvjutBIswiXxGU+3aoTXWn44bQq3yEzuqEKycNXfKonU8WpJeKXnafYM0/n/YQ9Rzbvkr8h8GEXEsj6rkZ5BYcHe+nnEvrVSWybSRIZpitXWcRAikQ==;
 s=purelymail2; d=spwhitton.name; v=1;
 bh=3XSe9bjw7Ec6+6wJsYzYCliyLC2b2xQ3i2RZjSZEuNk=;
 h=Received:Received:From:To:Subject:Date; 
DKIM-Signature: a=rsa-sha256;
 b=qqGGT0IjocxlWakm8TirHKtKlVBIIB4gS6s5SCKq4qO7Ns4TkOH0ZJE/j4ExE/4WoUFDQSP8BhkNkNefev3XRDd3DAWMveV7LWSleh1lY93JaWbjRs6Ge1mf8f51SleawXsyhWgabE+2l5kUj6f5JIYpf9uEs6ZuOmIohidq8jP/as0xFyXHyD2PtN1lY5TUsIOoz7XxrRDpAw2yUtTpuJw9ELpNbK8CJpDoa7aReS0+1zPWzQCF23HKi0dsuQeBWqBbG4w9eK9SlHVapLRDa9v9h2upJowzpQy62bEUWhQi/4k3ZaSuRPl4++ojnHSkI6zvGNqudRhEvXrcCRPMdg==;
 s=purelymail2; d=purelymail.com; v=1;
 bh=3XSe9bjw7Ec6+6wJsYzYCliyLC2b2xQ3i2RZjSZEuNk=;
 h=Feedback-ID:Received:Received:From:To:Subject:Date; 
Feedback-ID: 20115:3760:null:purelymail
X-Pm-Original-To: 79889 <at> debbugs.gnu.org
Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1020422547; 
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Thu, 27 Nov 2025 09:53:09 +0000 (UTC)
Received: by zephyr.silentflame.com (Postfix, from userid 1000)
 id 4C474940809; Thu, 27 Nov 2025 09:53:09 +0000 (GMT)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
References: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
Date: Thu, 27 Nov 2025 09:53:09 +0000
Message-ID: <874iqfajju.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Mon 24 Nov 2025 at 07:17pm GMT, Richard Copley wrote:

> Recipe on Windows (I did not check if the same recipe works on Linux):
> In a command prompt, run the following command, including the
> two double-quote characters:
>   emacsclientw -nca ""
>
> Expected behaviour: Emacs is started as a daemon (if an Emacs server is
> not already running), and then a new frame is created.
>
> Actual behaviour: Emacs is started as a daemon (if an Emacs server is
> not already running), and then the server prints "Unknown command:" to
> its standard output, and emacsclientw.exe shows a message box,
> ---------------------------
> Emacsclient ERROR
> ---------------------------
> *ERROR*: Unknown command:
> ---------------------------
> OK
> ---------------------------

Thanks.  This isn't reproducible here on GNU/Linux so I'm going to need
someone on Windows to investigate further so that we can fix it.

Are empty command line arguments special on Windows, do you know?

This is what I would suggest for tracking down the problem:

- start Emacs normally, do M-x server-start
- use find-function to jump to server--process-filter-1
- use C-u C-M-x to instrument it
- execute emacsclientw.exe as you describe, step through
  server--process-filter-1 with Edebug to see what exactly gets sent and
  how it gets misprocessed.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79889: 31.0.50; emacsclient with empty argument no longer starts emacs daemon
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Nov 2025 11:29:01 +0000
Resent-Message-ID: <handler.79889.B79889.176424294129994 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79889
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Sean Whitton <spwhitton@HIDDEN>
Cc: rcopley@HIDDEN, 79889 <at> debbugs.gnu.org
Received: via spool by 79889-submit <at> debbugs.gnu.org id=B79889.176424294129994
          (code B ref 79889); Thu, 27 Nov 2025 11:29:01 +0000
Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 11:29:01 +0000
Received: from localhost ([127.0.0.1]:35571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vOaBI-0007ng-EZ
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2025 06:29:00 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:54968)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vOaBF-0007nQ-27
 for 79889 <at> debbugs.gnu.org; Thu, 27 Nov 2025 06:28:58 -0500
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 <eliz@HIDDEN>)
 id 1vOaB7-0007yw-PX; Thu, 27 Nov 2025 06:28:50 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=hrq2BA8D+q7nbER7jtp2ewsecy3cJuWWJAz5YmOImeA=; b=RJRaftbXMY09
 G1k31Z9JhiB+6Urhx3B5MwI6maPXD5sY9qVu7zxToQIjm56Rh3+m77dtgiVcp7o8UprFmxzLiGt4W
 ETqMuBzKrp1Eooe9DgD/xuOZ7FLFB3x6X9e7J+PWxFEXGIjawnkEfJArn+AvlsOI2Mk6Rr98kUVGs
 3gDbg96gVuMWoUSjAsdnIXEaOkdNPCiQN5++9aHYGF4Dw35QxhsDr9Y77ffKkGuX8O9HlRT9zsjj6
 +3seXvyECREjVb6vqkQ08ydIs3XD99uUCBLazNK7hZpR7jF0MFCPXYBr9jIKbAlHXaeI/OvoOnWeF
 zEqD7Elm5EU2dzlspa98hA==;
Date: Thu, 27 Nov 2025 13:28:44 +0200
Message-Id: <867bvbbtoz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <874iqfajju.fsf@HIDDEN> (message from Sean
 Whitton on Thu, 27 Nov 2025 09:53:09 +0000)
References: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
 <874iqfajju.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 79889 <at> debbugs.gnu.org
> From: Sean Whitton <spwhitton@HIDDEN>
> Date: Thu, 27 Nov 2025 09:53:09 +0000
> 
> On Mon 24 Nov 2025 at 07:17pm GMT, Richard Copley wrote:
> 
> > Recipe on Windows (I did not check if the same recipe works on Linux):
> > In a command prompt, run the following command, including the
> > two double-quote characters:
> >   emacsclientw -nca ""
> >
> > Expected behaviour: Emacs is started as a daemon (if an Emacs server is
> > not already running), and then a new frame is created.
> >
> > Actual behaviour: Emacs is started as a daemon (if an Emacs server is
> > not already running), and then the server prints "Unknown command:" to
> > its standard output, and emacsclientw.exe shows a message box,
> > ---------------------------
> > Emacsclient ERROR
> > ---------------------------
> > *ERROR*: Unknown command:
> > ---------------------------
> > OK
> > ---------------------------
> 
> Thanks.  This isn't reproducible here on GNU/Linux so I'm going to need
> someone on Windows to investigate further so that we can fix it.
> 
> Are empty command line arguments special on Windows, do you know?

This has nothing to do with empty arguments being special on Windows
(which they aren't).  Simply put, emacsclient is now completely broken
on Windows: even just "emacsclient SOME-FILE" fails with the same
"Unknown command" error.

The reason is this change:

  --- a/lisp/server.el
  +++ b/lisp/server.el
  @@ -1267,8 +1267,10 @@ server--process-filter-1
		  args-left)
	      ;; Remove this line from STRING.
	      (setq string (substring string (match-end 0)))
  -           (setq args-left
  -                 (mapcar #'server-unquote-arg (split-string request " " t)))
  +           (cl-assert (equal (substring request -1) " ")
  +                      nil "emacsclient request did not end in SPC")
  +           (setq args-left (mapcar #'server-unquote-arg
  +                                   (nbutlast (split-string request " "))))

Specifically, the fact that we now call split-string _without_ 3rd arg
non-nil, which means we don't remove empty strings from the result.
The immediate reason for the failure is that on MS-Windows the value
of 'request' starts with a leading SPC (because emacsclient sends an
additional command "-auth AUTH-STRING" at the beginning), and that
produces an empty string as the first element of args-left, since we
no longer remove empty strings.  server--process-filter-1 then barfs
on that empty string.

You don't see that problem on Unix because there's no leading -auth
command there.

The simple patch below should fix the problem.

However, I don't understand the logic of not removing empty strings
and the assumption that nbutlast will solve the problem: it sounds
like a fragile assumption to me, and the added cl-assert's seem to
indicate that you were also wary of that.  How can we be sure there
won't be other empty strings?  Can we come up with a cleaner solution?

diff --git a/lisp/server.el b/lisp/server.el
index ca6f9e2..eefdc39 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1208,6 +1208,11 @@ server--process-filter-1
 	     (equal (match-string 1 string) (process-get proc :auth-key)))
 	(progn
 	  (setq string (substring string (match-end 0)))
+          ;; If "-auth STRING" is followed by a space, remove that
+          ;; space, to avoid having empty strings in args-left, which
+          ;; will then confuse the processing below.
+          (or (string-empty-p string)
+              (setq string (substring string 1)))
 	  (process-put proc :authenticated t)
 	  (server-log "Authentication successful" proc))
       (server-log "Authentication failed" proc)




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#79889: 31.0.50; emacsclient with empty argument no longer starts emacs daemon
Resent-From: Richard Copley <rcopley@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 27 Nov 2025 12:29:01 +0000
Resent-Message-ID: <handler.79889.B79889.176424648614732 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 79889
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 79889 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN>
Received: via spool by 79889-submit <at> debbugs.gnu.org id=B79889.176424648614732
          (code B ref 79889); Thu, 27 Nov 2025 12:29:01 +0000
Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 12:28:06 +0000
Received: from localhost ([127.0.0.1]:35962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vOb6U-0003pW-5s
	for submit <at> debbugs.gnu.org; Thu, 27 Nov 2025 07:28:06 -0500
Received: from mail-yx1-xb132.google.com ([2607:f8b0:4864:20::b132]:49454)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <rcopley@HIDDEN>) id 1vOb6R-0003oi-4V
 for 79889 <at> debbugs.gnu.org; Thu, 27 Nov 2025 07:28:04 -0500
Received: by mail-yx1-xb132.google.com with SMTP id
 956f58d0204a3-640e065991dso668232d50.3
 for <79889 <at> debbugs.gnu.org>; Thu, 27 Nov 2025 04:28:03 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1764246477; x=1764851277; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=I7fBoQHxLgM0o8MhJxuVlNKb3Rh9mMa7D1AZm0tabQk=;
 b=G3+3muGyheS6dEXXSnroavLZd3dCX6advQFUUYJaRLliBgdgsXbTZ0BToP8wdGK8/A
 kiukDVnbLBycnuvJVQ7BnXsR/dxw5InD4Tns7WsdvWBWvazqAdPL2L3qBXaBxh4IsSYF
 GcfYXk2mE1lET9gT2UkQGUidl5Wd4aigEoWSHYGK6wAtHVGCi+nmBAKK7cBTPia0m4YB
 4jXMTaTbQIJ5nwO2jMG6LudNUGjBjcPcPbBDUuQODMtp7C1lark4t0HYi5AW7gPDFN20
 87Eu8xJ9sSeG+2xjaf+8fkcZ16AkUDkIPwqACNZBPN06pofbaq/Dm7yahwOoq4fqLXaf
 POow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1764246477; x=1764851277;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=I7fBoQHxLgM0o8MhJxuVlNKb3Rh9mMa7D1AZm0tabQk=;
 b=MVFJT4HRbnTl5uKb3e92h098oE8TA917SVBpOIRzQAS3aPZofhoJL7zc7tYj2iFp62
 qSurrAsNuw6tKTgD43syYrIBv8Zuks+xJKt4r4jUe6n4ynczWIRDIMzBf4zUCwVAu7V/
 K9wgwqGsVeKogMQiu/6N3pkYs4FsWv3lwr/ayMQK+FWSL/jTeG0PYu3edEX9vXH4Zfdt
 BByE4nFY0VejNZ3DqGEKsTX2JXH3e5KIw1vfosVeGOKNw3JdzjNp58X8t2CGVFaRdKlG
 CYWcvkM9GNEpniq+6djmoxs0bHMYK4nIcdvJP3k+bBAz4rzk5nxjDiGHYfl1/EZOJbZ4
 Kqsw==
X-Forwarded-Encrypted: i=1;
 AJvYcCXoUqEdl2/bYV14tRLw5dssk7/65alqI7/4P6ChjJ95z8WZOOeDyb3x7646UFF1DFTRI86ddQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YwmoBEwvb5YNpqdbFg53Y565T6TGthG4mcJd/F6tfyCXlYV0Uh5
 T3bbXCXYwz3wwENk2giTy8t0wvAr/ls5avrkNPp26Zq6oYDnhCrf4W+vS2Qdg5V7pySVCF+pV6z
 Ms1+lEyWQdNk5b8rnA0WyTXAUY+pPhn0=
X-Gm-Gg: ASbGncsMbdLn9c1n7SyjZoeCUpmrdTiMduTxzWv/Ps5k0+f+SWa2bX7bvwRHzXw95rh
 sSHg3dSXaKugyf341JWo5T3hpvxDLIk/gLsnTwp1AilVAyD/yfJkmd84a/vF9rf+mcm7P0ohU1u
 fKao+DfjDgYRsHbJrlmOLD7D0UhsQMVEppq3eaA/w/UJQ+nrFtnX1W8kKAZPxJmSKz5volf4HUR
 Vynw/4oOYefWWdpKGby6wt0PWWZKNJXKQGUXV/Vw+Pp9hcDaobPyTchP/96JcrgMD453M6x+QbE
 d2wWsuUB5r6vTO8mL4wv7Oigf679
X-Google-Smtp-Source: AGHT+IHd2nPFlf0czvks4JlF4gDq11X/IRUxy1goMJMyb3E1xab8itOnAzmZ6Yvuzqm1xIiZ/f759qjRLJK4uOvkviI=
X-Received: by 2002:a05:690c:6d06:b0:78a:74d4:463c with SMTP id
 00721157ae682-78a8b499cf1mr177173357b3.28.1764246477213; Thu, 27 Nov 2025
 04:27:57 -0800 (PST)
MIME-Version: 1.0
References: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
 <874iqfajju.fsf@HIDDEN> <867bvbbtoz.fsf@HIDDEN>
In-Reply-To: <867bvbbtoz.fsf@HIDDEN>
From: Richard Copley <rcopley@HIDDEN>
Date: Thu, 27 Nov 2025 12:27:31 +0000
X-Gm-Features: AWmQ_bnGcuZ1tBXcDwm0ddTLx5fL__c4mp8C3A6Cw8vGHzRpoTGvlWzj2wy9Eq0
Message-ID: <CAPM58og5yFaWD-RAy3==3AJDDFeqo4oxyd+H5WtyHU_LHcRaWA@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, 27 Nov 2025 at 11:28, Eli Zaretskii <eliz@HIDDEN> wrote:
>
> The simple patch below should fix the problem.

Or this one:

diff --git a/lisp/server.el b/lisp/server.el
index ca6f9e2448b..7eca01d853a 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1204,7 +1204,7 @@ server--process-filter-1
   (server-log (concat "Received " string) proc)
   ;; First things first: let's check the authentication
   (unless (process-get proc :authenticated)
-    (if (and (string-match "-auth \\([!-~]+\\)\n?" string)
+    (if (and (string-match "-auth \\([!-~]+\\)[ \n]?" string)
          (equal (match-string 1 string) (process-get proc :auth-key)))
     (progn
       (setq string (substring string (match-end 0)))

Either works for me.




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 30 Nov 2025 07:16:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 30 02:16:55 2025
Received: from localhost ([127.0.0.1]:36075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vPbfy-0006gj-QT
	for submit <at> debbugs.gnu.org; Sun, 30 Nov 2025 02:16:55 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37628)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>)
 id 1vPbfv-0006gL-LW; Sun, 30 Nov 2025 02:16:52 -0500
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 <eliz@HIDDEN>)
 id 1vPbfo-0004d4-JH; Sun, 30 Nov 2025 02:16:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=M4ZJff3t5s8JLYAQWoqY6oEegmLdoWKTqwYioIw2VN0=; b=TXowgODUXtqo
 pAzy8WNzXwXNcg7yFRVbmEVBcqjKG5srhSK5cEJxpEdxXc1s4HHSSL2vYIa5blCgOnyjCAOyWMZSD
 j4tC+iylgdST3e6p2ILhvEx/EZzaG1rFJIVXxDnzcYEMc5n5PIAqNHDUFyN/+28ta7OIKrbXVrEQ7
 miTGPPF5IjQd/0Bmg8JDowvAPQ/B06DC8WJ4eIptne3def1q2p0bQU6smuLumBWEhdthW/oMU/V5B
 MAk6bok0LACNp0FkKKugOAdEVnTn4uQIgZkeQ5yhKg8vZXSfE9Nd0fWNDdK+XhhKoXpWxZGpgpHpA
 Pf/n4L0dH4yI7serWiSIJQ==;
Date: Sun, 30 Nov 2025 09:16:41 +0200
Message-Id: <86ldjo56sm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "Yue Yi" <include_yy@HIDDEN>, Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <tencent_61E77A27F3F71938BB639E95406524B40807@HIDDEN>
 (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#79913: 31.0.50;
 68e337e: server--process-filter-1 breaks emacsclient even without
 empty string arguments
References: <tencent_61E77A27F3F71938BB639E95406524B40807@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
Cc: 79913 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

merge 79913 79889
thanks

> Date: Sun, 30 Nov 2025 13:57:55 +0800
> From:  "Yue Yi" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Hi, Emacs maintainers,
> 
> In a recently compiled Emacs, I noticed that the magit-commit in Magit
> is no longer working. Instead, it outputs an "Unknown command" message.
> Using grep, I traced this error message back to server.el. I also tested
> emacsclient with a simple argument (e.g., emacsclient 1.txt) and it
> results in the same error. (I should clarify that I am on Windows.)
> 
> ------------------------------>8<-------------------------------------------
> @@ -1267,8 +1267,10 @@ server--process-filter-1
>  		args-left)
>  	    ;; Remove this line from STRING.
>  	    (setq string (substring string (match-end 0)))
> -	    (setq args-left
> -		  (mapcar #'server-unquote-arg (split-string request " " t)))
> +	    (cl-assert (equal (substring request -1) " ")
> +		       nil "emacsclient request did not end in SPC")
> +	    (setq args-left (mapcar #'server-unquote-arg
> +				    (nbutlast (split-string request " "))))
>  	    (while args-left
>                (pcase (pop args-left)
>                  ;; -version CLIENT-VERSION: obsolete at birth.
> ------------------------------>8<-------------------------------------------
> 
> Commit 68e337e changed the usage of split-string, but the problem is
> that the `request' variable starts with whitespace. This leads to an
> effect similar to the following:
> 
> (split-string " a b c " " ") => ("" "a" "b" "c" "")
> 
> Here is a possible fix:
> 
> ------------------------------>8<-------------------------------------------
> @@ -1270,7 +1270,7 @@
>  	    (cl-assert (equal (substring request -1) " ")
>  		       nil "emacsclient request did not end in SPC: %S" request)
>  	    (setq args-left (mapcar #'server-unquote-arg
> -				    (nbutlast (split-string request " "))))
> +				    (split-string (string-trim request " "))))
>  	    (while args-left
>                (pcase (pop args-left)
>                  ;; -version CLIENT-VERSION: obsolete at birth.
> ------------------------------>8<-------------------------------------------
> 
> Of course, this only solves the immediate problem I am facing, and
> perhaps we need a better approach.

This is a duplicate of an existing bug#79889, so I'm now merging it.

Sean, would you please look into fixing this ASAP?  Several fixes were
already suggested, but I'm not sure what is the best for the new
support of the empty strings, which triggered this.





Last modified: Sun, 30 Nov 2025 07:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.