unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Thuna <thuna.cing@gmail.com>
Cc: 60191@debbugs.gnu.org
Subject: bug#60191: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers
Date: Mon, 01 May 2023 12:05:09 +0000	[thread overview]
Message-ID: <875y9cqmtm.fsf@posteo.net> (raw)
In-Reply-To: <877cynrd8i.fsf@gmail.com> (Thuna's message of "Mon, 19 Dec 2022 09:47:57 +0100")

Thuna <thuna.cing@gmail.com> writes:

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

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.

> This patch should hopefully fix that.
>
>>From d17e7cbb34cf83098561c57b383f90d6a7bde50e Mon Sep 17 00:00:00 2001
> From: Thuna <thuna.cing@gmail.com>
> 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."





  reply	other threads:[~2023-05-01 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19  8:47 bug#60191: [PATCH] Fix `rcirc-buffer-process' not working on channel buffers Thuna
2023-05-01 12:05 ` Philip Kaludercic [this message]
2023-05-01 20:05   ` Thuna
2023-05-01 20:09     ` Philip Kaludercic
2023-05-01 21:34       ` Thuna

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=875y9cqmtm.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=60191@debbugs.gnu.org \
    --cc=thuna.cing@gmail.com \
    /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).