unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Drew Adams <drew.adams@oracle.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "47992@debbugs.gnu.org" <47992@debbugs.gnu.org>,
	"jakanakaevangeli@chiru.no" <jakanakaevangeli@chiru.no>
Subject: bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
Date: Sun, 25 Apr 2021 12:33:17 +0200	[thread overview]
Message-ID: <3e43f9f4-68c1-a797-8bd6-8394d5512ac1@daniel-mendler.de> (raw)
In-Reply-To: <SA2PR10MB44744F5DE7749D99B731389EF3439@SA2PR10MB4474.namprd10.prod.outlook.com>

On 4/25/21 6:57 AM, Drew Adams wrote:
> As for my opinion on the proposed change: I haven't
> seen a good argument for using `eq' instead of `equal'
> to test for equality in `add|remove-hook' (in the code:
> `memq' instead of `member').
> 
> I gave good arguments for continuing to use `equal'.
> Emacs users use the Elisp interpreter interactively,
> and they do use lambda forms with `add|remove-hook',
> even though that's not a great idea.  `eq' doesn't
> cut the mustard at all, for such use.
> 
> Barring a good argument for using `eq', I'm not in
> favor of such a change.  Given a good argument, I
> might change my mind.  Clear enough?

Drew, it seems to you don't read the arguments which have been made and 
just stick to your opinion of "not applying changes".

You argue that `equal` is better since the user can
then add/remove literally written lambdas interactively. We both agree 
that this is not a recommended or reasonable usage of the hook 
functionality.

I argue that `eq` is better if you use `add/remove-hook` in a perfectly 
valid way, adding cyclic/large closures programmatically. This is an 
accepted practice, since we add closures in `minibuffer-with-setup-hook` 
and at other places. Furthermore it is a significantly more important 
use case than the interactive use case you put forward as argument.

Now we can stay with the borked semantics of `add/remove-hook` and 
continue to use `equal` to cater for your example and require all the 
reasonable programmatic usages of `add/remove-hook` to go through the 
totally unnecessary symbol indirection.

I don't see how your argument holds up here.

Daniel





  reply	other threads:[~2021-04-25 10:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 12:11 bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` Daniel Mendler
2021-04-24 20:12 ` bug#47992: [External] : " Drew Adams
2021-04-24 20:23   ` Daniel Mendler
2021-04-24 21:20     ` Drew Adams
2021-04-24 21:34       ` Daniel Mendler
2021-04-24 22:30   ` Stefan Monnier
2021-04-24 22:38     ` Daniel Mendler
2021-04-24 23:04       ` Stefan Monnier
2021-04-24 23:38         ` Daniel Mendler
2021-04-25  1:16         ` Drew Adams
2021-04-25  3:08           ` Stefan Monnier
2021-04-25  4:57             ` Drew Adams
2021-04-25 13:52               ` Stefan Monnier
2021-04-25  1:16       ` Drew Adams
2021-04-25  1:23     ` Drew Adams
2021-04-25  3:10       ` Stefan Monnier
2021-04-25  4:57         ` Drew Adams
2021-04-25 10:33           ` Daniel Mendler [this message]
2021-04-25 13:56           ` Stefan Monnier
2021-05-02  9:09 ` Lars Ingebrigtsen
2021-05-02 10:37   ` Daniel Mendler
2021-05-03  8:50     ` Lars Ingebrigtsen
2021-07-06 14:44     ` Olivier Certner
     [not found]   ` <877di6udfy.fsf@web.de>
2021-07-04  1:09     ` Lars Ingebrigtsen
2021-07-04  2:35       ` Michael Heerdegen
2021-07-04  2:56         ` Lars Ingebrigtsen
2021-07-04  4:28           ` Michael Heerdegen
2021-07-04 13:36             ` Lars Ingebrigtsen
2021-07-04 17:08               ` bug#47992: [External] : " Drew Adams
2021-07-04 22:45                 ` Michael Heerdegen
2021-07-05 12:39                 ` Lars Ingebrigtsen
2021-07-06  1:48             ` Richard Stallman
2021-07-06  2:37               ` bug#47992: [External] : " Drew Adams
2021-07-06  3:21                 ` Michael Heerdegen
2021-07-07 23:57                 ` Richard Stallman
2021-07-06  9:46               ` Arthur Miller
2021-07-07 23:57                 ` Richard Stallman
2021-07-08  2:11                   ` Arthur Miller
2021-07-04 23:15       ` Michael Heerdegen

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=3e43f9f4-68c1-a797-8bd6-8394d5512ac1@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=47992@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=jakanakaevangeli@chiru.no \
    --cc=monnier@iro.umontreal.ca \
    /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).