From unknown Wed Jun 18 23:05:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74934 <74934@debbugs.gnu.org> To: bug#74934 <74934@debbugs.gnu.org> Subject: Status: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers Reply-To: bug#74934 <74934@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:05:43 +0000 retitle 74934 30.0.92; Unexpected behavior by which-function-mode in erc-mo= de buffers reassign 74934 emacs submitter 74934 Anush V severity 74934 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 19:44:20 2024 Received: (at submit) by debbugs.gnu.org; 18 Dec 2024 00:44:20 +0000 Received: from localhost ([127.0.0.1]:60837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNiAl-0007uV-NU for submit@debbugs.gnu.org; Tue, 17 Dec 2024 19:44:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:45430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNiAi-0007uI-2m for submit@debbugs.gnu.org; Tue, 17 Dec 2024 19:44:18 -0500 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 ) id 1tNiAX-0006gM-2e for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 19:44:05 -0500 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 ) id 1tNiAW-0004ik-MV for bug-gnu-emacs@gnu.org; Tue, 17 Dec 2024 19:44:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=59Bcdq7N1RP+7xLbEPpmN7aMgf568nSFg2MP0PoVMko=; b=gLCF+p5Te8OL6Y JpYrvgjtVwwGC4WVmTEPbmtJiUH3KnA62QT1lmx77f9b9QKjDSWTQVDol/oQZJa1xdHf43L2A5CBq Mz0skZJAA8an5l0s6cbRriwcN3O+SfJfRutqEJo3NXl8Ca85sxRPFRxuDKsSbxinTY7vKZ4iuxZqs XrqeGV9gSikeBNgPaQlPU9+1Wkq+vOk+qbUujQuuoylSETh91gmjj6v4pX6lrAesyMBZtK4pb4HrF DE2TLvPjNR7XXivgA3iB0r73sHS2qQas2rAU5yc74IFoVWh1x9YNYufys1Kh/8pGbJTfCbTDvuNSz NQXwyt9hkVNzBb76fE2w==; From: Anush V To: bug-gnu-emacs@gnu.org Subject: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers Date: Tue, 17 Dec 2024 19:43:51 -0500 Message-ID: <87y10des6w.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) X-Debbugs-Cc: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Maintainers, I guess this is probably unexpected behavior by which-function-mode in erc-= mode buffers and so reporting this. steps to reproduce: emacs --no-init M-x erc ;; join some channel. M-x which-function-mode Current behavior: In erc buffers, which-function-mode displays either "[n/a]" or a string bas= ed on the chat history in the mode line. Expected behavior: which-function-mode shouldn=E2=80=99t be adding any string to mode line in = erc buffers Thank you for your time! * * * In GNU Emacs 30.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, c= airo version 1.18.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101014 System Description: Guix System Configured using: 'configure CONFIG_SHELL=3D/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.= 1.16/bin/bash SHELL=3D/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bi= n/bash --prefix=3D/gnu/store/dgpfiflaxb8j33jcbqk29wadcykajl51-emacs-next-30= .0.92-0.881d593 --enable-fast-install --with-cairo --with-modules --with-na= tive-compilation=3Daot --disable-build-details' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCM= S2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY IN= OTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB -- Regards, Anush V From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 17 21:24:16 2024 Received: (at 74934) by debbugs.gnu.org; 18 Dec 2024 02:24:17 +0000 Received: from localhost ([127.0.0.1]:60962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNjjR-0004Fm-5r for submit@debbugs.gnu.org; Tue, 17 Dec 2024 21:24:16 -0500 Received: from mail-108-mta64.mxroute.com ([136.175.108.64]:46261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNjjO-0004FZ-N7 for 74934@debbugs.gnu.org; Tue, 17 Dec 2024 21:24:11 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta64.mxroute.com (ZoneMTA) with ESMTPSA id 193d794606f000310e.001 for <74934@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 18 Dec 2024 02:24:05 +0000 X-Zone-Loop: b5b24c194c36e8c4cdac79e5bb9a3ba2ae0a92666a2f X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=auMpTQfhaCLMEGVTVowGLBoR2VEg2mnfm0OMo5jKjdg=; b=BPp9TdxtrFbZUpoHBOlHH3PuSD /9ZH28gnKXJX6GHiknv3ciKesyN7jEiOtEQk2rzBJhc7ZOrD4np2toaNy4nqcan+jlJIL71W/z/9o KMW+nCn5Y/qbBwOumkmcd0XvNVosa9Msq13bkLFCWovvhPbNhuQEpRgB+eI7SCeBzJwPO1ePtgGXz Q7uEcvfWfvbVO62Q57KjqeSq74mm8qQvb36wNOBxw25rxtAaPhGnqDpl3ZgSMoGLuhdmdZRRaT0QV xRwWBwCPxRZX/xGaOwfzvgvxPVC9HXDfxC8cdPPwt+r9ngfp4KwzMy+BDjN4lYlrwE7L7ez+HO37o FtO+oE/g==; From: "J.P." To: Anush V Subject: Re: bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers In-Reply-To: <87y10des6w.fsf@gnu.org> (Anush V.'s message of "Tue, 17 Dec 2024 19:43:51 -0500") References: <87y10des6w.fsf@gnu.org> Date: Tue, 17 Dec 2024 18:24:02 -0800 Message-ID: <87seqlhgot.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74934 Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Anush, Appreciate you reporting this. Anush V writes: > steps to reproduce: > emacs --no-init > M-x erc > ;; join some channel. > M-x which-function-mode > > Current behavior: > In erc buffers, which-function-mode displays either "[n/a]" or a string b= ased on > the chat history in the mode line. FTR, I'm able to reproduce it. > Expected behavior: > which-function-mode shouldn=E2=80=99t be adding any string to mode line i= n erc buffers The first of the attached patches should hopefully address the issue. Thanks, J.P. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-5.6.1-Disable-which-func-mode-in-erc-imenu-buffers.patch >From 76eab2b23f46c885051f2bcb985ab15c3e851033 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Tue, 17 Dec 2024 17:53:34 -0800 Subject: [PATCH 1/2] [5.6.1] Disable which-func-mode in erc-imenu buffers * lisp/erc/erc-imenu.el (erc-imenu-setup): Move after module definition so the variable `erc-imenu-mode' is defined. Run teardown code when module is deactivated. Set `which-func-mode' to nil locally. (erc-imenu-mode, erc-imenu-enable, erc-imenu-disable): Manage membership of `erc-imenu--disable-which-func' in `which-function-mode-hook'. (erc-imenu--disable-which-func): New function. (Bug#74934) --- lisp/erc/erc-imenu.el | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el index 4c9cbfc1580..68c7895e2dd 100644 --- a/lisp/erc/erc-imenu.el +++ b/lisp/erc/erc-imenu.el @@ -132,23 +132,36 @@ erc-create-imenu-index (defvar-local erc-imenu--create-index-function nil "Previous local value of `imenu-create-index-function', if any.") -(defun erc-imenu-setup () - "Wire up support for Imenu in an ERC buffer." - (when (and (local-variable-p 'imenu-create-index-function) - imenu-create-index-function) - (setq erc-imenu--create-index-function imenu-create-index-function)) - (setq imenu-create-index-function #'erc-create-imenu-index)) - ;;;###autoload(autoload 'erc-imenu-mode "erc-imenu" nil t) (define-erc-module imenu nil "Simple Imenu integration for ERC." ((add-hook 'erc-mode-hook #'erc-imenu-setup) + (add-hook 'which-function-mode-hook #'erc-imenu--disable-which-func) (unless erc--updating-modules-p (erc-buffer-do #'erc-imenu-setup))) ((remove-hook 'erc-mode-hook #'erc-imenu-setup) - (erc-with-all-buffers-of-server nil nil - (when erc-imenu--create-index-function - (setq imenu-create-index-function erc-imenu--create-index-function) - (kill-local-variable 'erc-imenu--create-index-function))))) + (remove-hook 'which-function-mode-hook #'erc-imenu--disable-which-func) + (erc-buffer-do #'erc-imenu-setup))) + +(defun erc-imenu-setup () + "Set up or tear down Imenu integration." + (if erc-imenu-mode + (progn + (when (and (local-variable-p 'imenu-create-index-function) + imenu-create-index-function) + (setq erc-imenu--create-index-function imenu-create-index-function)) + (setq imenu-create-index-function #'erc-create-imenu-index) + (when (boundp 'which-func-mode) + (setq which-func-mode nil))) + (when erc-imenu--create-index-function + (setq imenu-create-index-function erc-imenu--create-index-function)) + (kill-local-variable 'erc-imenu--create-index-function) + (kill-local-variable 'which-func-mode))) + +(defun erc-imenu--disable-which-func () + "Silence `which-function-mode' in ERC buffers." + (defvar which-func-mode) + (erc-with-all-buffers-of-server nil nil + (setq which-func-mode nil))) (provide 'erc-imenu) -- 2.47.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-5.6.1-Add-lisp-imenu-generic-expression-for-ERC-hack.patch >From 6b331f127a7c4f1c4085521ea74c68f644f93cce Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Mon, 22 Apr 2024 18:11:24 -0700 Subject: [PATCH 2/2] [5.6.1] Add lisp-imenu-generic-expression for ERC hacking * lisp/erc/erc-backend.el (define-erc-response-handler): Add `doc-string' to `declare' specification. * lisp/erc/erc-imenu.el (erc-imenu-add-devel-patterns(): Add locally autoloaded function for defining `imenu' patterns when hacking on ERC. --- lisp/erc/erc-backend.el | 1 + lisp/erc/erc-imenu.el | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index e72fa036f17..311e3a624e6 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -1662,6 +1662,7 @@ define-erc-response-handler ([&or integerp symbolp] &rest [&or integerp symbolp])] &optional sexp sexp def-body)) + (doc-string 2) (indent defun)) (if (numberp name) (setq name (intern (format "%03i" name)))) (setq aliases (mapcar (lambda (a) diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el index 68c7895e2dd..c6cb5655e2d 100644 --- a/lisp/erc/erc-imenu.el +++ b/lisp/erc/erc-imenu.el @@ -163,6 +163,29 @@ erc-imenu--disable-which-func (erc-with-all-buffers-of-server nil nil (setq which-func-mode nil))) +;;;###autoload +(defun erc-imenu-add-devel-patterns () + "Tell `imenu' about ERC-defined macros." + ;; This currently produces results like "ERC response FOO BAR". I'd + ;; obviously be nicer to end up with "erc-response-FOO" and + ;; "erc-response-BAR", possibly as separate items. Likewise for + ;; modules: "erc-foo-mode" instead of "ERC module foo". + (cl-pushnew `("ERC response" + ,(rx bol (* (syntax whitespace)) + "(define-erc-response-handler (" (group (+ nonl)) ")") + 1) + lisp-imenu-generic-expression + :test #'equal) + (cl-pushnew `("ERC module" + ,(rx bol (* (syntax whitespace)) + ;; Lisp-mode-symbol. + "(define-erc-module " (group (+ (| (syntax word) + (syntax symbol) + (: "\\" nonl))))) + 1) + lisp-imenu-generic-expression + :test #'equal)) + (provide 'erc-imenu) ;;; erc-imenu.el ends here -- 2.47.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 18 08:46:26 2024 Received: (at 74934) by debbugs.gnu.org; 18 Dec 2024 13:46:26 +0000 Received: from localhost ([127.0.0.1]:33943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNuNQ-0004HD-L1 for submit@debbugs.gnu.org; Wed, 18 Dec 2024 08:46:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNuNH-0004GQ-PA for 74934@debbugs.gnu.org; Wed, 18 Dec 2024 08:46:09 -0500 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 ) id 1tNuL6-0005lF-8d; Wed, 18 Dec 2024 08:43:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=GqfpCVy1vM1Xfx6o4PtcNUiqFY4wrYYkXr0+ij1QAE4=; b=W3QdtpnyAqxfnWXDYzoS uGj3FOJnePU+6Ehr0CqY0LK15veA4+OlHa1Gn7+p3atlrx8Ph107nCJEbxRJyGl/+betFAod5A0Ab 2an0STKZMy4pVM8VClPu2qTjraWEZtJb1B2GpTYsCVIeiOueBZ4mfoRU5BQP9QHAwkojmHaxl2EEB 2KL+pzCQi0pYzmsgC1jBQePcxf12+yssGIsSQLi0KNPHMsV0iOLa7NMhDtzkA7qE73JFpTKnH0AQb AULznxsqNrKf2wewq5wYSdae7hZdgEcKLf4rgqW1OGamBdhrO1LyHX8jzdQvcrx9EEW2dndxg0x8X RA/ZvmRNleYFdg==; Date: Wed, 18 Dec 2024 15:43:40 +0200 Message-Id: <86jzbxm7hv.fsf@gnu.org> From: Eli Zaretskii To: "J.P." In-Reply-To: <87seqlhgot.fsf@neverwas.me> (jp@neverwas.me) Subject: Re: bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers References: <87y10des6w.fsf@gnu.org> <87seqlhgot.fsf@neverwas.me> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74934 Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org, j@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org > From: "J.P." > Date: Tue, 17 Dec 2024 18:24:02 -0800 > > > steps to reproduce: > > emacs --no-init > > M-x erc > > ;; join some channel. > > M-x which-function-mode > > > > Current behavior: > > In erc buffers, which-function-mode displays either "[n/a]" or a string based on > > the chat history in the mode line. > > FTR, I'm able to reproduce it. > > > Expected behavior: > > which-function-mode shouldn’t be adding any string to mode line in erc buffers > > The first of the attached patches should hopefully address the issue. Is this for the release branch? That is, is this a recent regression? And if so, what is the second patch for? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 18 11:27:17 2024 Received: (at 74934) by debbugs.gnu.org; 18 Dec 2024 16:27:18 +0000 Received: from localhost ([127.0.0.1]:35734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwtJ-00045U-4R for submit@debbugs.gnu.org; Wed, 18 Dec 2024 11:27:17 -0500 Received: from mail-108-mta200.mxroute.com ([136.175.108.200]:36167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNwtD-00045G-S6 for 74934@debbugs.gnu.org; Wed, 18 Dec 2024 11:27:15 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta200.mxroute.com (ZoneMTA) with ESMTPSA id 193da983090000310e.001 for <74934@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 18 Dec 2024 16:27:07 +0000 X-Zone-Loop: ac7708e3a6d97ab0ff9894399a788cd83cb676c8e123 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1eidYpF5NBsp5PUYL/eIT+uUOj0hNNtgGQDRHbDTDKg=; b=GSrNKNtFKJpbIpmjPl2iH3k1UO gyVKUpUwnGiniyjCychoEUiDSsn4A7Xq+e0h4eWYtEO5XTH4MSmCpGYqelOXSUP0vrwZYS1vzYTkn 27okF9RGxRLw6/YNzfdSxJu8lLJoqMnvqBF8TLv03fqXxTSm7cUEz+iWhThb9LIsE8ShieWFsIieJ nLlMIvf2e61WVTMiL8/hE92PZtor1FPSRm69ewwaXU+NU9sZulJdFRMn5T4c0HUJ73K2SRCIGj+Wd 2N5+YRfI2xYFrR6tdLydPlx8jbVJaUhyeaQwBQNbSC92RtF180WUpCNmT56MHt7zpj6Zmzb4ASZZJ gWqj5a+A==; From: "J.P." To: Eli Zaretskii Subject: Re: bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers In-Reply-To: <86jzbxm7hv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2024 15:43:40 +0200") References: <87y10des6w.fsf@gnu.org> <87seqlhgot.fsf@neverwas.me> <86jzbxm7hv.fsf@gnu.org> Date: Wed, 18 Dec 2024 08:27:04 -0800 Message-ID: <87cyhpez3b.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74934 Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org, j@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org >> From: "J.P." >> Date: Tue, 17 Dec 2024 18:24:02 -0800 >>=20 >> > steps to reproduce: >> > emacs --no-init >> > M-x erc >> > ;; join some channel. >> > M-x which-function-mode >> > >> > Current behavior: >> > In erc buffers, which-function-mode displays either "[n/a]" or a strin= g based on >> > the chat history in the mode line. >>=20 >> FTR, I'm able to reproduce it. >>=20 >> > Expected behavior: >> > which-function-mode shouldn=E2=80=99t be adding any string to mode lin= e in erc buffers >>=20 >> The first of the attached patches should hopefully address the issue. > > Is this for the release branch? That is, is this a recent regression? No, this is for Emacs master (and ERC 5.6.1). AFAICT, the bug has been with us since at least Emacs 26.3, although "[n/a]" used to be "[???]". > > And if so, what is the second patch for? For anyone wondering, the second patch is for contributors working on ERC (I will add a news item). If you load ERC and invoke the function `erc-imenu-add-devel-patterns' in your config, your next visit to erc-backend.el should allow you to see something like ERC response 311 314 ERC response 312 ERC response 313 ERC response 315 318 323 369 ERC response 317 ERC response 319 ERC response 311 after typing M-x imenu 31 (whereas before you'd see nothing). Hitting RET on the first candidate should take you to (define-erc-response-handler (311 314) "WHOIS/WHOWAS notices." nil ...) As mentioned in the comment, I'd much rather it generate something like erc-server-311 erc-server-314 ... erc-server-311 but I don't know how to do that or if it's even possible. (If anyone out there has any clues, please share. TIA.) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 14:52:08 2024 Received: (at 74934-done) by debbugs.gnu.org; 22 Dec 2024 19:52:08 +0000 Received: from localhost ([127.0.0.1]:52007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPRzj-0006Ne-VL for submit@debbugs.gnu.org; Sun, 22 Dec 2024 14:52:08 -0500 Received: from mail-108-mta70.mxroute.com ([136.175.108.70]:44157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPRzh-0006NS-Sz for 74934-done@debbugs.gnu.org; Sun, 22 Dec 2024 14:52:07 -0500 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta70.mxroute.com (ZoneMTA) with ESMTPSA id 193efed3a7f000310e.001 for <74934-done@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 22 Dec 2024 19:52:01 +0000 X-Zone-Loop: c570ef0816bcc2f93b81df437ac44ab5965bded45435 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+7JPahHNisQsVY+I5+4X/ooVQA7IwtO23Yy/FW0oGYA=; b=VG0eC1rWIMGA5p14jsjz1ezk1s ROe6/q21pvlHw6qG/oiLKVq9fy5DA1bMD8KmIRTClk8Wt5ahpLuKlXFRYPiifHkDTyX216vZPM7Ws 0o2LyDShjwyr6FaqJIMWk5I7LTPaFFlr59ue928s/QoF9i+Tf1gpsIYY3UpgUNmr+iSz1v33+y9vx KztBIsx/byu6yhSSKCUoIXxNTPyTpOw4KY7mBC0gh6C5VgvEx5Kn9bxKExRnu+dNS56KS2KesuE/9 0Dp4F/5io5KfGSJDYBsXYFblMqIZjw7Lp1TLCk5wOciLoxjxUkA2sUqFjfWH8n1qUChj0uwgouXGO LEaet5UA==; From: "J.P." To: 74934-done@debbugs.gnu.org Subject: Re: bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers In-Reply-To: <87cyhpez3b.fsf@neverwas.me> (J. P.'s message of "Wed, 18 Dec 2024 08:27:04 -0800") References: <87y10des6w.fsf@gnu.org> <87seqlhgot.fsf@neverwas.me> <86jzbxm7hv.fsf@gnu.org> <87cyhpez3b.fsf@neverwas.me> Date: Sun, 22 Dec 2024 11:51:57 -0800 Message-ID: <87jzbr7axu.fsf@neverwas.me> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: masked@neverwas.me X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74934-done Cc: Eli Zaretskii , emacs-erc@gnu.org, j@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "J.P." writes: > Eli Zaretskii writes: > >> Is this for the release branch? That is, is this a recent regression? > > No, this is for Emacs master (and ERC 5.6.1). AFAICT, the bug has been > with us since at least Emacs 26.3, although "[n/a]" used to be "[???]". This has been installed as https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d1c670f0 > >> >> And if so, what is the second patch for? > > For anyone wondering, the second patch is for contributors working on > ERC (I will add a news item). I moved the dev utility to test/lisp/erc/resources/erc-tests-common.el and changed it to only modify the local binding of the variable `imenu-generic-expression'. Installed as: https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e9591fae Thanks and closing. From unknown Wed Jun 18 23:05:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Jan 2025 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator