From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#7381: 24.0.50; Provide a hook run when a window is selected Date: Fri, 12 Nov 2010 15:53:50 +0100 Message-ID: <877hgifv9d.fsf@gmail.com> References: <87k4kjfldo.fsf@gmail.com> <4CDCF7E0.40406@gmx.at> <87bp5ug4lz.fsf@gmail.com> <4CDD3B9B.8090309@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1289574901 27213 80.91.229.12 (12 Nov 2010 15:15:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2010 15:15:01 +0000 (UTC) Cc: 7381@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 12 16:14:57 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGvL6-0001iE-Ch for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Nov 2010 16:14:56 +0100 Original-Received: from localhost ([127.0.0.1]:42153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGvL5-0004zC-0n for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Nov 2010 10:14:55 -0500 Original-Received: from [140.186.70.92] (port=60529 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGvKU-0004IC-6l for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2010 10:14:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGvKA-0003Ab-Ji for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2010 10:13:59 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGvKA-0003AX-I1 for bug-gnu-emacs@gnu.org; Fri, 12 Nov 2010 10:13:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PGuxy-0005wk-3Y; Fri, 12 Nov 2010 09:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Nov 2010 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7381 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7381-submit@debbugs.gnu.org id=B7381.128957343822852 (code B ref 7381); Fri, 12 Nov 2010 14:51:02 +0000 Original-Received: (at 7381) by debbugs.gnu.org; 12 Nov 2010 14:50:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PGuxZ-0005wX-My for submit@debbugs.gnu.org; Fri, 12 Nov 2010 09:50:37 -0500 Original-Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PGuxX-0005wP-Tk for 7381@debbugs.gnu.org; Fri, 12 Nov 2010 09:50:36 -0500 Original-Received: by bwz12 with SMTP id 12so3112584bwz.3 for <7381@debbugs.gnu.org>; Fri, 12 Nov 2010 06:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :in-reply-to:references:user-agent:date:message-id:mime-version :content-type:content-transfer-encoding; bh=9MhjSLBYJwxJV/mqU6NnYJYE6G8HqghRjoB9kqS6F+I=; b=nl3W0f6wozvp8pYK/3kgLdyk3a0K425KiK7GnyEez58/8cwGzV1ejYhB9NMkybTN07 zEFTuUa4eQ05ajSuNYzcuujfopClg0FMV7dSYqFsCSEOnw55Fl5xhPDlwJEPUvFpA4zp zIVr2iWg3Kqx/uMtsdkG8QwSDmYc/8Skh01lE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; b=RkvC9Cxo3LnM8mSLYmgLVC+gdAIOyHG+QHM9NjyUxUhxE6UtlpYDJ7GidxanHR+IOu 3QGLwq/7R0T/EbcIWoefYnA5S+4JaewcMF7qUqpd2Bx+ja5pfzG9NRmu0OyBOjAbOviF 5sSCooAxQzjiHB725cGLd5AnPETR8RssXUIlA= Original-Received: by 10.204.101.84 with SMTP id b20mr2846967bko.53.1289573724036; Fri, 12 Nov 2010 06:55:24 -0800 (PST) Original-Received: from localhost (176.119.broadband10.iol.cz [90.177.119.176]) by mx.google.com with ESMTPS id 4sm1549524bki.13.2010.11.12.06.55.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Nov 2010 06:55:22 -0800 (PST) In-Reply-To: <4CDD3B9B.8090309@gmx.at> (martin rudalics's message of "Fri, 12 Nov 2010 14:05:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 12 Nov 2010 09:51:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:41514 Archived-At: martin rudalics writes: >> Any reason not to have `get-mru-window' in the trunk (I actually >> searched for exactly that before resorting to the advice hack)? > > In general it's not very useful because the mru-window is usually the > selected one (unless it was selected with NORECORD non-nil). I use it > only in `delete-other-windows' when the selected window gets deleted. Oh! I misunderstood -- I expected it to return the most recently used window other than the selected one... Well, as it is now it's not very useful at all, indeed. :-| >> (And I guess the hook proposal still stands as well, or are there any >> arguments against that? One might want to do other things triggered by >> window selection.) > > Can't you use `window-configuration-change-hook'? I don't see how that would help, as the hook is not run when a window is selected. So I'm still stuck with the advice... I guess I could at least use your `window-use-time' to manually sort the windows and select the one with the next-to-highest value. =C5=A0t=C4=9Bp=C3=A1n