Subject: bug#17772: closed (Re: bug#17772: [PATCH] Dangling channels' buffer)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 30 Jun 2014 03:00:06 +0000

Your bug report

#17772: [PATCH] Dangling channels' buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17772: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17772
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17772: [PATCH] Dangling channels' buffer
From: Leo Liu <[email-masked]>
To: Daimrod <[email-masked]>
Cc: [email-masked], Ryan Yeske <[email-masked]>, Stefan Monnier <[email-masked]>
Date: Mon, 30 Jun 2014 10:59:32 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.5

On 2014-06-14 10:20 +0900, Daimrod wrote:
> Here is a new patch with your proposal:

Committed and thanks,

Leo

Subject: [PATCH] Dangling channels' buffer
From: Daimrod <[email-masked]>
To: [email-masked]
Date: Fri, 13 Jun 2014 19:41:55 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

In the attached patch, I propose a fix for the recent change of the
function `rcirc-buffer-process'. This function used to return the rcirc
server process when it existed, or nil. However, since a78d87e7ed it
raises an error.

This is a problem if the user kills the server buffer before it kills
the channels' buffer because it is not possible to kill them after that.
(The function `rcirc-clean-up-buffer' is called via `kill-buffer-hook'
and it calls `rcirc-buffer-process'.)

WDYT?

Regards,

>From 2ce0be284dc8830c3153d60cb0b01e082ab1c5b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <[email-masked]>
Date: Fri, 13 Jun 2014 18:31:31 +0900
Subject: [PATCH] * lisp/net/rcirc.el (rcirc-clean-up-buffer): Explicitly check
 for the   `rcirc-server-buffer'

Since a78d87e7ed, `rcirc-buffer-process' raises an error instead of
returning nil when the `rcirc-server-buffer' doesn't exist.

Because of this, it was impossible to delete channels' buffer once the
`rcirc-server-buffer' has been deleted.
---
 lisp/net/rcirc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 41cc002..57a90de 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1158,7 +1158,7 @@ with it."
 (defun rcirc-clean-up-buffer (reason)
   (let ((buffer (current-buffer)))
     (rcirc-clear-activity buffer)
-    (when (and (rcirc-buffer-process)
+    (when (and (buffer-live-p rcirc-server-buffer)
 	       (rcirc--connection-open-p (rcirc-buffer-process)))
       (with-rcirc-server-buffer
        (setq rcirc-buffer-alist
-- 
1.8.0.2722.gc0242e5

--
Daimrod/Greg