GNU bug report logs - #47781
28.0.50; (window-list-1 nil t) returns nil when minibuffer is inactive

Previous Next

Package: emacs;

Reported by: marmot-te <marmot-te <at> riseup.net>

Date: Thu, 15 Apr 2021 00:13:02 UTC

Severity: normal

Found in version 28.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47781 in the body.
You can then email your comments to 47781 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47781; Package emacs. (Thu, 15 Apr 2021 00:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to marmot-te <marmot-te <at> riseup.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 15 Apr 2021 00:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: marmot-te <marmot-te <at> riseup.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; (window-list-1 nil t) returns nil when minibuffer is inactive
Date: Thu, 15 Apr 2021 00:11:34 +0000
Hi,

I read from the docstring of the function
> MINIBUF t means consider the minibuffer window even if the 
> minibuffer is not active

However, 
with emacs -Q
and the minibuffer inactive

(window-list-1 nil t)
;; => nil

I think this is related to this build since I cannot reproduce 
with emacs 26.1 (in this case it returns the list of windows, 
minibuffer included, as expected).


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.5, cairo version 1.16.0)
of 2021-02-09 built on debian-10-gccemacs
Repository revision: 1f626e9662d8120acd5a937f847123cc2b8c6e31
Repository branch: native-comp
Windowing system distributor 'The X.Org Foundation', version 
11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Configured using:
'configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man
--enable-locallisppath=/etc/emacs:/usr/local/share/emacs/native_comp/28.0.5:/usr/local/share/emacs/site-lisp
--with-mailutils --with-sound=yes --without-gconf 
--without-gsettings
--with-x=yes --without-toolkit-scroll-bars --with-x-toolkit=gtk3
--with-xwidgets --with-json --with-nativecomp 'CFLAGS=-O2 -Wall 
''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON 
LCMS2
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP 
NOTIFY
INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF X11 XDBE XIM XPM 
XWIDGETS
GTK3 ZLIB

Important settings:
 value of $LANG: en_US
 locale-coding-system: utf-8

Major mode: Org

Minor modes in effect:
 flyspell-mode: t
 shell-dirtrack-mode: t
 electric-pair-mode: t
 eros-mode: t
 gcmh-mode: t
 recentf-mode: t
 global-flycheck-mode: t
 flycheck-mode: t
 engine-mode: t
 dired-async-mode: t
 ws-butler-global-mode: t
 ws-butler-mode: t
 global-so-long-mode: t
 global-undo-tree-mode: t
 undo-tree-mode: t
 counsel-mode: t
 ivy-rich-mode: t
 ivy-mode: t
 winner-mode: t
 show-paren-mode: t
 which-key-mode: t
 global-subword-mode: t
 subword-mode: t
 global-auto-revert-mode: t
 save-place-mode: t
 delete-selection-mode: t
 savehist-mode: t
 override-global-mode: t
 global-eldoc-mode: t
 mouse-wheel-mode: t
 file-name-shadow-mode: t
 global-font-lock-mode: t
 font-lock-mode: t
 window-divider-mode: t
 auto-composition-mode: t
 auto-encryption-mode: t
 auto-compression-mode: t
 line-number-mode: t
 visual-line-mode: t
 transient-mark-mode: t

Load-path shadows:
/home/user/.emacs.d/elpa/lispy-20210121.926/elpa hides 
/home/user/.emacs.d/elpa/ivy-20210311.1638/elpa

Features:
(shadow sort mail-extr emacsbug sendmail two-column sh-script smie
executable flyspell ispell org-element avl-tree ol-eww ol-rmail 
ol-mhe
ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar 
ezimage
dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum
gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap 
nnmail
mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message 
rfc822
mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader ol-docview doc-view image-mode exif ol-bibtex bibtex 
ol-bbdb
ol-w3m ob-lisp ob-shell org ob ob-tangle ob-ref ob-lob ob-table 
ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval
org-table ol org-keys org-compat org-macs org-loaddefs cal-menu 
calendar
cal-loaddefs olivetti gnutls network-stream url-http mail-parse 
rfc2231
url-gw nsm rmc url-cache url-auth cl-print debug crux tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat 
shell
pcomplete parse-time iso8601 ls-lisp elisp-demos mule-util 
jka-compr
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align 
cc-engine
cc-vars cc-defs helpful imenu trace info-look elisp-refs windmove
elec-pair cursor-sensor form-feed eros gcmh recentf tree-widget 
flycheck
f dash s 18_pdf 17_mail gnus-win 16_elfeed 15_www eww url-queue 
shr
kinsoku svg xml dom puny mm-url gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date mail-utils 
mm-util
mail-prsvr engine-mode format-spec 14_qubes epa-file epa derived 
epg
epg-config 13_checkers 12_dired dired-async async dired-aux 
11_shells
10_registers-and-bookmarks 09_languages cl-indent 08_editor 
ws-butler
so-long undo-tree diff lispy ivy-avy counsel xdg dired 
dired-loaddefs
compile text-property-search comint ansi-color swiper ivy-rich ivy
ivy-faces ivy-overlay colir color lispy-inline thingatpt avy 
noutline
outline etags fileloop generator xref project edebug backtrace 
help-fns
radix-tree lispy-tags mode-local find-func 07_buffers-and-windows 
pcase
winner ibuf-macs 06_completion 05_theme-customizations 
tao-yin-theme
tao-theme paren 04_helpers hydra ring lv which-key advice 
03_bindings
edmacro kmacro 02_defaults comp comp-cstr warnings rx cap-words
superword subword autorevert filenotify saveplace delsel savehist
no-littering cl-extra help-mode cus-edit pp cus-start cus-load 
wid-edit
use-package use-package-ensure use-package-delight 
use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core 
finder-inf
info package easymenu browse-url url url-proxy url-privacy 
url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq 
byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib chemacs iso-transl
tooltip eldoc electric uniquify ediff-hook vc-hooks 
lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset 
image
regexp-opt fringe tabulated-list replace newcomment text-mode 
elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow 
isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham 
georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech 
european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env 
code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty
make-network-process nativecomp emacs)

Memory information:
((conses 16 719060 139046)
(symbols 48 44214 40)
(strings 32 196396 14373)
(string-bytes 1 7066646)
(vectors 16 69368)
(vector-slots 8 1910643 69822)
(floats 8 502 513)
(intervals 56 3871 4659)
(buffers 984 25))

-- 
<:3nn~~
  <:3nn~~
     <:3nn~~




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47781; Package emacs. (Thu, 15 Apr 2021 08:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 47781 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: marmot-te <marmot-te <at> riseup.net>, 47781 <at> debbugs.gnu.org
Subject: Re: bug#47781: 28.0.50; (window-list-1 nil t) returns nil when
 minibuffer is inactive
Date: Thu, 15 Apr 2021 10:10:17 +0200
> I read from the docstring of the function
>> MINIBUF t means consider the minibuffer window even if the minibuffer is not active
>
> However, with emacs -Q
> and the minibuffer inactive
>
> (window-list-1 nil t)
> ;; => nil
>
> I think this is related to this build since I cannot reproduce with emacs 26.1 (in this case it returns the list of windows, minibuffer included, as expected).
>
>
> In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
> of 2021-02-09 built on debian-10-gccemacs

This is likely broken since a change in candidate_window_p from last
year, see commit 2ecbf4cfae7bd504fbdca28e1e51ee2574fe5d12 (waiting for
Gregory's confirmation).  Since `window_list_1' is consulted in quite a
number of places, the behavior of Emacs might be slightly unpredictable
in this area.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47781; Package emacs. (Thu, 15 Apr 2021 08:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 47781 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 47781 <at> debbugs.gnu.org, marmot-te <marmot-te <at> riseup.net>
Subject: Re: bug#47781: 28.0.50; (window-list-1 nil t) returns nil when
 minibuffer is inactive
Date: Thu, 15 Apr 2021 08:38:48 +0000
>
> This is likely broken since a change in candidate_window_p from last 
> year, see commit 2ecbf4cfae7bd504fbdca28e1e51ee2574fe5d12 (waiting for 
> Gregory's confirmation).
>

I confirm.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47781; Package emacs. (Fri, 16 Apr 2021 17:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 47781 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: marmot-te <marmot-te <at> riseup.net>
Cc: 47781 <at> debbugs.gnu.org, martin rudalics <rudalics <at> gmx.at>,
 Gregory Heytings <gregory <at> heytings.org>, acm <at> muc.de
Subject: Re: bug#47781: 28.0.50; (window-list-1 nil t) returns nil when
 minibuffer is inactive
Date: Fri, 16 Apr 2021 17:48:56 +0000
Hello, Marmot-Te.

On Thu, Apr 15, 2021 at 00:11:34 +0000, marmot-te wrote:

> Hi,

> I read from the docstring of the function
> > MINIBUF t means consider the minibuffer window even if the 
> > minibuffer is not active

> However, 
> with emacs -Q
> and the minibuffer inactive

> (window-list-1 nil t)
> ;; => nil

> I think this is related to this build since I cannot reproduce 
> with emacs 26.1 (in this case it returns the list of windows, 
> minibuffer included, as expected).


> In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
> 3.24.5, cairo version 1.16.0)
>  of 2021-02-09 built on debian-10-gccemacs
> Repository revision: 1f626e9662d8120acd5a937f847123cc2b8c6e31
> Repository branch: native-comp
> Windowing system distributor 'The X.Org Foundation', version 
> 11.0.12004000
> System Description: Debian GNU/Linux 10 (buster)

[ .... ]

I think the following patch, to .../src/window.c, fixes it:



diff --git a/src/window.c b/src/window.c
index caf9df6c13..23eb802950 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2633,7 +2633,8 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow,
     candidate_p = ((EQ (XWINDOW (all_frames)->frame, w->frame)
                     || (EQ (f->minibuffer_window, all_frames)
                         && EQ (XWINDOW (all_frames)->frame, FRAME_FOCUS_FRAME (f))))
-                   && !is_minibuffer (0, XWINDOW (all_frames)->contents));
+                   && (EQ (minibuf, Qt)
+		       || !is_minibuffer (0, XWINDOW (all_frames)->contents)));
   else if (FRAMEP (all_frames))
     candidate_p = EQ (all_frames, w->frame);
 
..  Please feel free to try it out, and let us know how well it works.
Thanks!


> -- 
> <:3nn~~
>    <:3nn~~
>       <:3nn~~

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47781; Package emacs. (Mon, 19 Apr 2021 21:30:01 GMT) Full text and rfc822 format available.

Message #17 received at 47781 <at> debbugs.gnu.org (full text, mbox):

From: marmot-te <marmot-te <at> riseup.net>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 47781 <at> debbugs.gnu.org, martin rudalics <rudalics <at> gmx.at>,
 Gregory Heytings <gregory <at> heytings.org>, marmot-te <marmot-te <at> riseup.net>
Subject: Re: bug#47781: 28.0.50;
 (window-list-1 nil t) returns nil when minibuffer is inactive
Date: Mon, 19 Apr 2021 21:28:10 +0000
Alan Mackenzie <acm <at> muc.de> writes:

> Hello, Marmot-Te.
>
> On Thu, Apr 15, 2021 at 00:11:34 +0000, marmot-te wrote:
>
>> Hi,
>
>> I read from the docstring of the function
>> > MINIBUF t means consider the minibuffer window even if the 
>> > minibuffer is not active
>
>> However, 
>> with emacs -Q
>> and the minibuffer inactive
>
>> (window-list-1 nil t)
>> ;; => nil
>
> [ .... ]
>
> I think the following patch, to .../src/window.c, fixes it:
>
> [ ... ]
>
> ..  Please feel free to try it out, and let us know how well it 
> works.
> Thanks!

Hi again,

I just compiled the latest native-branch with your patch and can 
confirm that after testing the different clauses of MINIBUF, all 
works as expected.

Thanks !

-- 
<:3nn~~
  <:3nn~~
     <:3nn~~




Reply sent to Alan Mackenzie <acm <at> muc.de>:
You have taken responsibility. (Tue, 20 Apr 2021 11:00:02 GMT) Full text and rfc822 format available.

Notification sent to marmot-te <marmot-te <at> riseup.net>:
bug acknowledged by developer. (Tue, 20 Apr 2021 11:00:02 GMT) Full text and rfc822 format available.

Message #22 received at 47781-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: marmot-te <marmot-te <at> riseup.net>
Cc: 47781-done <at> debbugs.gnu.org, martin rudalics <rudalics <at> gmx.at>,
 Gregory Heytings <gregory <at> heytings.org>
Subject: Re: bug#47781: 28.0.50; (window-list-1 nil t) returns nil when
 minibuffer is inactive
Date: Tue, 20 Apr 2021 10:58:52 +0000
Hello, Marmot-Te.

On Mon, Apr 19, 2021 at 21:28:10 +0000, marmot-te wrote:

[ .... ]

> Hi again,

> I just compiled the latest native-branch with your patch and can 
> confirm that after testing the different clauses of MINIBUF, all 
> works as expected.

> Thanks !

Thank you for the testing!

I have now committed the patch to the Emacs master branch, and I'm
closing the bug with this post.

> -- 
> <:3nn~~
>    <:3nn~~
>       <:3nn~~

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 May 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 337 days ago.

Previous Next


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