all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nic Ferrier <nferrier@ferrier.me.uk>
To: bruce.connor.am@gmail.com
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: why do some programming modes have customize hooks and others do not?
Date: Mon, 20 Oct 2014 11:54:59 +0100	[thread overview]
Message-ID: <87y4sb57uk.fsf@ferrier.me.uk> (raw)
In-Reply-To: <CAAdUY-L8MMmVakXxhUhpZEMQx_vA1Z4kw-+Q4bJnJ4qYfrVn-g@mail.gmail.com> (bruce connor am's message of "Mon, 20 Oct 2014 11:38:33 +0100")

bruce.connor.am@gmail.com writes:

>> If I sent patches (once we're on git, how goes that?) for customize any
>> hooks that aren't already customizable, they would get accepted?
>
> I'd like to point out that saving a hook with the customize interface is
> kind of asking for trouble.
>
> Hooks are routinely added by arbitrary packages. If an unsuspecting user
> customizes and saves a hook through the customize interface, any functions
> that other packages have added to it will be saved as well.
> If the user later removes one of these packages, he'll be confronted with
> "undefined function" errors which no amount of restarting will solve.
>
> The safe (and annoying) way to do this would be to define a second hook for
> the user, and make that a defcustom.

I agree this is a problem, though I've always seen it as a problem with
the packages that do that.

As a package author I try and always make a way to specify whether what
I'm adding to hooks should be done or not:

   my-mode-add-myself-to-such-and-such-a-hook y/n

for example.

Separating hooks into 2 sections might work but introduces other
problems.

If I use a hooked function to autoload my package, then using the
non-customize hook won't work. The user ends up having to require my
package in their .emacs.


I think the route of all this is that there are a significant number of
authors who don't care about customize and don't try and use it.

Is that fair?



Nic



  reply	other threads:[~2014-10-20 10:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 11:10 why do some programming modes have customize hooks and others do not? Nic Ferrier
2014-10-18 11:37 ` Bastien
2014-10-18 21:46 ` Stefan Monnier
2014-10-18 22:24   ` Nic Ferrier
2014-10-19 22:44   ` Rüdiger Sonderfeld
2014-10-20  2:15     ` Stefan Monnier
2014-10-20  8:17       ` Nic Ferrier
2014-10-20 10:38         ` Artur Malabarba
2014-10-20 10:54           ` Nic Ferrier [this message]
2014-10-20 12:07             ` Artur Malabarba
2014-10-20 16:47               ` Stefan Monnier
2014-10-20 18:29               ` Nic Ferrier
2014-10-20 16:02         ` Stefan Monnier
2014-10-20 19:11           ` Nic Ferrier
2014-10-20 20:39             ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4sb57uk.fsf@ferrier.me.uk \
    --to=nferrier@ferrier.me.uk \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.