GNU bug report logs - #21187
erc-kill-channel-hook sometimes is not run during /QUIT

Previous Next

Package: emacs;

Reported by: Fran Litterio <flitterio <at> gmail.com>

Date: Tue, 4 Aug 2015 17:57:01 UTC

Severity: normal

Tags: fixed

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Fran Litterio <flitterio <at> gmail.com>
Cc: 21187 <at> debbugs.gnu.org
Subject: bug#21187: erc-kill-channel-hook sometimes is not run during /QUIT
Date: Sun, 27 Dec 2015 08:57:41 +0100
Fran Litterio <flitterio <at> gmail.com> writes:

> Using Emacs built from the latest sources, when variable
> erc-kill-queries-on-quit is t (which causes ERC to kill channel
> buffers when quitting -- yes, the name is misleading), a /QUIT
> does not run the hooks on erc-kill-channel-hook, because
> erc-default-target returns nil due to the server being
> disconnected.
>
> This patch fixes that by falling back to examining the buffer
> name, which should be safe to do since we know the major mode is
> erc-mode.
> --
> Fran
> flitterio <at> gmail.com
>
> --- erc.el.orig	2015-08-04 13:38:04.602900800 -0400
> +++ erc.el	2015-08-04 13:38:56.538768600 -0400
> @@ -6698,7 +6698,7 @@
>      (cond
>       ((eq (erc-server-buffer) (current-buffer))
>        (run-hooks 'erc-kill-server-hook))
> -     ((erc-channel-p (erc-default-target))
> +     ((erc-channel-p (or (erc-default-target) (buffer-name)))

Thanks; applied to Emacs 25.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 9 years and 150 days ago.

Previous Next


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