Received: (at 79563) by debbugs.gnu.org; 4 Oct 2025 11:31:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 04 07:31:16 2025 Received: from localhost ([127.0.0.1]:48093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1v50Tr-00025s-Ti for submit <at> debbugs.gnu.org; Sat, 04 Oct 2025 07:31:16 -0400 Received: from tilde.club ([142.44.150.184]:44334 ident=postfix) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <alcor@HIDDEN>) id 1v50Th-0001u6-Rd for 79563 <at> debbugs.gnu.org; Sat, 04 Oct 2025 07:31:11 -0400 Received: from osiris.tilde.club (unknown [IPv6:2001:9e8:7df:2200:8947:40fa:7e4e:8a57]) by tilde.club (Postfix) with ESMTPSA id BC61D22172019; Sat, 04 Oct 2025 11:31:01 +0000 (UTC) Authentication-Results: tilde.club; auth=pass smtp.auth=alcor smtp.mailfrom=alcor@HIDDEN DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club BC61D22172019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1759577462; bh=9tSwhz4iE2gyAZfhi3HcpJn3/vCgdS4offTzubtXJ80=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Z9fEavUIfA9z2z+q/wjIG5KovexbaUCWEEGKwlFxzRN0PbMa0uNeKFyLqo590tite n6pMm18S8gb2RSfcXDvlL/lDHMLL+KqAcKPkiJhS9Y/zeghRQdY4+jOGCYZSIq/sFm i31JtRlryB2QYF/Sr67wi3IFmug9I4sPILyutb9A= From: Alcor <alcor@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#79563: 30.2; Rcirc: /PART command ignores 2nd (reason) argument In-Reply-To: <86tt0gf6kf.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 03 Oct 2025 16:39:12 +0300") References: <87tt0gjews.fsf@HIDDEN> <86tt0gf6kf.fsf@HIDDEN> Date: Sat, 04 Oct 2025 13:30:59 +0200 Message-ID: <87y0pqx5sc.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79563 Cc: Philip Kaludercic <philipk@HIDDEN>, 79563 <at> debbugs.gnu.org, Ryan Yeske <rcyeske@HIDDEN>, Leo Liu <sdl.web@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: > If you agree, I will send you the form to fill and the instructions to > go with it. I have already applied for it, and have submitted it to my org for review many months ago, where it's being held up. I will give them a nudge next week to check its status. Unfortunately, I'm at a very large org where matters such as CAs have very low priority. In the meantime, feel free to rewrite the patch (as well as the other one, related to the undo-functionality) as you see fit. In this case my usage of `cl-loop' is likely not very efficient or idiomatic, so my assumption was that the changes will have to be revised before being merged. Cheers,
bug-gnu-emacs@HIDDEN:bug#79563; Package emacs.
Full text available.Received: (at 79563) by debbugs.gnu.org; 3 Oct 2025 13:39:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 03 09:39:46 2025 Received: from localhost ([127.0.0.1]:44324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1v4g0f-0002v8-04 for submit <at> debbugs.gnu.org; Fri, 03 Oct 2025 09:39:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v4g0Q-0002uX-Id for 79563 <at> debbugs.gnu.org; Fri, 03 Oct 2025 09:39:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1v4g0G-0005ly-2h; Fri, 03 Oct 2025 09:39:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jhFaEmYcrT9pWz/1fZQqB//jRM7NCE/nkgDGXvxDGgc=; b=NSNp0G9g5A4G iwDh2DS569HKGhwU+TE56dJyucO5fku2pZfd+qHwkNdIKzBEKL0aqU0gBd9FsQz+gbFNWY4M/6C4f +o4I5zDYZUkQFscezk2FRogBZIEtZ2B0WF4bThThdpn3BOx1CRYa2UApSnHBh5RZeRZGFQ5ZJLetw bGqv+oq+PFGXVlf0QvUvq/e7DIEhvORMchMujYORel//FlRJlgaETj1eZQaHpF0mBpcZt9SgIzPrx gt1HT7pD1gWsLkG6XDMUdDsfB2G1DqhtWwIJErp3oIapYwtI4GQdtzd+CY+c9MqyKp059vNvIZywp JoWXPATP3jp3+hXx7C2G7g==; Date: Fri, 03 Oct 2025 16:39:12 +0300 Message-Id: <86tt0gf6kf.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Alcor <alcor@HIDDEN> In-Reply-To: <87tt0gjews.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#79563: 30.2; Rcirc: /PART command ignores 2nd (reason) argument References: <87tt0gjews.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79563 Cc: Philip Kaludercic <philipk@HIDDEN>, 79563 <at> debbugs.gnu.org, Ryan Yeske <rcyeske@HIDDEN>, Leo Liu <sdl.web@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Fri, 03 Oct 2025 15:25:23 +0200 > From: Alcor via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Open 2 Emacs instances (1, 2), and do the following (instructions per instance > as follows) > > On instance 1: > 1. C-u M-x rcirc > 2. When prompted, join an empty test channel (or any other channel) > 3. Switch to the buffer of the channel you just joined > > On instance 2: > 1. C-u M-x rcirc > 2. When prompted, join the same channel as instance 1 > 3. Switch to the buffer of the channel you just joined > 4. Type: /part <CHANNEL-NAME> my-test-reason and hit RET > > If you take a look at instance 1, you will see that Rcirc ignores > "my-test-reason" and instead uses `rcirc-default-part-reason' anyway. > > This bug is caused by fragile argument parsing/handling behavior in the > `rcirc-define-command' macro. Attached is a small proposed patch that > fixes the issue. Please note, however, that this issue may affect other > commands -- while I have tested this for several other commands, some > scrutiny from a maintainer may be in order. Thanks, I added the relevant people to the discussion Also, I see that you don't have a copyright assignment on file for Emacs. Would you like to start your assignment paperwork rolling at this time, so that we could accept your contributions without any limitations? Because I think you have already exhausted the amount of changes we can accept from you without the assignment. If you agree, I will send you the form to fill and the instructions to go with it. > In GNU Emacs 30.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, > cairo version 1.18.0) of 2025-09-22 built on lcy02-amd64-009 > Repository revision: ff7d3f02b943af29afb1c68a2b31f88441dee928 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12302006 > System Description: Ubuntu 24.04.3 LTS > > Configured using: > 'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3 > --without-xaw3d --with-modules --with-cairo > --with-native-compilation=aot --without-pgtk --with-xinput2 > --with-tree-sitter 'CFLAGS=-isystem > /build/emacs/parts/emacs/install/usr/include -isystem > /build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem > /build/emacs/stage/usr/include -O2' 'CPPFLAGS=-isystem > /build/emacs/parts/emacs/install/usr/include -isystem > /build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem > /build/emacs/stage/usr/include' > 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib > -L/build/emacs/parts/emacs/install/usr/lib > -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu > -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu > -L/build/emacs/stage/usr/lib'' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP > NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF > TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB > > Important settings: > value of $LANG: de_DE.UTF-8 > value of $XMODIFIERS: @im=ibus > locale-coding-system: utf-8-unix > > Major mode: Text > > Minor modes in effect: > whitespace-mode: t > display-line-numbers-mode: t > goto-address-mode: t > marginalia-mode: t > which-key-mode: t > winner-mode: t > windmove-mode: t > recentf-mode: t > global-auto-revert-mode: t > fido-vertical-mode: t > icomplete-vertical-mode: t > icomplete-mode: t > fido-mode: t > desktop-save-mode: t > minibuffer-depth-indicate-mode: t > delete-selection-mode: t > repeat-mode: t > override-global-mode: t > tooltip-mode: t > global-eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > column-number-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > /home/fadimk/.emacs.d/elpa/transient-0.10.0/transient hides /snap/emacs/current/usr/share/emacs/30.2/lisp/transient > > Features: > (shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime > smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom > gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap > nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int > gnus-range gnus-win emacsbug message yank-media puny dired > dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config > mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils > mailheader sendmail rfc2047 rfc2045 ietf-drums mule-util disp-table > whitespace display-line-numbers goto-addr thingatpt gnus nnheader > gnus-util text-property-search time-date mail-utils range mm-util > mail-prsvr doom-themes-ext-org doom-themes-ext-visual-bell face-remap > doom-nord-theme pcase doom-themes doom-themes-base marginalia compat > which-key use-package-ensure winner ring windmove recentf tree-widget > autorevert filenotify icomplete desktop frameset mb-depth delsel repeat > edmacro kmacro use-package-bind-key bind-key easy-mmode cus-edit pp > cus-load wid-edit use-package-core site-start comp comp-cstr cl-extra > help-mode comp-common warnings rx doom-themes-autoloads > marginalia-autoloads markdown-mode-autoloads > rainbow-delimiters-autoloads rcirc-color-autoloads info > transient-autoloads package browse-url url url-proxy url-privacy > url-expand url-methods url-history url-cookie generate-lisp-file > url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq > eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt > gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl > tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks > lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd > touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list > replace newcomment text-mode lisp-mode prog-mode register page tab-bar > menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse > jit-lock font-lock syntax font-core term/tty-colors frame minibuffer > nadvice seq simple cl-generic indonesian philippine cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop > case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure > cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp > files window text-properties overlay sha1 md5 base64 format env > code-pages mule custom widget keymap hashtable-print-readable backquote > threads dbusbind inotify lcms2 dynamic-setting system-font-setting > font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar > make-network-process native-compile emacs) > > Memory information: > ((conses 16 276524 13889) (symbols 48 18747 0) (strings 32 56553 2936) > (string-bytes 1 2057735) (vectors 16 29117) > (vector-slots 8 364759 8785) (floats 8 533 8425) (intervals 56 539 0) > (buffers 992 10)) > > >From fde1d3c87dd29b461d497df670c20fd888cb18ef Mon Sep 17 00:00:00 2001 > From: Alcor <alcor@HIDDEN> > Date: Fri, 3 Oct 2025 15:19:49 +0200 > Subject: [PATCH] Rcirc: Fix command argument parsing omitting optional > arguments > > * lisp/net/rcirc.el (rcirc-define-command): Fix handling of optional arguments. > --- > lisp/net/rcirc.el | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el > index a7f1d8b..99d8b55 100644 > --- a/lisp/net/rcirc.el > +++ b/lisp/net/rcirc.el > @@ -2721,9 +2721,9 @@ that, an interactive form can specified." > (regexp (with-temp-buffer > (insert "\\`") > (when arguments > - (dotimes (_ (1- (length arguments))) > + (dotimes (_ (1- total)) > (insert "\\(?:\\(.+?\\)[[:space:]]+")) > - (dotimes (i (1- (length arguments))) > + (dotimes (i (1- total)) > (if (< i optional) > (insert "\\)?") > (insert "\\)")))) > @@ -2757,12 +2757,15 @@ that, an interactive form can specified." > (push ,(upcase (symbol-name command)) rcirc-pending-requests) > (let ((process (or process (rcirc-buffer-process))) > (target (or target rcirc-target))) > + (unless (listp ,argument) > + (setq ,argument > + (cl-loop for k from 1 to ,total > + for m = (match-string k ,argument) > + when (and m (not (string= m ""))) collect m))) > (ignore target process) > (let (,@(cl-loop > for i from 0 for arg in (delq '&optional arguments) > - collect `(,arg (if (listp ,argument) > - (nth ,i ,argument) > - (match-string ,(1+ i) ,argument))))) > + collect `(,arg (nth ,i ,argument)))) > ,@body))) > (add-to-list 'rcirc-client-commands ,(concat "/" (symbol-name command)))))) > > -- > 2.43.0 >
bug-gnu-emacs@HIDDEN:bug#79563; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 3 Oct 2025 13:26:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 03 09:26:02 2025
Received: from localhost ([127.0.0.1]:44248 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v4fnI-0001Jm-Mc
for submit <at> debbugs.gnu.org; Fri, 03 Oct 2025 09:26:01 -0400
Received: from lists.gnu.org ([2001:470:142::17]:51904)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <alcor@HIDDEN>) id 1v4fnA-0001Cg-8H
for submit <at> debbugs.gnu.org; Fri, 03 Oct 2025 09:25:51 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <alcor@HIDDEN>) id 1v4fn3-000797-UZ
for bug-gnu-emacs@HIDDEN; Fri, 03 Oct 2025 09:25:41 -0400
Received: from tilde.club ([142.44.150.184])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <alcor@HIDDEN>) id 1v4fmt-0001bj-Gx
for bug-gnu-emacs@HIDDEN; Fri, 03 Oct 2025 09:25:40 -0400
Received: from osiris.tilde.club (unknown
[IPv6:2001:9e8:7d4:5f00:48a7:eea:b14c:fd12])
by tilde.club (Postfix) with ESMTPSA id 35F3422172019
for <bug-gnu-emacs@HIDDEN>; Fri, 03 Oct 2025 13:25:25 +0000 (UTC)
Authentication-Results: tilde.club;
auth=pass smtp.auth=alcor smtp.mailfrom=alcor@HIDDEN
DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 35F3422172019
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail;
t=1759497925; bh=G0oERJxTV5h0tvHCPp9khmQF6BGe90AQIwzdtmyj3oU=;
h=From:To:Subject:Date:From;
b=xJMtW8JT39fYf+NSjPAQ55NM0fFVevZLOqSU8zmY57bh2lzYnB6xZinLjAGO0m6Sq
aK7luykgyDFAcEJACVPd1ay9uyzBGtNAA3yu2ES9/TzynUZ+ecGAPGCZ5UUGz8jQ2y
b2EE8HPWae0PwhyaV5kSlNbwZ5kgzTEuiJquwALs=
From: Alcor <alcor@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.2; Rcirc: /PART command ignores 2nd (reason) argument
X-Debbugs-Cc:
Date: Fri, 03 Oct 2025 15:25:23 +0200
Message-ID: <87tt0gjews.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=142.44.150.184; envelope-from=alcor@HIDDEN;
helo=tilde.club
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)
--=-=-=
Content-Type: text/plain
Open 2 Emacs instances (1, 2), and do the following (instructions per instance
as follows)
On instance 1:
1. C-u M-x rcirc
2. When prompted, join an empty test channel (or any other channel)
3. Switch to the buffer of the channel you just joined
On instance 2:
1. C-u M-x rcirc
2. When prompted, join the same channel as instance 1
3. Switch to the buffer of the channel you just joined
4. Type: /part <CHANNEL-NAME> my-test-reason and hit RET
If you take a look at instance 1, you will see that Rcirc ignores
"my-test-reason" and instead uses `rcirc-default-part-reason' anyway.
This bug is caused by fragile argument parsing/handling behavior in the
`rcirc-define-command' macro. Attached is a small proposed patch that
fixes the issue. Please note, however, that this issue may affect other
commands -- while I have tested this for several other commands, some
scrutiny from a maintainer may be in order.
In GNU Emacs 30.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0) of 2025-09-22 built on lcy02-amd64-009
Repository revision: ff7d3f02b943af29afb1c68a2b31f88441dee928
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302006
System Description: Ubuntu 24.04.3 LTS
Configured using:
'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3
--without-xaw3d --with-modules --with-cairo
--with-native-compilation=aot --without-pgtk --with-xinput2
--with-tree-sitter 'CFLAGS=-isystem
/build/emacs/parts/emacs/install/usr/include -isystem
/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem
/build/emacs/stage/usr/include -O2' 'CPPFLAGS=-isystem
/build/emacs/parts/emacs/install/usr/include -isystem
/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem
/build/emacs/stage/usr/include'
'LDFLAGS=-L/build/emacs/parts/emacs/install/lib
-L/build/emacs/parts/emacs/install/usr/lib
-L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu
-L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu
-L/build/emacs/stage/usr/lib''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: de_DE.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Text
Minor modes in effect:
whitespace-mode: t
display-line-numbers-mode: t
goto-address-mode: t
marginalia-mode: t
which-key-mode: t
winner-mode: t
windmove-mode: t
recentf-mode: t
global-auto-revert-mode: t
fido-vertical-mode: t
icomplete-vertical-mode: t
icomplete-mode: t
fido-mode: t
desktop-save-mode: t
minibuffer-depth-indicate-mode: t
delete-selection-mode: t
repeat-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
column-number-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/fadimk/.emacs.d/elpa/transient-0.10.0/transient hides /snap/emacs/current/usr/share/emacs/30.2/lisp/transient
Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime gnutls dig gnus-sum shr pixel-fill kinsoku url-file svg dom
gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap
nnmail mail-source utf7 nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range gnus-win emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mule-util disp-table
whitespace display-line-numbers goto-addr thingatpt gnus nnheader
gnus-util text-property-search time-date mail-utils range mm-util
mail-prsvr doom-themes-ext-org doom-themes-ext-visual-bell face-remap
doom-nord-theme pcase doom-themes doom-themes-base marginalia compat
which-key use-package-ensure winner ring windmove recentf tree-widget
autorevert filenotify icomplete desktop frameset mb-depth delsel repeat
edmacro kmacro use-package-bind-key bind-key easy-mmode cus-edit pp
cus-load wid-edit use-package-core site-start comp comp-cstr cl-extra
help-mode comp-common warnings rx doom-themes-autoloads
marginalia-autoloads markdown-mode-autoloads
rainbow-delimiters-autoloads rcirc-color-autoloads info
transient-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt
gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)
Memory information:
((conses 16 276524 13889) (symbols 48 18747 0) (strings 32 56553 2936)
(string-bytes 1 2057735) (vectors 16 29117)
(vector-slots 8 364759 8785) (floats 8 533 8425) (intervals 56 539 0)
(buffers 992 10))
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
filename=0001-Rcirc-Fix-command-argument-parsing-omitting-optional.patch
From fde1d3c87dd29b461d497df670c20fd888cb18ef Mon Sep 17 00:00:00 2001
From: Alcor <alcor@HIDDEN>
Date: Fri, 3 Oct 2025 15:19:49 +0200
Subject: [PATCH] Rcirc: Fix command argument parsing omitting optional
arguments
* lisp/net/rcirc.el (rcirc-define-command): Fix handling of optional arguments.
---
lisp/net/rcirc.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index a7f1d8b..99d8b55 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2721,9 +2721,9 @@ that, an interactive form can specified."
(regexp (with-temp-buffer
(insert "\\`")
(when arguments
- (dotimes (_ (1- (length arguments)))
+ (dotimes (_ (1- total))
(insert "\\(?:\\(.+?\\)[[:space:]]+"))
- (dotimes (i (1- (length arguments)))
+ (dotimes (i (1- total))
(if (< i optional)
(insert "\\)?")
(insert "\\)"))))
@@ -2757,12 +2757,15 @@ that, an interactive form can specified."
(push ,(upcase (symbol-name command)) rcirc-pending-requests)
(let ((process (or process (rcirc-buffer-process)))
(target (or target rcirc-target)))
+ (unless (listp ,argument)
+ (setq ,argument
+ (cl-loop for k from 1 to ,total
+ for m = (match-string k ,argument)
+ when (and m (not (string= m ""))) collect m)))
(ignore target process)
(let (,@(cl-loop
for i from 0 for arg in (delq '&optional arguments)
- collect `(,arg (if (listp ,argument)
- (nth ,i ,argument)
- (match-string ,(1+ i) ,argument)))))
+ collect `(,arg (nth ,i ,argument))))
,@body)))
(add-to-list 'rcirc-client-commands ,(concat "/" (symbol-name command))))))
--
2.43.0
--=-=-=--
Alcor <alcor@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#79563; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.