GNU bug report logs - #16874
24.3.50; Regression in active window detection

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien.cassou <at> gmail.com>

Date: Tue, 25 Feb 2014 09:08:02 UTC

Severity: normal

Tags: notabug

Found in version 24.3.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Damien Cassou <damien.cassou <at> gmail.com>
Cc: 16874 <at> debbugs.gnu.org
Subject: bug#16874: 24.3.50; Regression in active window detection
Date: Wed, 26 Feb 2014 11:16:39 +0100
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




This bug report was last modified 11 years and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.