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: Mon, 18 Nov 2013 14:49:39 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b86f2941be7e804eb78da2f X-Trace: ger.gmane.org 1384804201 18763 80.91.229.3 (18 Nov 2013 19:50:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Nov 2013 19:50:01 +0000 (UTC) Cc: Bozhidar Batsov , emacs-devel To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 18 20:50:06 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 1ViUph-0002QF-RX for ged-emacs-devel@m.gmane.org; Mon, 18 Nov 2013 20:50:06 +0100 Original-Received: from localhost ([::1]:45636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViUph-0003sB-9r for ged-emacs-devel@m.gmane.org; Mon, 18 Nov 2013 14:50:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViUpc-0003ox-2a for emacs-devel@gnu.org; Mon, 18 Nov 2013 14:50:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViUpa-0002hO-7j for emacs-devel@gnu.org; Mon, 18 Nov 2013 14:50:00 -0500 Original-Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:35742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViUpY-0002gr-CM; Mon, 18 Nov 2013 14:49:56 -0500 Original-Received: by mail-pd0-f173.google.com with SMTP id x10so6972420pdj.18 for ; Mon, 18 Nov 2013 11:49:54 -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=nMzA7MDOTyzjKLgncsTe41e6T3NWf8gpLWLpmZ/QIK4=; b=aVs1PCX5/unM9wUDrgaR/bWClUHP+NFT0GpceJ5G0vPGLXq9ZGk9ZOvq2Xb5Oav6UL k4/m83d0BJ3MFrpNYTZheoNTHjy9B1UN04RNGg1IdlD9amgZj31dqSum4uMfDv4W10Lj Po6ppYiFyFUVCC0ALINq7wGqKDD1TD0DKSoPZcvNKP/gS+5lNi0YzFeNhs4idrBcAnJw 0L94ZLbyMBGClQQ+Y7vkrmp1+/6ZBlxZOaLnoAXGJOkPoVs4sDZKBNBBoQqyAh0+DWJZ l6ESXc3U+fanrazlUqh/o/YLGrxWloVkoTQmMvEJUk5LHn4S5ceD8yZS3rt6Sp+NF+9t KOfA== X-Received: by 10.68.171.164 with SMTP id av4mr15144973pbc.94.1384804194704; Mon, 18 Nov 2013 11:49:54 -0800 (PST) Original-Received: by 10.68.39.202 with HTTP; Mon, 18 Nov 2013 11:49:39 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: hFX1ZT-blpRqUXOPIR9Y_JF1bV4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::22d 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:165338 Archived-At: --047d7b86f2941be7e804eb78da2f Content-Type: text/plain; charset=ISO-8859-1 > > If you don't use click-to-focus, Emacs can gain and lose focus every time > you move the mouse, even inadvertently. It would be very bad for this to > have any lasting effect. I think such hooks should not exist. Hello, Dr. Stallman. Thank you for your thoughtful feedback. I agree that it may not make sense for users in focus-follows-mouse environments to use these hooks. I don't think it follows that these hooks should not exist. They default to nil -- people who don't want them don't have to use them. There is a large class of programmers (web developers) who expect their editor to *be able* to behave this way. True, they will need to take responsibility not to break their environments by abusing these hooks, but Emacs already requires a degree of responsibility from those configuring it. Perhaps I am misunderstanding how hooks are run? I have assumed that running a nil hook is a no-op. If not, perhaps we can add a check to the C event handler and call Frun_hooks only if the hook has been set? I'm not trying to force anyone to run lisp on focus change. I'm hoping to encourage wider use of Emacs in the web development communities. Best, Brian Jenkins --047d7b86f2941be7e804eb78da2f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
If you don't use click-to-focus, Emacs can gain and lose focus every ti= me
you move the mouse, even inadvertently. =A0It would be very bad for this to=
have any lasting effect. =A0I think such hooks should not exist.


Hello, Dr. Stallman.

Thank you for your thoughtful feedback.

I agree that it may not make sense for users in focus-follow= s-mouse
environments to use these hooks. =A0I don't think it = follows that these
hooks should not exist. =A0They default to nil= -- people who don't want
them don't have to use them.

There is a l= arge class of programmers (web developers) who expect their
edito= r to *be able* to behave this way. =A0True, they will need to take
responsibility not to break their environments by abusing these hooks,
but Emacs already requires a degree of responsibility from those
configuring it.

Perhaps I am misunderstandin= g how hooks are run? =A0I have assumed that
running a nil hook is a no-op. =A0If not, perhaps we can add a check t= o
the C event handler and call Frun_hooks only if the hook has be= en set?

I'm not trying to force anyone to run = lisp on focus change. =A0I'm hoping
to encourage wider use of Emacs in the web development communities.

Best,
Brian Jenkins
--047d7b86f2941be7e804eb78da2f--