From unknown Sat Jun 21 03:04:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21723 <21723@debbugs.gnu.org> To: bug#21723 <21723@debbugs.gnu.org> Subject: Status: 24.5; Bug in `server-kill-emacs-query-function' Reply-To: bug#21723 <21723@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:04:31 +0000 retitle 21723 24.5; Bug in `server-kill-emacs-query-function' reassign 21723 emacs submitter 21723 Eli Barzilay severity 21723 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 21 04:52:15 2015 Received: (at submit) by debbugs.gnu.org; 21 Oct 2015 08:52:15 +0000 Received: from localhost ([127.0.0.1]:58719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zop83-0000Ck-6J for submit@debbugs.gnu.org; Wed, 21 Oct 2015 04:52:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42931) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zop81-0000Cc-21 for submit@debbugs.gnu.org; Wed, 21 Oct 2015 04:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zop7w-000812-Du for submit@debbugs.gnu.org; Wed, 21 Oct 2015 04:52:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zop7w-00080y-Ae for submit@debbugs.gnu.org; Wed, 21 Oct 2015 04:52:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zop7v-0003F2-3T for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 04:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zop7r-00080T-Tq for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 04:52:07 -0400 Received: from mail-qk0-f177.google.com ([209.85.220.177]:33987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zop7r-00080N-PS for bug-gnu-emacs@gnu.org; Wed, 21 Oct 2015 04:52:03 -0400 Received: by qkfm62 with SMTP id m62so25385206qkf.1 for ; Wed, 21 Oct 2015 01:52:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject; bh=rNMRWglkBHUDMFn5Nmm1dKjkfQihiUhxkW23oLq4lio=; b=fawx3WWt0Fzo3E7+rvN3UOU5ohon9PZRn4CIsCs+xsrQ/pTN36wD5/wYUgYfuGTpSS 0V+cNJL5t/rruX1ckuQLsAtRaebgYcIkepdH7Ku116ESB6z7IgiYkgLmuCNcVEzGSNVI i2MWYrKOnYGDZXNekuxH3o1b4YBoE1hTjDf3MIMwDD9OoAUxGWuupxKV9uZlHnVpA5fl MR/fkG1NrTewTP5r4gMcGlXmgH4zcEDN0uC4ODSkoOd758wl/MtBtlbv4ogapyIq9ZM3 wEAurPdb0i0+blFExYW3VnlXejLxgK00DcUP/ht9nknMGHlJOmxwn7ZDQf4HS0ebmVg3 v6VA== X-Gm-Message-State: ALoCoQkCTldKYDcRQH9fd0sUvaCB9p+f0ZFzmg5gSytgHxA+3VUje4kPHtdSTGS/CiGRBEGhYcQr X-Received: by 10.55.17.129 with SMTP id 1mr9629552qkr.25.1445417522967; Wed, 21 Oct 2015 01:52:02 -0700 (PDT) Received: from lambda.ccs.neu.edu (lambda.ccs.neu.edu. [129.10.115.115]) by smtp.gmail.com with ESMTPSA id i199sm2859477qhc.44.2015.10.21.01.52.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 01:52:02 -0700 (PDT) From: Eli Barzilay MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <22055.21041.100895.444472@lambda.ccs.neu.edu> Date: Wed, 21 Oct 2015 04:52:01 -0400 To: bug-gnu-emacs@gnu.org Subject: 24.5; Bug in `server-kill-emacs-query-function' X-Mailer: VM 8.2.0a under 24.5.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) The code in `server-kill-emacs-query-function' (in server.el) has this in an `or': (let (live-client) (dolist (proc server-clients) (when (memq t (mapcar 'buffer-live-p (process-get proc 'buffers))) (setq live-client t))) live-client) IIUC, this looks for a live client, and if there is one, the t result means that the yes-or-no-p question in the end will *not* get asked. I verified this by: * Starting emacs -Q and in it start the server * Run emacsclient on a random file * Now, C-x C-c exits without asking any questions. It seems to me like that condition is reversed, an the last line should instead be: (not live-client) This will also make the first condition in the function unnecessary, since if there are no clients, then the loop will not find a live one and the question will be skipped. -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 21 12:52:04 2015 Received: (at 21723-done) by debbugs.gnu.org; 21 Oct 2015 16:52:04 +0000 Received: from localhost ([127.0.0.1]:59613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZowcN-0004jN-P3 for submit@debbugs.gnu.org; Wed, 21 Oct 2015 12:52:04 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:44693) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZowcL-0004iw-DE for 21723-done@debbugs.gnu.org; Wed, 21 Oct 2015 12:52:02 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NWK00N00XDN1Q00@mtaout28.012.net.il> for 21723-done@debbugs.gnu.org; Wed, 21 Oct 2015 19:51:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWK00GFJXH9ZR60@mtaout28.012.net.il>; Wed, 21 Oct 2015 19:51:09 +0300 (IDT) Date: Wed, 21 Oct 2015 19:51:59 +0300 From: Eli Zaretskii Subject: Re: bug#21723: 24.5; Bug in `server-kill-emacs-query-function' In-reply-to: <22055.21041.100895.444472@lambda.ccs.neu.edu> X-012-Sender: halo1@inter.net.il To: Eli Barzilay Message-id: <83si54upu8.fsf@gnu.org> References: <22055.21041.100895.444472@lambda.ccs.neu.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21723-done Cc: 21723-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Eli Barzilay > Date: Wed, 21 Oct 2015 04:52:01 -0400 > > The code in `server-kill-emacs-query-function' (in server.el) has this > in an `or': > > (let (live-client) > (dolist (proc server-clients) > (when (memq t (mapcar 'buffer-live-p (process-get > proc 'buffers))) > (setq live-client t))) > live-client) > > IIUC, this looks for a live client, and if there is one, the t result > means that the yes-or-no-p question in the end will *not* get asked. > I verified this by: > > * Starting emacs -Q and in it start the server > > * Run emacsclient on a random file > > * Now, C-x C-c exits without asking any questions. > > It seems to me like that condition is reversed, an the last line > should instead be: (not live-client) Ouch! This bug was there for almost 10 years, since the simple loop was rewritten as dolist, and the negation of the result was dropped in the process. Should be fixed now, thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 21 13:43:35 2015 Received: (at control) by debbugs.gnu.org; 21 Oct 2015 17:43:35 +0000 Received: from localhost ([127.0.0.1]:59647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoxQF-0007Yw-58 for submit@debbugs.gnu.org; Wed, 21 Oct 2015 13:43:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58159) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoxQD-0007Yo-D3 for control@debbugs.gnu.org; Wed, 21 Oct 2015 13:43:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoxQC-0002bQ-HW for control@debbugs.gnu.org; Wed, 21 Oct 2015 13:43:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoxQC-0002bG-Dw for control@debbugs.gnu.org; Wed, 21 Oct 2015 13:43:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZoxQC-0001vL-2e for control@debbugs.gnu.org; Wed, 21 Oct 2015 13:43:32 -0400 Subject: control message for bug 19635 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 21 Oct 2015 13:43:32 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) forcemerge 21723 19635 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 01:30:33 2015 Received: (at 21723-done) by debbugs.gnu.org; 22 Oct 2015 05:30:33 +0000 Received: from localhost ([127.0.0.1]:60114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zp8SO-0000tc-Af for submit@debbugs.gnu.org; Thu, 22 Oct 2015 01:30:32 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:35913) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zp8SL-0000tS-5Z for 21723-done@debbugs.gnu.org; Thu, 22 Oct 2015 01:30:29 -0400 Received: by ioll68 with SMTP id l68so81243448iol.3 for <21723-done@debbugs.gnu.org>; Wed, 21 Oct 2015 22:30:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=EnGFhAYKqFlpAkzFKJBtUJxFwuNgeGSzD1xRlgCmPo0=; b=bv3xp9yGJP1asj2Sk18skg4wzqaGkHMHFRw3UJnfVKfBCuz1cF6VUoZbpenn0z1za6 VPKRrM5KjrjNvN9YlEOvttagm2/tHovTG5XucS7ZrRnQIpbD9hUrX1wnfILOfy4q4a3s el7nG7R1R6SsGA2D2LtAcm2lvPesIC0AHRVcb/YyveWgmGnYha9k3Nu1ZSv5+bJos6Vd 9rcIwvFFCYOk0NwRtDh5+eIOY1Ymw6DoZConREzI+n+inA7LjS6cdJe6A9BUp18zGWNL zF2ST+EnC/14E9woC72K4kBkfdYBpazwrpNjvtrRlbxS7cObJLfpitcSj13MOm6vwdUC jEYw== X-Gm-Message-State: ALoCoQmKSRr5VS7oHFQCK2zqh9Y1aUG3nlY0s7F9E4d+6yzx1xTQHgwYog67iKoQxUPrwIAP/sEX MIME-Version: 1.0 X-Received: by 10.107.15.17 with SMTP id x17mr7946258ioi.196.1445491828524; Wed, 21 Oct 2015 22:30:28 -0700 (PDT) Received: by 10.79.28.211 with HTTP; Wed, 21 Oct 2015 22:30:28 -0700 (PDT) In-Reply-To: <83si54upu8.fsf@gnu.org> References: <22055.21041.100895.444472@lambda.ccs.neu.edu> <83si54upu8.fsf@gnu.org> Date: Thu, 22 Oct 2015 01:30:28 -0400 Message-ID: Subject: Re: bug#21723: 24.5; Bug in `server-kill-emacs-query-function' From: Eli Barzilay To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21723-done Cc: 21723-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) On Wed, Oct 21, 2015 at 12:51 PM, Eli Zaretskii wrote: >> From: Eli Barzilay >> Date: Wed, 21 Oct 2015 04:52:01 -0400 >> >> The code in `server-kill-emacs-query-function' (in server.el) has this >> in an `or': >> >> (let (live-client) >> (dolist (proc server-clients) >> (when (memq t (mapcar 'buffer-live-p (process-get >> proc 'buffers))) >> (setq live-client t))) >> live-client) >> >> IIUC, this looks for a live client, and if there is one, the t result >> means that the yes-or-no-p question in the end will *not* get asked. >> I verified this by: >> >> * Starting emacs -Q and in it start the server >> >> * Run emacsclient on a random file >> >> * Now, C-x C-c exits without asking any questions. >> >> It seems to me like that condition is reversed, an the last line >> should instead be: (not live-client) > > Ouch! This bug was there for almost 10 years, since the simple loop > was rewritten as dolist, and the negation of the result was dropped in > the process. (Ah -- I saw the bug when adapting old hacks to new code, and saw that difference. I wondered why I didn't report it if I had a fixed version, but my hacks were probably more than 10 years old so based on the previous version...) -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life! From unknown Sat Jun 21 03:04:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 19 Nov 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator