unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: marmot-te <marmot-te@riseup.net>
Cc: 47781@debbugs.gnu.org, Gregory Heytings <gregory@heytings.org>,
	acm@muc.de
Subject: 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	[thread overview]
Message-ID: <YHnOCG9r7eGDn9BG@ACM> (raw)
In-Reply-To: <87czuw9zk9.fsf@host.localdomain>

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).





  parent reply	other threads:[~2021-04-16 17:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  0:11 bug#47781: 28.0.50; (window-list-1 nil t) returns nil when minibuffer is inactive marmot-te
2021-04-15  8:10 ` martin rudalics
2021-04-15  8:38   ` Gregory Heytings
2021-04-16 17:48 ` Alan Mackenzie [this message]
2021-04-19 21:28   ` marmot-te
2021-04-20 10:58     ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YHnOCG9r7eGDn9BG@ACM \
    --to=acm@muc.de \
    --cc=47781@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    --cc=marmot-te@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).