unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: 60784-done@debbugs.gnu.org
Cc: emacs-erc@gnu.org
Subject: bug#60784: 29.0.60; ERC 5.5: Don't interfere with non-module minor modes in erc-open
Date: Tue, 17 Jan 2023 06:33:53 -0800	[thread overview]
Message-ID: <87lem1telq.fsf__4949.05102984689$1673966125$gmane$org@neverwas.me> (raw)
In-Reply-To: <87cz7iwmae.fsf@neverwas.me> (J. P.'s message of "Fri, 13 Jan 2023 06:18:17 -0800")

"J.P." <jp@neverwas.me> writes:

> ERC currently takes ownership of any minor mode it encounters whose name
> happens to be prefixed with "erc-" as long as its mode variable is set
> locally in an ERC buffer. That is, it propagates the enabled/disabled
> state to new `erc-mode' buffers, possibly by calling the namesake
> minor-mode function. This makes sense for modes defined by "local"
> modules, whether built-in or third-party. But other, non-module minor
> modes that just happen to use the same top-level library namespace
> should be left alone.

I've addressed this in a slightly more reliable way that doesn't depend
on heuristics. Instead of banking on the unlikelihood of a non-module
minor mode also defining a function suffixed with "-enable," I've opted
for tagging a module's minor-mode symbol with the property `erc-module',
to be paired with its canonical symbol as a value.

It happens that while addressing this, I stumbled upon another, closely
related (and arguably more important) bug stemming from the "local
modules" change set (bug#57955), which was installed last November to
support the SASL module. Basically, a local module's activation state
(i.e., that of its minor-mode variable) wouldn't survive reconnections,
as vociferously claimed. My oversight here owes its inception, in part,
to the SASL module's lack of interest in target buffers, which its test
cases came to reflect. And while the (vital) matter of reinstating a
local module's associated data falls beyond the scope of this change, it
ranks highly among the improvements I'd like to see in ERC's next major
release.

Thanks (and closing).





      reply	other threads:[~2023-01-17 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 14:18 bug#60784: 29.0.60; ERC 5.5: Don't interfere with non-module minor modes in erc-open J.P.
2023-01-17 14:33 ` 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='87lem1telq.fsf__4949.05102984689$1673966125$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=60784-done@debbugs.gnu.org \
    --cc=emacs-erc@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).