bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17772: [PATCH] Dangling channels' buffer


From: Stefan Monnier
Subject: bug#17772: [PATCH] Dangling channels' buffer
Date: Fri, 13 Jun 2014 14:36:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> server process when it existed, or nil. However, since a78d87e7ed it
> raises an error.

Please avoid using Git references until we actually switch to Git.
Use dates, for example, instead.

> 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'.)

Your patch doesn't look bad, but I wonder if a better option wouldn't be
to try and better preserve the previous behavior.  E.g. with the
patch below.

WDYT?


        Stefan


=== modified file 'lisp/net/rcirc.el'
--- lisp/net/rcirc.el   2014-05-12 16:06:13 +0000
+++ lisp/net/rcirc.el   2014-06-13 18:34:01 +0000
@@ -803,9 +804,8 @@
   "Return the process associated with channel BUFFER.
 With no argument or nil as argument, use the current buffer."
   (let ((buffer (or buffer (if (buffer-live-p rcirc-server-buffer)
-                              rcirc-server-buffer
-                            (error "Server buffer deleted")))))
-    (or (with-current-buffer buffer rcirc-process)
+                              rcirc-server-buffer))))
+    (or (if buffer (with-current-buffer buffer rcirc-process))
        rcirc-process)))
 
 (defun rcirc-server-name (process)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]