unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org, j@gnu.org
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	[thread overview]
Message-ID: <87cyhpez3b.fsf__15161.2620962382$1734539435$gmane$org@neverwas.me> (raw)
In-Reply-To: <86jzbxm7hv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 18 Dec 2024 15:43:40 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: emacs-erc@gnu.org, 74934@debbugs.gnu.org
>> From: "J.P." <jp@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.)





      parent reply	other threads:[~2024-12-18 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18  0:43 bug#74934: 30.0.92; Unexpected behavior by which-function-mode in erc-mode buffers Anush V
2024-12-18  2:24 ` J.P.
     [not found] ` <87seqlhgot.fsf@neverwas.me>
2024-12-18 13:43   ` Eli Zaretskii
     [not found]   ` <86jzbxm7hv.fsf@gnu.org>
2024-12-18 16:27     ` J.P. [this message]

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='87cyhpez3b.fsf__15161.2620962382$1734539435$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=74934@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-erc@gnu.org \
    --cc=j@gnu.org \
    /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).