From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 67207@debbugs.gnu.org
Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode
Date: Sat, 18 Nov 2023 22:39:30 -0500 [thread overview]
Message-ID: <jwv7cmefmd4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87edgnzbj2.fsf@gmail.com> (Wilhelm Kirschbaum's message of "Sat, 18 Nov 2023 10:32:22 +0200")
>>> Stefan, does this mean define-derived-mode has some deficiency?
>>> Many/most modes defined using it don't have an explicit hook
>>> definition, so should we now define a mode hook for all of them?
>> Usually we don't have good ideas of `:options` to provide for hook
>> variables, so it's not very useful to expose them to Custom.
> After I had a look how it works, it seems pretty convenient for users
> relying on customize menus and not knowing which hooks might be useful.
> There are some modes using this feature, but its not consistently used.
Yes but it's unreliable: as soon as some code uses `add-hook` on this
hook variable, Custom gets all confused because it doesn't know
why/where the variable has a different value from the one it expected.
> Won't it make sense to define a hook to custom anyways, so that users
> get used to the idea of using the customize menus to add hooks?
As long as Custom breaks down when someone uses `add-hook`, I don't feel
comfortable exposing unsuspecting users to the brittleness of hooks in
Custom :-(
Custom's main audience is specifically those users who don't (want to) know
about such tricky interactions.
> Only after using Emacs for 5+ years now I am only now discovering the
> convenience of the customize menu, probably getting too lazy to update
> init.el.
:-)
Stefan
next prev parent reply other threads:[~2023-11-19 3:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 18:32 bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Wilhelm Kirschbaum
2023-11-15 19:38 ` Eli Zaretskii
2023-11-15 19:43 ` Wilhelm Kirschbaum
2023-11-15 19:58 ` Eli Zaretskii
2023-11-15 22:53 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-18 8:32 ` Wilhelm Kirschbaum
2023-11-19 3:39 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-18 10:03 ` Eli Zaretskii
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=jwv7cmefmd4.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=67207@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=wkirschbaum@gmail.com \
/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).