emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] frame.c: focus hooks


From: Brian Jenkins
Subject: Re: [PATCH] frame.c: focus hooks
Date: Tue, 19 Nov 2013 19:52:13 -0500

On Tue, Nov 19, 2013 at 1:53 PM, Drew Adams <address@hidden> wrote:

Hm. I see nothing in either the Emacs manual or the Elisp manual that suggests that Lisp code should not use `add-hook' or `remove-hook'.

 

Where do you find a convention saying that *polite* Lisp packages do not modify hook values and that to do so in a package published for widespread use is "rude" and "ill-mannered"? Or that package authors who do not respect such a presumed convention are impolite or do not act in good faith?



I'm sorry if I was unclear.  Of course it is appropriate for package
authors to use hooks in general.

I believe that it would in inappropriate to set *these hooks in
particular*, because behavior on focus-in & focus-out is a matter of
taste.

As for good faith, I explicitly said we should assume good faith.

If someone writes an otherwise great package that has weird global side
effects, we shouldn't assume that he or she is a jerk.

We should say "Hey, this is a great package, but you're assuming that
everyone will want to to save all their files when they alt-tab away
from Emacs.  Many people might not want that.  Why not leave this hook
to the user to configure so that more people can benefit from your
work?"

We should assume that disruptive side effects are due to inattention,
not malice.
  

Where are the "Emacs etiquette" and "social norms" in this regard put forth?

 

Just wondering.



Well, nowhere.  No one is saying that package authors shouldn't use any
hooks.  I'm sorry that I sounded like I was saying that -- it's not what I 
meant.

But there *are* social norms being communicated in this forum.  I don't
think I'm imagining a consensus of fairly strong disapproval for package
authors globally imposing behaviors that are a matter of taste or that
work well on one platform, but not on others.

If this convention is not communicated in, for instance, the ELisp info
pages, maybe it should be.
 

You say:

 

It's probably not a bad idea to document the intent of these hooks -- that they are meant for the end user and that it is inappropriate to set them in public packages, but I don't see that adding them opens a huge can of worms.

 

Then please do that. If it is inappropriate for Lisp code to use these hooks, then document that, of course. And perhaps document the reason. I don't think you can assume that people (users or package authors) are aware of the convention that you presume.

 


Thanks for the feedback. You make a good point -- I will do this.

Best,
Brian Jenkins
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]