GNU bug report logs - #79609
31.0.50; server-visit-files asks a y-or-n-p question that blocks new clients

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: Daniel Clemente <n142857@HIDDEN>; Done: Eli Zaretskii <eliz@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug closed, send any further explanations to 79609 <at> debbugs.gnu.org and Daniel Clemente <n142857@HIDDEN> Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 79609) by debbugs.gnu.org; 20 Oct 2025 12:12:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 20 08:12:43 2025
Received: from localhost ([127.0.0.1]:44447 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAokl-0006e7-3j
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 08:12:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46990)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vAoki-0006dM-Jj
 for 79609 <at> debbugs.gnu.org; Mon, 20 Oct 2025 08:12:40 -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 <eliz@HIDDEN>)
 id 1vAokd-00061Q-6l; Mon, 20 Oct 2025 08:12:35 -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=lvVp6PxPhgEp7cfxQidUFM9IpCGD7Lvz3WXnGqIKwBU=; b=jcb1AL3DL/0lmBjpaQ+4
 GZbbK47RlHm9fT6X7ooRmzn9Ij35/W3B7ijWlaV+lIKWkufV37X+ESxuiytYyTFBM0vMjv9gPWkeW
 Z4Y4E3jgUH2RXCICOZwBLHwMnCDhsfT0jnJ+7SwFoN47xVizZbE3LylUt6n7ABvuAZbtr5AZ2apRQ
 kh1AL2pn2AkFrrZREhpA8RpOb2y0wTtqldGGicOpt1y0ZB2tTe9d3e7adCbepV7VvrctycknA0fgT
 Kw0OhkfhMW5KnU9r1cRxPr10JZGckY3mhVZ4fG42c+OYmR+SJ/sAj0MwIeT9eK6MM9tSh7GPX1ZOB
 51ZYLkFLahxMQg==;
Date: Mon, 20 Oct 2025 15:11:44 +0300
Message-Id: <86o6q1ydq7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Daniel Clemente <n142857@HIDDEN>
In-Reply-To: <CAJKAhPAHws11F7xn_VfiJwzEC0u+WRohfiB7JAfAMgFEc_+sSA@HIDDEN>
 (message from Daniel Clemente on Mon, 20 Oct 2025 10:43:36 +0000)
Subject: Re: bug#79609: 31.0.50; server-visit-files asks a y-or-n-p question
 that blocks new clients
References: <CAJKAhPBDiW6cNcQUMN4Tjy7vbCFQP8uOSR=nxVjk5JNBOQeDXQ@HIDDEN>
 <86ms5oegd1.fsf@HIDDEN>
 <CAJKAhPAHws11F7xn_VfiJwzEC0u+WRohfiB7JAfAMgFEc_+sSA@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79609
Cc: 79609 <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 (---)

> From: Daniel Clemente <n142857@HIDDEN>
> Date: Mon, 20 Oct 2025 10:43:36 +0000
> Cc: 79609 <at> debbugs.gnu.org
> 
> > This is a limitation of how Emacs currently handles keyboard input
> > from multiple clients: when some client waits for the user to respond,
> > no other client can interact with the user.  So this is unrelated to
> > this particular issue.
> 
> I've seen exceptions, in which a client can and does answer another
> client's answer. For instance a frame opens with a pending question
> ("Save file?") from another client that disappeared (was killed) while
> answering the question (triggered by a C-x C-c); in fact it even
> recovers the pending question when all clients had disappeared.
> Recovering a pending question could be a good behavior for cases like
> the one reported here.
> 
> But I think that avoiding the y-or-n-p (with your patch) is everything we need.
> 
> 
> I tried your patch, opening several clients in each case, visiting:
> - no file as parameter
> - existing file
> - existing file, and then altering the buffer and opening more clients
> - non-existing file
> - non-existing file, and then altering the buffer and opening more clients
> - existing file, which I then delete in in the background. Only then I
> see the question („file no longer exists …“), which is useful
> 
> So yes, the patch is complete, thanks.

Thanks, now installed on the master branch, and closing the bug.




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

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


Received: (at 79609) by debbugs.gnu.org; 20 Oct 2025 10:44:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 20 06:44:14 2025
Received: from localhost ([127.0.0.1]:44136 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAnN8-0004oF-20
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 06:44:14 -0400
Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]:52642)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <n142857@HIDDEN>) id 1vAnN4-0004nd-RL
 for 79609 <at> debbugs.gnu.org; Mon, 20 Oct 2025 06:44:11 -0400
Received: by mail-vk1-xa2d.google.com with SMTP id
 71dfb90a1353d-54bc2d1feb2so1088834e0c.1
 for <79609 <at> debbugs.gnu.org>; Mon, 20 Oct 2025 03:44:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760957045; x=1761561845; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=goQt9kKB5yq41Z97FiCjjbAh720NaxyvcNaTe8JF2hY=;
 b=my9rxlveiYi/zSo2T3P+s4HgIUwKE3cKbaoIY+iSQ9ImqtQ9H8M68XThVG0QFEiJEx
 ySQABJyVZoUwet/sWzNXZquJ3l26H5x0Mr0RUBBRcvY97LnruVxa9HHWzFWJIVhO99YX
 bwgbmtxsKoIF68fbRbXP1xQQp5REdTs063QWV7fAPZPez2HGe1dabtfrI/ZHhIAkp/P6
 nmU8jHXdQpiY+4CRwtvQSjHalgeI1UL9I/Y9cf8nRYlr1IklC4r7qY5YO8hhiLDGQWj8
 5ozHUTHCjsPRbL+fUKegCJJ7FmQnPbYvmuh4AopK4QjKiwrplM8pCqtwZpDdzt421m7v
 RVCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760957045; x=1761561845;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=goQt9kKB5yq41Z97FiCjjbAh720NaxyvcNaTe8JF2hY=;
 b=o7ukXf694FQaH8be5nrjl+Q6mOcx7xMhAV5N4nh403Lzt5DYWqVcPfuABCy7sInZ4k
 TCae60l49AQ0OvyLKUkTBzz0NbOJv/8zGGKP3yUC17n3GVx0kch8eoENLYQaVJEFfoQ1
 XcMHT5Ar0KQUpXKq/dwT0Ac2mrDJooU4XbsPEcnkb6KIMIYiCUKu89wIjwLeTVYGfNPk
 P4Q8Ekfy/zTwV52VLqpcZ8rwqrxlcEkUOIz62efKLSwFo6rSXHyJUynv+Tfebi4xISqr
 MXIblf80lvXvykI/Mtm7xIS8vng4f3ohCKkbOGVZX/MKlrHZGrZQiVmg9r+8BothnwvW
 pRow==
X-Gm-Message-State: AOJu0Yyt6mqGZ6qzbNIEzm5/Yr4qcDe/bbj1oUzZfHwl15NCrOZ3NKK0
 uIIAgP3Otr3wXvY3rRiOfJJMx3bMcn+CFT1PVhI+mmAW2s7gqpXi2PSC4s8OLCDNcjkKotE50do
 Nf61NzdUt3aKAFGYw2Kb5IW9sB51idr1+AjeV
X-Gm-Gg: ASbGncvpavqMV1rvcmLPHi/YLLsnhGQQPcBv4RlpiBnRwK6O8lfH9d7xC2/F7N3QDSx
 s2bRG+EXTOgzoPKXLaGjUsNVED5G3+6/h9+hzgn1mlgBkAW2+2RD2/mLQxtnp0Di/OCPeRkaORd
 QZRoTjaHLwie5jwZwCqabsstiAvETAyJinvJ9q48N087BFO0HODDHvYDnsLC8QL8jHiAKIQ1/hF
 7VWXJIB7Jgg6i/YJ3l7Tz81n9AifhSUm2+fonk2BC7yhgYGnx7mYR+pycnx/WVPkwSPUjlAyQxj
 bD9vVZT2PNo3VjjI0ue/wUQkvotT21rf0V23+lgeEcVl5mW3Wf9ryy0FVJSGk11ujcvMbHQhKV5
 ZlLC8bj28sMeUcWsiX2wOFVRPZ66fyq9NPiKRGV1b2g43NnwBz2MQJgPc3jW07zvg8j1Aka8A6W
 +Rgc1EUnQrzArCQbB74MsFyC2VvC1uwqc34S4sPWk/GYAy4KyWqh5GsYbW
X-Google-Smtp-Source: AGHT+IGm2+zrWTde6TlliM3OsS/L6G0s1zcPXMpmq9qXLHHqduTV2CBXOrx3yU7fx4sCY4bUmk6hqIEt23ge+hbBivQ=
X-Received: by 2002:a05:6122:8c1b:b0:54c:5f47:9260 with SMTP id
 71dfb90a1353d-5564ee6c2eemr3317729e0c.7.1760957044759; Mon, 20 Oct 2025
 03:44:04 -0700 (PDT)
MIME-Version: 1.0
References: <CAJKAhPBDiW6cNcQUMN4Tjy7vbCFQP8uOSR=nxVjk5JNBOQeDXQ@HIDDEN>
 <86ms5oegd1.fsf@HIDDEN>
In-Reply-To: <86ms5oegd1.fsf@HIDDEN>
From: Daniel Clemente <n142857@HIDDEN>
Date: Mon, 20 Oct 2025 10:43:36 +0000
X-Gm-Features: AS18NWAQXm0bwK_qMGfdb5iZFdiIlFi9tdc6Sx6q1ha2kdm_q8f2vuczmBV6pYs
Message-ID: <CAJKAhPAHws11F7xn_VfiJwzEC0u+WRohfiB7JAfAMgFEc_+sSA@HIDDEN>
Subject: Re: bug#79609: 31.0.50; server-visit-files asks a y-or-n-p question
 that blocks new clients
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 79609
Cc: 79609 <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: -0.7 (/)

> This is a limitation of how Emacs currently handles keyboard input
> from multiple clients: when some client waits for the user to respond,
> no other client can interact with the user.  So this is unrelated to
> this particular issue.

I've seen exceptions, in which a client can and does answer another
client's answer. For instance a frame opens with a pending question
("Save file?") from another client that disappeared (was killed) while
answering the question (triggered by a C-x C-c); in fact it even
recovers the pending question when all clients had disappeared.
Recovering a pending question could be a good behavior for cases like
the one reported here.

But I think that avoiding the y-or-n-p (with your patch) is everything we n=
eed.


I tried your patch, opening several clients in each case, visiting:
- no file as parameter
- existing file
- existing file, and then altering the buffer and opening more clients
- non-existing file
- non-existing file, and then altering the buffer and opening more clients
- existing file, which I then delete in in the background. Only then I
see the question (=E2=80=9Efile no longer exists =E2=80=A6=E2=80=9C), which=
 is useful

So yes, the patch is complete, thanks.




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

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


Received: (at 79609) by debbugs.gnu.org; 18 Oct 2025 08:58:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 18 04:58:38 2025
Received: from localhost ([127.0.0.1]:38427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vA2lp-0002Rb-8B
	for submit <at> debbugs.gnu.org; Sat, 18 Oct 2025 04:58:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39268)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vA2lj-0002PO-6Y
 for 79609 <at> debbugs.gnu.org; Sat, 18 Oct 2025 04:58:34 -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 <eliz@HIDDEN>)
 id 1vA2ld-0002lh-22; Sat, 18 Oct 2025 04:58:25 -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=5uEez//JWRNR+lN7ohkilKOjnrgudiBo4conibC4FcI=; b=J2MddSNWP6xoj6HZqr1G
 a0tn4cyby/Xx7/zFgyCNrQ0gk9Fs+wSBSuryCJvC9rrD/ineX2+bYn1WpMr3YgVXF8eho12jeVYhD
 JsUWy9hUqL3DfkD/ZVyEZsd4MhusrNRB3dH1ENe6QawPF3/omBpiAnMHOOF8nG3BYb3lvQoPyPcGk
 I0F8Y6BnPEaHTPHTWtZNydu5McFbCoYCXHdL8LFsCd01u90VeggUamiSwQlnwx+uPNp/wPj9ClI4K
 2dtXNa2AllpZyvOd8FrbXEbSBZtWBIFzo0qqrAkfQcDJSbevfFQ2cd7psAW+jopE3LtkQbLoRD4dH
 XJu7dorAgUkY2g==;
Date: Sat, 18 Oct 2025 11:58:18 +0300
Message-Id: <86ms5oegd1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Daniel Clemente <n142857@HIDDEN>
In-Reply-To: <CAJKAhPBDiW6cNcQUMN4Tjy7vbCFQP8uOSR=nxVjk5JNBOQeDXQ@HIDDEN>
 (message from Daniel Clemente on Fri, 10 Oct 2025 10:24:52 +0000)
Subject: Re: bug#79609: 31.0.50;
 server-visit-files asks a y-or-n-p question that blocks new clients
References: <CAJKAhPBDiW6cNcQUMN4Tjy7vbCFQP8uOSR=nxVjk5JNBOQeDXQ@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79609
Cc: 79609 <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 (---)

> From: Daniel Clemente <n142857@HIDDEN>
> Date: Fri, 10 Oct 2025 10:24:52 +0000
> 
> If I visit a non-existing file with a 2nd emacsclient, it asks a
> question the prevents other emacsclient from connecting.
> 
> I run this, to open 1 server and 3 clients:
> 
> /w/emacs-dev/src/emacs --daemon -Q
> for i in `seq 3`; do
>   urxvt -e '/w/emacs-dev/lib-src/emacsclient' -nw '~/newfile1' &
>   sleep 2  # Optional. You get the same behavior if you wait or if you don't
> done
> 
> Then:
> 1. the first client doesn't ask any question
> 2. the second client asks the question:  "File no longer exists:
> ~/newfile1, write buffer to file? "
> 3. the third client doesn't open, because the server is busy waiting
> for y-or-n-p (backtrace shows this, attached below). Further clients
> show the same behavior ("server not responding"…)
> 4. if you kill the X windows of the three clients, you're stuck: you
> can't open new clients, because the server is still busy waiting for
> y-or-n-p, and you can't answer the question, because the client asking
> it has disappeared

Thanks.  Does the patch below give good results, without introducing
any new problems?

> I don't think this bug matters in real-world scenarios. I found it
> while researching other bugs, and it's just a minor annoyance.
> 
> Ideas:
> 1. server-visit-files is doing more than what its documentation says,
> it's also checking for unsaved buffers and offering to save them.
> Either the documentation or the behavior can be updated

I added that nit to the doc string.

> 2. The question isn't really needed. The buffer was never saved, the
> file wasn't deleted (it never existed), and there are no possible
> changes that could be worth saving. Avoiding the question would fix
> this case

The patch below should do that.

> 3. An open y-or-n-p question shouldn't block new clients. Just as a
> y-or-n-p question can be dismissed by C-g, closing a client or opening
> a new one should dismiss the blocked y-or-n-p questions

This is a limitation of how Emacs currently handles keyboard input
from multiple clients: when some client waits for the user to respond,
no other client can interact with the user.  So this is unrelated to
this particular issue.

Here's the patch to try:

diff --git a/lisp/server.el b/lisp/server.el
index 70299d5..4390562 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1589,6 +1589,7 @@ server-goto-line-column
 
 (defun server-visit-files (files proc &optional nowait)
   "Find FILES and return a list of buffers created.
+If some file was deleted since last visited, offer to save its buffer.
 FILES is an alist whose elements are (FILENAME . FILEPOS)
 where FILEPOS can be nil or a pair (LINENUMBER . COLUMNNUMBER).
 PROC is the client that requested this operation.
@@ -1620,7 +1621,9 @@ server-visit-files
             (cond ((file-exists-p filen)
                    (when (not (verify-visited-file-modtime obuf))
                      (revert-buffer t nil)))
-                  (t
+                  ;; Only ask the question if the file did exist at some
+                  ;; point, but was deleted since.
+                  ((listp (visited-file-modtime))
                    (when (y-or-n-p
                           (concat "File no longer exists: " filen
                                   ", write buffer to file? "))




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

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


Received: (at submit) by debbugs.gnu.org; 10 Oct 2025 10:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 10 06:25:40 2025
Received: from localhost ([127.0.0.1]:41219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v7AJg-0002IC-1t
	for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 06:25:40 -0400
Received: from lists.gnu.org ([2001:470:142::17]:33056)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <n142857@HIDDEN>) id 1v7AJZ-0002Hr-6h
 for submit <at> debbugs.gnu.org; Fri, 10 Oct 2025 06:25:33 -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 <n142857@HIDDEN>) id 1v7AJT-0007GS-J9
 for bug-gnu-emacs@HIDDEN; Fri, 10 Oct 2025 06:25:27 -0400
Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <n142857@HIDDEN>) id 1v7AJN-0000lj-Et
 for bug-gnu-emacs@HIDDEN; Fri, 10 Oct 2025 06:25:26 -0400
Received: by mail-vk1-xa30.google.com with SMTP id
 71dfb90a1353d-54bbf3329c1so1633196e0c.1
 for <bug-gnu-emacs@HIDDEN>; Fri, 10 Oct 2025 03:25:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760091918; x=1760696718; darn=gnu.org;
 h=content-transfer-encoding:to:subject:message-id:date:from
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=uwzxDv4w1dq4KR9zVfg4W/NiRwGE6nTz5w+i8UprErE=;
 b=M2OIN8z4plpmQHXy70wn1lnUMk9OiSGt2uZjDGkmfXCljkfCDHyuhobNqP98Ms7Rlp
 5nuzZwf2QJRu/6lI1RiovGMv4VDj+KE3NK04I3cpGGkE9+uWWukwjvNshigYLPAraQRg
 pXIpnLtTAlrp9guLVsRaDtab6CuHoRAgksXoCJ5Fd8YbH5i3nNVxwWyTSWUt9pe/yrSo
 FJtKPAjWgaJEjoSjDnV4IKFnyZpUx8Xrv8gRLQ8uqUlx4JMyq7hkDoCb7pPIPoZLwx28
 KOpNCaivfiIpKl2dfN1y0u9239bsCDxoz5ZhyE+DU7nI04kwLIPJloZSG9w8T1AjtB/z
 HdHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760091918; x=1760696718;
 h=content-transfer-encoding:to:subject:message-id:date:from
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=uwzxDv4w1dq4KR9zVfg4W/NiRwGE6nTz5w+i8UprErE=;
 b=FWwfQ6BYVbx2jtbKq/DSDQUCL/mnY8KBazIiUg9aZjlZzN/nPlDYD9YDYMwH0qvEVy
 UmR9xGD7bDJNAUTPQkxR3y+JEdE63Phusw4mf/6x/t173+umR2VlOonIrsa90/wVOIeg
 UMUm+I4UiQXh9es5toFBgS+neNqcnZdavOWKPThk3vot6r6vRapefU9S8nQ80Y4ne9Et
 3qLyGZHIAvmp4lnB1R6hwaND/Oms5AqX+ft2Zal+7Q0hNmssrnSBnovGNsXtH/0Hfels
 zBpxNo29qwmArgwwfUd67qPp2bGaB1jofznLuRilcwf2lngXF7qd2zMwPV7TD9y1wGhY
 xNeg==
X-Gm-Message-State: AOJu0YyWGSP7pQbjsQEC9cNetbgTYTZ/PfTDc+5mFWjMJiSVMT0UFcOa
 CVNQqJAH5QYMFjCac3xNE8lJiFmoKA92jXo0/CAboTSg26jpZKCkdt4cspoYz+dTdxFbtGfpJay
 ltLDZjOx7wSF3M17TXmIAjNwb3cMq4Zrw7L+6
X-Gm-Gg: ASbGnculzlDQQwwyEISlK7HA+s7n2D1H4D2IA7L3HHpkcFWlTWFs7WHBA0SsXqU/yLb
 RmvFZ+YX/dzYAerfA6pNQ0diF0V0eT2awLgjEj1G9DwRNKKTkLBjt+NDfGqBnisXgDp3NBAKLkV
 Oxk6etDR3HGgC1NKhYQ4x4mquNwugHlF4UqIDtasx44wT3zhHLD+jJi/Bp0zPtofxJA14MG80X9
 4rG8zSWqHWn6dSjKlGWt/DQftiqFCW86BmFvRsBwxhet9tmYuDZQCa3prXJ1cShSfI4bPfFAlLR
 5swXoWoUXQTPrTUuVDoBM6LSzbyNA8669L4wXsoMg3syDDQoZPe+E52ECjyQ6LjpAlj5vCrzKko
 woNGX3G6Lv40X4wuL4FTD6o1UKm6Gqo/pbZ7nGYi4eCI5V6eanyGWBE4GqVx3M3UwgmKVSljSjr
 jp2pKRjWDyv1DiwquU4289l2oHjnSbCv1u
X-Google-Smtp-Source: AGHT+IHFopd1O6vpoBMdBJS25hVIJNSjgIA6U6pvpFT7L90tBmkZnYhwgSq8zSWn+LAoh6AxkMCFfvMe01OyIMowTnI=
X-Received: by 2002:a05:6122:1e08:b0:553:6cf3:2be0 with SMTP id
 71dfb90a1353d-554a8f27c38mr6927178e0c.5.1760091918484; Fri, 10 Oct 2025
 03:25:18 -0700 (PDT)
MIME-Version: 1.0
From: Daniel Clemente <n142857@HIDDEN>
Date: Fri, 10 Oct 2025 10:24:52 +0000
X-Gm-Features: AS18NWCOSuKQfsA8-qZvu6bsBd3yGcn1ckPT5oP9RjkJ8Ib5swYdlCL71PsHgUE
Message-ID: <CAJKAhPBDiW6cNcQUMN4Tjy7vbCFQP8uOSR=nxVjk5JNBOQeDXQ@HIDDEN>
Subject: 31.0.50;
 server-visit-files asks a y-or-n-p question that blocks new clients
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::a30;
 envelope-from=n142857@HIDDEN; helo=mail-vk1-xa30.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.2 (+)
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:  If I visit a non-existing file with a 2nd emacsclient, it
 asks a question the prevents other emacsclient from connecting. I run this,
 to open 1 server and 3 clients: /w/emacs-dev/src/emacs --daemon -Q for i
 in `seq 3`; do urxvt -e '/w/emacs-dev/lib-src/emacsclient' -nw '~/newfile1'
 & sleep 2 # Optional. You get the same behavior if you wait or if you don't
 done Content analysis details:   (1.2 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (n142857[at]gmail.com)
 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
 in digit (n142857[at]gmail.com)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
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.2 (/)

If I visit a non-existing file with a 2nd emacsclient, it asks a
question the prevents other emacsclient from connecting.

I run this, to open 1 server and 3 clients:

/w/emacs-dev/src/emacs --daemon -Q
for i in `seq 3`; do
  urxvt -e '/w/emacs-dev/lib-src/emacsclient' -nw '~/newfile1' &
  sleep 2  # Optional. You get the same behavior if you wait or if you don'=
t
done

Then:
1. the first client doesn't ask any question
2. the second client asks the question:  "File no longer exists:
~/newfile1, write buffer to file? "
3. the third client doesn't open, because the server is busy waiting
for y-or-n-p (backtrace shows this, attached below). Further clients
show the same behavior ("server not responding"=E2=80=A6)
4. if you kill the X windows of the three clients, you're stuck: you
can't open new clients, because the server is still busy waiting for
y-or-n-p, and you can't answer the question, because the client asking
it has disappeared

I don't think this bug matters in real-world scenarios. I found it
while researching other bugs, and it's just a minor annoyance.

Ideas:
1. server-visit-files is doing more than what its documentation says,
it's also checking for unsaved buffers and offering to save them.
Either the documentation or the behavior can be updated
2. The question isn't really needed. The buffer was never saved, the
file wasn't deleted (it never existed), and there are no possible
changes that could be worth saving. Avoiding the question would fix
this case
3. An open y-or-n-p question shouldn't block new clients. Just as a
y-or-n-p question can be dismissed by C-g, closing a client or opening
a new one should dismiss the blocked y-or-n-p questions


More data:

(gdb) xbacktrace
"read-from-minibuffer" (0xf33ff948)
"completing-read-default" (0xffff8848)
"completing-read" (0xf33ff878)
"read-extended-command-1" (0xf33ff818)
"read-extended-command" (0xf33ff7c0)
"byte-code" (0xffff8f80)
"call-interactively" (0xf33ff730)
"command-execute" (0xffff9c78)
"read-from-minibuffer" (0xf33ff698)
"completing-read-default" (0xffffa838)
"completing-read" (0xf33ff5c8)
"read-extended-command-1" (0xf33ff568)
"read-extended-command" (0xf33ff510)
"byte-code" (0xffffaf70)
"call-interactively" (0xf33ff480)
"command-execute" (0xffffbc68)
"read-from-minibuffer" (0xf33ff3f8)
"y-or-n-p" (0xf33ff390)
"server-visit-files" (0xf33ff2e8)
"server-execute" (0xf33ff240)
0x55bc3560 PVEC_CLOSURE
"server-execute-continuation" (0xf33ff160)
"server--process-filter-1" (0xf33ff088)
"server--process-filter-all-pending" (0xf33ff048)
"server-process-filter" (0xffffc7f8)
(gdb)

In GNU Emacs 31.0.50 (build 25, x86_64-pc-linux-gnu) of 2025-10-08 built
 on sonn
Repository revision: 3c20a2bb25a0c4ef6e4cea5c815a46f0d14f37dd
Repository branch: master
System Description: Devuan GNU/Linux 5 (daedalus)

Configured using:
 'configure --prefix=3D/opt/dc/emacs-dev/ --without-dbus --with-tiff=3Dno
 --without-tiff --without-libsystemd --without-dbus --with-mailutils
 --without-modules --with-native-compilation=3Dno --with-x-toolkit=3Dno
 --without-imagemagick --without-xft --without-harfbuzz
 --without-freetype --without-libotf --without-xwidgets --without-xpm
 --without-jpeg --without-gif --without-png --without-webp
 --without-rsvg --without-cairo --without-x --without-sound
 --enable-checking=3Dyes,glyphs --enable-profiling 'CFLAGS=3D-g3 -O0 ''

Configured features:
GMP GNUTLS LCMS2 LIBSELINUX LIBXML2 NOTIFY INOTIFY PDUMPER SECCOMP
SQLITE3 THREADS XIM ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=3DSCIM
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  server-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-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 regexp-opt mail-extr emacsbug lisp-mnt message mailcap
yank-media puny dired dnd 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 sendmail mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-git diff-mode
track-changes easy-mmode files-x vc-dispatcher image term/rxvt
term/xterm xterm byte-opt gv bytecomp byte-compile server warnings icons
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select 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 inotify
lcms2 multi-tty make-network-process tty-child-frames emacs)

Memory information:
((conses 16 58828 9949) (symbols 48 7250 1) (strings 32 19178 1251)
 (string-bytes 1 510489) (vectors 16 10221)
 (vector-slots 8 97804 7214) (floats 8 56 15930) (intervals 56 259 3)
 (buffers 984 14))




Acknowledgement sent to Daniel Clemente <n142857@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#79609; 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: Mon, 20 Oct 2025 12:15:02 UTC

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