From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16874: 24.3.50; Regression in active window detection Date: Wed, 26 Feb 2014 11:16:39 +0100 Message-ID: <530DBF07.9000707@gmx.at> References: <87eh2rftna.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1393409841 14837 80.91.229.3 (26 Feb 2014 10:17:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2014 10:17:21 +0000 (UTC) Cc: 16874@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 26 11:17:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WIbYP-0006d2-0K for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Feb 2014 11:17:29 +0100 Original-Received: from localhost ([::1]:39397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIbYO-000717-BN for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Feb 2014 05:17:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIbY9-0006mo-6g for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 05:17:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIbY1-0006we-1b for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 05:17:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIbY0-0006wa-UB for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 05:17:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WIbY0-0007Ew-KX for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 05:17:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Feb 2014 10:17:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16874-submit@debbugs.gnu.org id=B16874.139340981227782 (code B ref 16874); Wed, 26 Feb 2014 10:17:04 +0000 Original-Received: (at 16874) by debbugs.gnu.org; 26 Feb 2014 10:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:40399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIbXn-0007E1-BI for submit@debbugs.gnu.org; Wed, 26 Feb 2014 05:16:51 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:55244) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIbXl-0007Dp-Qc for 16874@debbugs.gnu.org; Wed, 26 Feb 2014 05:16:50 -0500 Original-Received: from [62.47.38.172] ([62.47.38.172]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LlV71-1WqphX1J9L-00bHYX for <16874@debbugs.gnu.org>; Wed, 26 Feb 2014 11:16:48 +0100 In-Reply-To: <87eh2rftna.fsf@gmail.com> X-Provags-ID: V03:K0:vUv8JhML7Fen43wJ/fjD5BKPeL044ArxUHhJAIvMxqpql8c65LK ucWaZ0kmnP5kLGU22kvU6oO7T4uRUYtONunxO2ZOzY5afBaIf8ZUASmgdGDwp3ZUC0A74q6 t4qQgX+esE4iJHQCQXBb8SS4QcnrhKY2GjrTIDt+d9KVmvXXyqBgs63wWEVBh3hMUvr/0Bp mQq0KuwYaKKYvYz+p0p8A== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86246 Archived-At: Damien Cassou schrieb: > The following piece of code, from the milkypostman/powerline github > repository, used to detect if the current window is active or not: > > (defun powerline-selected-window-active () > "Return whether the current window is active." > (or (eq (frame-selected-window) > (selected-window)) > (and (minibuffer-window-active-p > (frame-selected-window)) > (eq (pl/minibuffer-selected-window) > (selected-window))))) > > This works fine in released Emacs 24 but does not work anymore in > emacs-snapshot (see below for details about the version I used to test). > Is this an Emacs regression or a problem in the implementation of this > function that is revealed by some recent changes in Emacs? > > > More about this issue: https://github.com/milkypostman/powerline/issues/37 From the discussion in that thread I wasn't able to understand what that function is needed for. Could you describe that? For example, why is > (or (eq (frame-selected-window) > (selected-window)) needed? What does `pl/minibuffer-selected-window' return? And why does > (and (minibuffer-window-active-p > (frame-selected-window)) > (eq (pl/minibuffer-selected-window) > (selected-window))))) one time call `frame-selected-window' and one time `selected-window'? martin