unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17772: [PATCH] Dangling channels' buffer
@ 2014-06-13 10:41 Daimrod
  2014-06-13 18:36 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Daimrod @ 2014-06-13 10:41 UTC (permalink / raw)
  To: 17772

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

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,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-net-rcirc.el-rcirc-clean-up-buffer-Explicitly-c.patch --]
[-- Type: text/x-diff, Size: 1118 bytes --]

From 2ce0be284dc8830c3153d60cb0b01e082ab1c5b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gregoire.jadi@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


--
Daimrod/Greg

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-30  2:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 10:41 bug#17772: [PATCH] Dangling channels' buffer Daimrod
2014-06-13 18:36 ` Stefan Monnier
2014-06-14  1:04   ` Daimrod
2014-06-14  1:20     ` Daimrod
2014-06-30  2:59       ` Leo Liu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).