GNU bug report logs -
#21723
24.5; Bug in `server-kill-emacs-query-function'
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Wed, 21 Oct 2015 08:53:02 UTC
Severity: normal
Merged with 19635
Found in versions 24.4, 24.5
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21723 in the body.
You can then email your comments to 21723 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21723
; Package
emacs
.
(Wed, 21 Oct 2015 08:53:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Barzilay <eli <at> barzilay.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 21 Oct 2015 08:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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!
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Wed, 21 Oct 2015 16:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eli Barzilay <eli <at> barzilay.org>
:
bug acknowledged by developer.
(Wed, 21 Oct 2015 16:53:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 21723-done <at> debbugs.gnu.org (full text, mbox):
> From: Eli Barzilay <eli <at> barzilay.org>
> 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.
Forcibly Merged 19635 21723.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Oct 2015 17:44:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21723
; Package
emacs
.
(Thu, 22 Oct 2015 05:31:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 21723-done <at> debbugs.gnu.org (full text, mbox):
On Wed, Oct 21, 2015 at 12:51 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Eli Barzilay <eli <at> barzilay.org>
>> 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!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 19 Nov 2015 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.