From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] frame.c: focus hooks Date: Sun, 17 Nov 2013 20:29:52 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0149ccae038c7d04eb639e22 X-Trace: ger.gmane.org 1384712993 26791 80.91.229.3 (17 Nov 2013 18:29:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Nov 2013 18:29:53 +0000 (UTC) Cc: emacs-devel To: Brian Jenkins Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 17 19:29:58 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 1Vi76c-0001eZ-6W for ged-emacs-devel@m.gmane.org; Sun, 17 Nov 2013 19:29:58 +0100 Original-Received: from localhost ([::1]:39933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vi76b-0007xi-Oi for ged-emacs-devel@m.gmane.org; Sun, 17 Nov 2013 13:29:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vi76Y-0007xT-CL for emacs-devel@gnu.org; Sun, 17 Nov 2013 13:29:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vi76X-0001Pt-4d for emacs-devel@gnu.org; Sun, 17 Nov 2013 13:29:54 -0500 Original-Received: from mail-oa0-x230.google.com ([2607:f8b0:4003:c02::230]:61961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vi76W-0001PY-WB for emacs-devel@gnu.org; Sun, 17 Nov 2013 13:29:53 -0500 Original-Received: by mail-oa0-f48.google.com with SMTP id n16so6060835oag.7 for ; Sun, 17 Nov 2013 10:29:52 -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:date:message-id:subject :from:to:cc:content-type; bh=OCKdxcoHCfo42Ty86zifsS19CKZ61PxdENBlmCYblPE=; b=srIJxBRtxOTTKye4gDr1ExJicMj6dHfjRE9R43sFtgCyrPzPc+bdb9lg8RO+HZzu16 mnf4DdOXRQgiHNdXeOieNb6+ZlfZW9H4ySbngeYGgIYtWrFCGTjh/vtY53aJ7HpQ9Sod 5h9UAUbwXZg/604SHpX2wM2IZl0ww++vH2nb3VizTKbz8VFDpkQgW3MWLUs06jWjmypr plbJSlcyG9MOJDVREtv/VhwoLiXp9L9Kjruyt4fZqh7cxygsv4Fg10uCRb4JnVOknnpQ e9HL/CgSk9l4VzdKJQJnt/tnuj1NUzdEOgb1LNLsRZttZcLrU5W7CTYZTqo5D642B0pu 0HTA== X-Received: by 10.182.121.137 with SMTP id lk9mr16475194obb.32.1384712992163; Sun, 17 Nov 2013 10:29:52 -0800 (PST) Original-Received: by 10.76.21.173 with HTTP; Sun, 17 Nov 2013 10:29:52 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: hh-Bt673gWmNukvFlE8IZ6P8XYA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::230 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:165301 Archived-At: --089e0149ccae038c7d04eb639e22 Content-Type: text/plain; charset=UTF-8 I welcome your idea! In fact I've been thinking for quite some time we needed something like this. I don't like the names of the hooks, however, since they don't seem particularly standard - usually the terminology used with focus is "focus gained" and "focus lost" (or "on focus" and "on lose focus"). On 17 November 2013 19:50, Brian Jenkins wrote: > Hello. > > I'd like to contribute the attached patch, which adds hooks into gain and > loss of focus events. > > This allows saving all buffers on loss of focus. (Alt-tabbing between > an editor and browser is a popular workflow for web programmers.) > > It also allows reversion of buffers on regain of focus, convenient if > one is switching between Emacs and another editor. > > People will probably find other handy uses for these hooks. > > Best, > Brian Jenkins > --089e0149ccae038c7d04eb639e22 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I welcome your idea! In fact I've been thinking for qu= ite some time we needed something like this. I don't like the names of = the hooks, however, since they don't seem particularly standard - usual= ly the terminology used with focus is "focus gained" and "fo= cus lost" (or "on focus" and "on lose focus").


On 17 Novembe= r 2013 19:50, Brian Jenkins <brian@brianjenkins.org> wr= ote:
Hello.

<= /div>
I'd like to contribute the attached patch, which adds hooks i= nto gain and
loss of focus events.

This allows saving all = buffers on loss of focus. =C2=A0(Alt-tabbing between
an editor and browser is a popular workflow for web programmers.)

It also allows reversion of buffers on regain of focus= , convenient if
one is switching between Emacs and another editor= .

People will probably find other handy uses for these ho= oks.

Best,
Brian Jenkins

--089e0149ccae038c7d04eb639e22--