From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Jenkins Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] frame.c: focus hooks Date: Tue, 19 Nov 2013 19:52:13 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec52be9bd9db11304eb9132d9 X-Trace: ger.gmane.org 1384908766 18213 80.91.229.3 (20 Nov 2013 00:52:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2013 00:52:46 +0000 (UTC) Cc: emacs-devel To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 20 01:52:52 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Viw2E-00007M-Rs for ged-emacs-devel@m.gmane.org; Wed, 20 Nov 2013 01:52:51 +0100 Original-Received: from localhost ([::1]:52289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Viw2E-0000Y5-DT for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2013 19:52:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Viw29-0000Y0-G3 for emacs-devel@gnu.org; Tue, 19 Nov 2013 19:52:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Viw24-0002Jk-P4 for emacs-devel@gnu.org; Tue, 19 Nov 2013 19:52:45 -0500 Original-Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:39572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Viw24-0002Je-DN for emacs-devel@gnu.org; Tue, 19 Nov 2013 19:52:40 -0500 Original-Received: by mail-pd0-f179.google.com with SMTP id r10so5896994pdi.38 for ; Tue, 19 Nov 2013 16:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=6Eq9H+HrYfIb9hgmxiSR2T6Mn8goUaE7Xn11ErpJaS8=; b=fyNCmuJEv1hKnVh8DbcmTMaIb4l9phe7gAel6YQeoILtUEk6JISC5AVdyHd1HpbjIo LUiD5atK8GsQP/bAKePy/1XC6xP5DKt+ya2+cnK7dI8UsG3UDeK0UflcJvfv2gqXBScq /0jsB3sTjaGXOUu43m/uBUb7R415mgXEnvntDTE1hBLVF5CVM0V3SYABwCj/DAGM/eUG rLeHBpmwkCKSH4W3X/6wI1r0x1BUaAnIIUOaroNwvCroJuF3JaqSeSn2P19RPQyOdLvR InZ2+C/fOXOkRLJ3Rluz7iMHI+65oGnzcawmfmbJCVL1q7qO6035jNnw/XdEmktxS3ar L2Tw== X-Received: by 10.66.27.244 with SMTP id w20mr28734205pag.15.1384908758820; Tue, 19 Nov 2013 16:52:38 -0800 (PST) Original-Received: by 10.68.199.68 with HTTP; Tue, 19 Nov 2013 16:52:13 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: FzzEJpMGW4751hxcJh6nKz4BGj4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165409 Archived-At: --bcaec52be9bd9db11304eb9132d9 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 19, 2013 at 1:53 PM, Drew Adams 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 --bcaec52be9bd9db11304eb9132d9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On T= ue, Nov 19, 2013 at 1:53 PM, Drew Adams <drew.adams@oracle.com>= wrote:
Hm. I see nothing in either the Emacs manual or the E= lisp manual that suggests that Lisp code should not use `add-hook' or `= remove-hook'.

=A0

Where do you find a convention s= aying 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 presu= med convention are impolite or do not act in good faith?

=


I'm sorr= y if I was unclear. =A0Of course it is appropriate for package
authors to use hooks in general.

I believe th= at 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 g= ood faith.

If someone writes an otherwise great pa= ckage 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 y= ou're assuming that
everyone will want to to save all their f= iles when they alt-tab away
from Emacs. =A0Many people might not = want that. =A0Why not leave this hook
to the user to configure so that more people can benefit from your
work?"

We should assume that disruptiv= e side effects are due to inattention,
not malice.
=A0=A0

<= span style=3D"font-size:10pt;font-family:'Trebuchet MS',sans-serif;= color:rgb(36,64,97)">Where are the "Emacs etiquette" and "so= cial norms" in this regard put forth?

=A0

Just wondering.



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

But there *are*= social norms being communicated in this forum. =A0I don't
th= ink I'm imagining a consensus of fairly strong disapproval for package<= /div>
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 i= nfo
pages, maybe it should be.
=A0
=

You say:<= /p>

=A0

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 th= at adding them opens a huge can of worms.

=A0

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

=A0


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

Best,
Brian Jenkins
=A0
=
--bcaec52be9bd9db11304eb9132d9--