From: Daimrod <daimrod@gmail.com>
To: 17772@debbugs.gnu.org
Subject: bug#17772: [PATCH] Dangling channels' buffer
Date: Fri, 13 Jun 2014 19:41:55 +0900 [thread overview]
Message-ID: <87k38lay6k.fsf@tanger.home> (raw)
[-- 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
next reply other threads:[~2014-06-13 10:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 10:41 Daimrod [this message]
2014-06-13 18:36 ` bug#17772: [PATCH] Dangling channels' buffer Stefan Monnier
2014-06-14 1:04 ` Daimrod
2014-06-14 1:20 ` Daimrod
2014-06-30 2:59 ` Leo Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k38lay6k.fsf@tanger.home \
--to=daimrod@gmail.com \
--cc=17772@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).