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: Daimrod
Subject: bug#17772: [PATCH] Dangling channels' buffer
Date: Sat, 14 Jun 2014 10:04:04 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

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

Ok, I'll keep this in mind.

>> 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?

Fine for me, but you don't need the `or'.

> === 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))))

+    (if buffer
+        (with-current-buffer buffer rcirc-process)
+      rcirc-process)))

> +    (or (if buffer (with-current-buffer buffer rcirc-process))
>       rcirc-process)))
>  
>  (defun rcirc-server-name (process)
>

-- 
Daimrod/Greg





reply via email to

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