GNU bug report logs - #56305
29.0.50; 'yes-or-no-p' deselects minibuffer frame

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Wed, 29 Jun 2022 17:55:01 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Alan Mackenzie <acm <at> muc.de>, Eli Zaretskii <eliz <at> gnu.org>,
 56305 <at> debbugs.gnu.org
Subject: Re: bug#56305: 29.0.50; 'yes-or-no-p' deselects minibuffer frame
Date: Tue, 19 Jul 2022 10:09:59 +0200
>>> In case you intend to fix this apparent blunder of mine: the point of
>>> that commit was to set the selected window and frame so that ELisp code
>>> run from the `mode-line-format` would see meaningful and consistent
>>> values of selected-frame/window (and companions like the
>>> frame-selected-window of the selected-frame, ...).
>> How are display_mode_line or display_mode_lines affected by that commit?
>
> I'm sorry, I don't understand the question.

Above you said that "the point of that commit was to set the selected
window and frame so that ELisp code run from the `mode-line-format`
would see meaningful and consistent values ...".  The C functions that
evaluate 'mode-line-format' for redisplay are display_mode_lines and
display_mode_line and those functions did set the selected window and
frame before that commit and continued to do so after your commit in the
same way.  FWICS your commit changed the behavior of formatting frame
titles only.

>> Worse even: People who want to know, for example, whether the mode line
>> belongs to the selected window have to use 'old-selected-window' for
>> getting that.
>
> Not sure "worse" than what.

Worse than being "misleading".

> Clearly when computing the mode-line, there are 2 windows of interest:
> the one to which this mode-line belongs and the one that's currently
> considered (from the outside) as "the selected window".  Only one of the
> two can be "the selected window" while computing the mode-line, and in
> my experience most code wants/needs this to be the mode-line's window
> rather than "the one that's currently considered (from the outside) as
> the selected window".

"The selected window is the window in which the standard cursor for
selected windows appears."  I see no outside POV here.  And once more: I
don't ask to change this design but at least to tell users about it.

>> NORECORD is not about focus.
>
> Then we need something like it but to say "I just want to change
> selected-window temporarily, so don't mess with focus or any such thing".

Say to whom and where?

martin




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

Previous Next


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