From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [PATCH] frame.c: focus hooks Date: Sun, 17 Nov 2013 14:33:43 -0800 (PST) Message-ID: <183af97b-53d1-45b8-8a24-5ab6bd84f362@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1384727653 9576 80.91.229.3 (17 Nov 2013 22:34:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Nov 2013 22:34:13 +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 23:34:14 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 1ViAv0-0004m5-CU for ged-emacs-devel@m.gmane.org; Sun, 17 Nov 2013 23:34:14 +0100 Original-Received: from localhost ([::1]:40535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViAuz-0003PM-RO for ged-emacs-devel@m.gmane.org; Sun, 17 Nov 2013 17:34:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViAuo-0003PD-FE for emacs-devel@gnu.org; Sun, 17 Nov 2013 17:34:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViAuf-0008IG-TF for emacs-devel@gnu.org; Sun, 17 Nov 2013 17:34:02 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:21082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViAuf-0008I9-Lq for emacs-devel@gnu.org; Sun, 17 Nov 2013 17:33:53 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAHMXjje015560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 Nov 2013 22:33:46 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAHMXilV007288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Nov 2013 22:33:45 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAHMXiWW022738; Sun, 17 Nov 2013 22:33:44 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:165311 Archived-At: > I'd like to contribute the attached patch, which adds hooks into > gain and loss of focus events. >=20 > This allows saving all buffers on loss of focus. (Alt-tabbing > between an editor and browser is a popular workflow for web > programmers.) >=20 > 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. Sounds useful. Is this only for a focus switch between Emacs (any frame) and some other application? Or is it also for a focus switch from one Emacs frame to another. (I hope it is the former, which is what you describe in your example use cases.)