From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#21723: 24.5; Bug in `server-kill-emacs-query-function' Date: Thu, 22 Oct 2015 01:30:28 -0400 Message-ID: References: <22055.21041.100895.444472@lambda.ccs.neu.edu> <83si54upu8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1445491892 951 80.91.229.3 (22 Oct 2015 05:31:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2015 05:31:32 +0000 (UTC) Cc: 21723-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 22 07:31:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zp8T1-00010t-NO for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Oct 2015 07:31:11 +0200 Original-Received: from localhost ([::1]:56302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8T1-0000cV-AI for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Oct 2015 01:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8Sx-0000bP-Mx for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp8St-0006GD-5b for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:31:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp8St-0006G1-2i for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zp8Ss-0000uV-F6 for bug-gnu-emacs@gnu.org; Thu, 22 Oct 2015 01:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Barzilay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Oct 2015 05:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21723 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21723-done@debbugs.gnu.org id=D21723.14454918333453 (code D ref 21723); Thu, 22 Oct 2015 05:31:02 +0000 Original-Received: (at 21723-done) by debbugs.gnu.org; 22 Oct 2015 05:30:33 +0000 Original-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 Original-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 Original-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 X-Received: by 10.107.15.17 with SMTP id x17mr7946258ioi.196.1445491828524; Wed, 21 Oct 2015 22:30:28 -0700 (PDT) Original-Received: by 10.79.28.211 with HTTP; Wed, 21 Oct 2015 22:30:28 -0700 (PDT) In-Reply-To: <83si54upu8.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107825 Archived-At: 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!