From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] frame.c: focus hooks Date: Tue, 19 Nov 2013 22:16:41 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384917417 6785 80.91.229.3 (20 Nov 2013 03:16:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2013 03:16:57 +0000 (UTC) Cc: Brian Jenkins , rms@gnu.org, Bozhidar Batsov , emacs-devel To: Josh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 20 04:17:01 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 1ViyHl-0003LJ-Az for ged-emacs-devel@m.gmane.org; Wed, 20 Nov 2013 04:17:01 +0100 Original-Received: from localhost ([::1]:52638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViyHk-0007wW-GH for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2013 22:17:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViyHa-0007wC-Rc for emacs-devel@gnu.org; Tue, 19 Nov 2013 22:16:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViyHT-0005sk-Gx for emacs-devel@gnu.org; Tue, 19 Nov 2013 22:16:50 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViyHT-0005sf-Ch; Tue, 19 Nov 2013 22:16:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KWN/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFHO+KWN/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="38689045" Original-Received: from 206-248-165-141.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.165.141]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Nov 2013 22:16:41 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3DBFEAE358; Tue, 19 Nov 2013 22:16:41 -0500 (EST) In-Reply-To: (josh@foxtail.org's message of "Tue, 19 Nov 2013 16:52:24 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:165420 Archived-At: > These frame focus hooks are closely related to the select-window-hook > that was proposed and ultimately rejected a few years back[0]. Would > such a hook be accepted now if its documentation were to contain a > similar warning? Personally, I think such a hook is not in itself a problem. But I also think it's ill-advised. The main reason is that select-window is an operation used internally, so it can be called many times within a single command, even if the command might end up "staying in the same window". A pre/post-command-hook that compares selected-window with the previous one will provide a behavior closer to what users want, I think. Of course, it could still be called select-window-hook, tho that name would be a bit misleading. Stefan