GNU bug report logs -
#74934
30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers
Previous Next
Reported by: Anush V <j <at> gnu.org>
Date: Wed, 18 Dec 2024 00:45:01 UTC
Severity: normal
Found in version 30.0.92
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: emacs-erc <at> gnu.org, 74934 <at> debbugs.gnu.org
>> From: "J.P." <jp <at> neverwas.me>
>> 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?
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 <RET> 31 <TAB>
(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.)
This bug report was last modified 149 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.