Subject: bug#60191: closed (Re: bug#60191: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Feb 2025 03:11:02 +0000

Your bug report

#60191: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60191: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60191
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60191: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers
From: Stefan Kangas <[email-masked]>
To: Philip Kaludercic <[email-masked]>
Cc: [email-masked], Thuna <[email-masked]>
Date: Tue, 11 Feb 2025 19:09:52 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 31.1

Philip Kaludercic <[email-masked]> writes:

> Thuna <[email-masked]> writes:
>
>>> I do not understand what you mean by "not working" here, the code
>>> appears to do the same thing pre- and post-patch, in the process and the
>>> channel buffers.
>>
>> The problem is that when `rcirc-buffer-process' is explicitly called
>> with a channel buffer it returns nil, as the local variable
>> `rcirc-process' is set only in server buffers and the function checks
>> the server buffer only if the BUFFER argument is nil.
>>
>> This leads to a situation where `(rcirc-buffer-process)' and
>> `(rcirc-buffer-process (current-buffer))' do not behave in the same way
>> when called from channel buffers.
>
> OK, I get what you mean and the patch should be applied.  But IIUC you
> haven't signed the FSF CA, right?  If that is so, I am afraid I am not
> allowed to apply /your/ change myself...

The copyright assignment is now done, so I went ahead and installed this
patch as commit fb90e21af1b.  I'm therefore closing this bug report.

Subject: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers
From: Thuna <[email-masked]>
To: [email-masked]
Date: Mon, 19 Dec 2022 09:47:57 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Currently `rcirc-buffer-process' with no BUFFER argument defaults to
current buffer's `rcirc-server-buffer' instead of the current buffer
itself which leads to `rcirc-buffer-process' not working with channel
buffers.

This patch should hopefully fix that.
>From d17e7cbb34cf83098561c57b383f90d6a7bde50e Mon Sep 17 00:00:00 2001
From: Thuna <[email-masked]>
Date: Mon, 19 Dec 2022 09:33:29 +0100
Subject: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers

* lisp/net/rcirc.el (rcirc-buffer-process): Look at BUFFER's
`rcirc-server-buffer's `rcirc-process' instead.  Signal an error if it
has none.
---
 lisp/net/rcirc.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 96109dcd5c9..7afb625407e 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1179,11 +1179,11 @@ rcirc-send-ctcp
 (defun rcirc-buffer-process (&optional buffer)
   "Return the process associated with channel BUFFER.
 With no argument or nil as argument, use the current buffer."
-  (let ((buffer (or buffer (and (buffer-live-p rcirc-server-buffer)
-                                rcirc-server-buffer))))
-    (if buffer
-        (buffer-local-value 'rcirc-process buffer)
-      rcirc-process)))
+  (let ((buffer (or buffer (current-buffer))))
+    (buffer-local-value
+     'rcirc-process
+     (or (buffer-local-value 'rcirc-server-buffer buffer)
+         (error "Not an rcirc buffer: %S" buffer)))))
 
 (defun rcirc-server-name (process)
   "Return PROCESS server name, given by the 001 response."
-- 
2.37.4