GNU bug report logs - #17772
[PATCH] Dangling channels' buffer

Previous Next

Package: emacs;

Reported by: Daimrod <daimrod <at> gmail.com>

Date: Fri, 13 Jun 2014 10:43:01 UTC

Severity: normal

Tags: patch

Fixed in version 25.1

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daimrod <daimrod <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Ryan Yeske <rcyeske <at> gmail.com>, Leo Liu <sdl.web <at> gmail.com>, 17772 <at> debbugs.gnu.org
Subject: bug#17772: [PATCH] Dangling channels' buffer
Date: Sat, 14 Jun 2014 10:04:04 +0900
Stefan Monnier <monnier <at> 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




This bug report was last modified 10 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.