GNU bug report logs - #67207
[PATCH] Add elixir-ts-mode-hook to elixir-ts-mode

Previous Next

Package: emacs;

Reported by: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>

Date: Wed, 15 Nov 2023 18:36:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #28 received at 67207 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 67207 <at> debbugs.gnu.org
Subject: Re: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode
Date: Sat, 18 Nov 2023 22:39:30 -0500
>>> 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





This bug report was last modified 1 year and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.