From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 6fdc3fa: Support terminal focus notifications Date: Sat, 09 Jun 2018 15:05:01 -0400 Message-ID: References: <20180609055212.3056.85949@vcs0.savannah.gnu.org> <20180609055213.B7E0920498@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528571024 27132 195.159.176.226 (9 Jun 2018 19:03:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2018 19:03:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: dancol@dancol.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 09 21:03:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRj9H-0006vs-DI for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2018 21:03:39 +0200 Original-Received: from localhost ([::1]:41241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRjBM-0001ue-OW for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2018 15:05:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRjAj-0001tC-KJ for emacs-devel@gnu.org; Sat, 09 Jun 2018 15:05:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRjAg-00039W-GM for emacs-devel@gnu.org; Sat, 09 Jun 2018 15:05:09 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRjAg-00038O-AL for emacs-devel@gnu.org; Sat, 09 Jun 2018 15:05:06 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w59J51WM010780; Sat, 9 Jun 2018 15:05:01 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 11B196565E; Sat, 9 Jun 2018 15:05:01 -0400 (EDT) In-Reply-To: (dancol@dancol.org's message of "Sat, 9 Jun 2018 08:49:25 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6304=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6304> : inlines <6687> : streams <1789207> : uri <2655368> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226149 Archived-At: > handle-focus-{in,out} have an interactive specification that makes them > not work when bound directly to the synthetic event --- which seems silly, > since we never actually use the event --- but I didn't want to touch the > existing focus code. Ah, right. We can fix the interactive spec not to signal an error. >>> +(define-key global-map [xterm-focus-in] #'xterm-handle-focus-in) >>> +(define-key global-map [xterm-focus-out] #'xterm-handle-focus-out) >> >> I think this deserves a comment explaining why we don't use the >> pre-existing `focus-in` and `focus-out` events and why we bind our >> events in global-map rather than in special-map (as is done for >> `focus-in/out` events). > > I was being consistent with the xterm-paste event. All three events should > go in special-map if that's the right place, shouldn't they? The decision should not be based on the fact that they all come from xterm. I think xterm-paste wouldn't be right on special-map. But to tell you the truth, I'm not completely sure what should go on special-map and what shouldn't. > It doesn't seem to make a difference in this case. I think it makes a difference if you do: C-x C-c [ My general rule of thumb for special-map is to think about what should happen if such events happen in the middle of a key-sequence. ] Stefan