From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers Date: Wed, 18 Dec 2024 08:27:04 -0800 Message-ID: <87cyhpez3b.fsf__15161.2620962382$1734539435$gmane$org@neverwas.me> References: <87y10des6w.fsf@gnu.org> <87seqlhgot.fsf@neverwas.me> <86jzbxm7hv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20728"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org, j@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 18 17:30:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNwwM-0005Bj-KW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Dec 2024 17:30:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNwuT-0000lQ-7C; Wed, 18 Dec 2024 11:28:34 -0500 Original-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 1tNwu2-0000ZU-JN for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 11:28:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNwu2-0000ig-BY for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 11:28:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=1eidYpF5NBsp5PUYL/eIT+uUOj0hNNtgGQDRHbDTDKg=; b=E+ywhBuzOqdNWN4BfCcxLfywL0aQtAbX1M5/8jIHZUagzK78JN8/aztbVw+4QK+SA04PgzRY+a6Zpekofvu2bm5mp2zVPD/8onZcDLD30CAfqs7uNhWeiAh1szFFiuKpiSqgEOI+pgELDwzE5+YdtarsCzG5JdMFCZQhBtg/Ku8T4bzBeuijYylyKYz5gEUSUzMccAilgqxwnk6eYQB7ZGDCYs1f/6lanJoqjrDjRbwbPPbvTrj6ejOHtpwp+uM0CMKfYrcZSjBBpRN2KsKA7E9PRPttxECjXylqLrQDHi/RunTDBSq8OwYPntBWotX7I9oMJUfvsrPhF7/IgQANwg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNwu2-00046j-5v for bug-gnu-emacs@gnu.org; Wed, 18 Dec 2024 11:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Dec 2024 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74934 X-GNU-PR-Package: emacs Original-Received: via spool by 74934-submit@debbugs.gnu.org id=B74934.173453923815721 (code B ref 74934); Wed, 18 Dec 2024 16:28:02 +0000 Original-Received: (at 74934) by debbugs.gnu.org; 18 Dec 2024 16:27:18 +0000 Original-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 Original-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 Original-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==; In-Reply-To: <86jzbxm7hv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2024 15:43:40 +0200") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297342 Archived-At: 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.)