GNU bug report logs - #79889
31.0.50; emacsclient -a "" no longer works as documented

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richard Copley <rcopley@HIDDEN>; merged with #79913; dated Tue, 25 Nov 2025 20:28:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 79889 79913. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 12:28:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 07:28:06 2025
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>
Subject: Re: bug#79889: 31.0.50; emacsclient with empty argument no longer
 starts emacs daemon
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79889
Cc: 79889 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN>
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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79889; Package emacs. Full text available.

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


Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 11:29:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 06:29:01 2025
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>
To: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <874iqfajju.fsf@HIDDEN> (message from Sean
 Whitton on Thu, 27 Nov 2025 09:53:09 +0000)
Subject: Re: bug#79889: 31.0.50;
 emacsclient with empty argument no longer starts emacs daemon
References: <CAPM58ohB1LVdXp5F2NND_DBmrJLYhwSK0q-UaWg-Sj3b4JZt1g@HIDDEN>
 <874iqfajju.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79889
Cc: rcopley@HIDDEN, 79889 <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 (---)

> 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)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79889; Package emacs. Full text available.

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


Received: (at 79889) by debbugs.gnu.org; 27 Nov 2025 09:53:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 27 04:53:20 2025
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>
To: Richard Copley <rcopley@HIDDEN>
Subject: Re: bug#79889: 31.0.50; emacsclient with empty argument no longer
 starts emacs daemon
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-Debbugs-Envelope-To: 79889
Cc: 79889 <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: -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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79889; Package emacs. Full text available.
Changed bug title to '31.0.50; emacsclient -a "" no longer works as documented' from '31.0.50; emacsclient with empty argument no longer starts emacs daemon' Request was from Richard Copley <rcopley@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 25 Nov 2025 20:27:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:27:39 2025
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>
Subject: 31.0.50; emacsclient with empty argument no longer starts emacs daemon
To: bug-gnu-emacs@HIDDEN, spwhitton@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-Debbugs-Envelope-To: submit
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))




Acknowledgement sent to Richard Copley <rcopley@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#79889; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
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.