From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <ghe@sdf.org>
Cc: monnier@iro.umontreal.ca, 43519@debbugs.gnu.org
Subject: bug#43519: 28.0.50; Overlay at end of minibuf hides minibuf's real content
Date: Mon, 21 Sep 2020 17:45:08 +0300 [thread overview]
Message-ID: <83pn6fxk7f.fsf@gnu.org> (raw)
In-Reply-To: <alpine.NEB.2.22.394.2009211603470453.9454@sdf.lonestar.org> (message from Gregory Heytings on Mon, 21 Sep 2020 14:18:07 +0000)
> Date: Mon, 21 Sep 2020 14:18:07 +0000
> From: Gregory Heytings <ghe@sdf.org>
> cc: monnier@iro.umontreal.ca, 43519@debbugs.gnu.org
>
> > I believe using window-text-pixel-size (which I already mentioned
> > several times) will avoid any such difficulties, since that function
> > takes all of those complications into account. Therefore, I still don't
> > understand why this approach is not being explored more actively.
>
> This I don't know or understand either. My guess is that creating a
> candidate list by adding one candidate at a time and checking with
> window-text-pixel-size if the result is too large would be inefficient.
Even if the implementation indeed passes candidates through
window-text-pixel-size one by one, it is not clear to me that the
result will be slow enough to annoy. We are talking about user
interaction, where speed is not that important.
In any case, I'd want to see numbers before deciding that this is
unacceptable.
> >> it is true that in all of these situations starting the mini-window
> >> display at BOB would do the right thing.
> >
> > Are you sure? What if the prompt is longer than a screen line (i.e.,
> > the prompt itself is continued on the 2nd and subsequent screen lines)?
> > If the prompt is long, but the list of candidates is short, starting the
> > mini-window display at BOB might fail to show some or all of the
> > candidates, because the long prompt uses up most or all of the
> > mini-window screen estate.
>
> Yes I'm sure. In the case you mention indeed some candidates will not be
> displayed, but that's not a problem because most of the time all
> candidates are not displayed anyway.
But with long enough prompt, you can have _none_ of the candidates
displayed.
> Of course there is the case when the prompt is, say, two characters
> less than the mini-window width, in which case no candidates will be
> displayed (if the user has (setq max-mini-window-width 1)), but this
> is unlikely to happen
"Unlikely to happen" is not a good guideline for making changes in the
display code, IME. Guess what? most of the things I considered
"unlikely" did happen eventually.
So I prefer a more generally correct solution, especially when it's
not hard to implement.
> > Showing the last part is in general a better strategy in the use cases
> > relevant to the mini-window, which are about user interaction.
>
> In general yes, but not when displaying completion candidates with an
> overlay at EOB, with the point before the overlay text.
I'm not sure the use case with overlays is indeed the indicator that a
different strategy is needed. but even if it is, the changes you
proposed don't test for the existence of such an overlay, they test
something else, and thus can affect unrelated use cases.
> In that case you start with a blinking cursor at the top left of the
> minibuffer, without any indication of what you are doing or should
> do.
Are you talking about what we see today? I'm not arguing to leave it
unchanged, I'm talking about what would be the better solution, and
starting always at BOB sounds sub-optimal to me.
> > I believe you assume that starting at BOB still shows enough of the text
> > to allow the user to interact intelligently, but those are not the only
> > cases we should keep in mind, since the prompt doesn't have to be short
> > enough for that assumption to be true.
>
> I tested this, and it works, even with overlong prompts. In that case
> (for example with (setq max-mini-window-width 1) and a prompt wider than
> the mini-window width) the prompt disappears, but this is expected, and
> it's a corner case that almost never happens.
The solution I proposed in my other message (assuming that it is
accepted) is more general, I think. It also covers "corner cases"
which you are willing to disregard.
next prev parent reply other threads:[~2020-09-21 14:45 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 17:54 bug#43519: 28.0.50; Overlay at end of minibuf hides minibuf's real content Stefan Monnier
2020-09-19 18:52 ` Eli Zaretskii
2020-09-19 19:42 ` Stefan Monnier
2020-09-19 20:10 ` Eli Zaretskii
2020-09-19 22:06 ` Stefan Monnier
2020-09-20 8:52 ` Eli Zaretskii
2020-09-20 21:04 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 21:31 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 6:50 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 14:17 ` Eli Zaretskii
2020-09-21 15:02 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 15:33 ` Eli Zaretskii
2020-09-21 15:44 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 16:10 ` Eli Zaretskii
2020-09-21 16:27 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 17:30 ` Eli Zaretskii
2020-09-21 18:42 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 19:37 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 19:37 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 6:57 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 6:57 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 14:11 ` Eli Zaretskii
2020-09-22 15:52 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 16:10 ` Eli Zaretskii
2020-09-22 21:01 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 17:28 ` Stefan Monnier
2020-09-21 17:47 ` Eli Zaretskii
2020-09-21 18:45 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 19:37 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 6:58 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 14:14 ` Eli Zaretskii
2020-09-21 14:04 ` Eli Zaretskii
2020-09-21 14:31 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 14:47 ` Eli Zaretskii
2020-09-21 14:02 ` Eli Zaretskii
2020-09-21 14:18 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 14:45 ` Eli Zaretskii [this message]
2020-09-21 15:26 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 15:39 ` Eli Zaretskii
2020-09-21 16:00 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 22:40 ` Stefan Monnier
2020-09-21 7:04 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 14:05 ` Eli Zaretskii
2020-09-21 17:25 ` Stefan Monnier
2020-09-21 17:45 ` Eli Zaretskii
2020-09-21 19:17 ` Stefan Monnier
2020-09-21 19:47 ` Eli Zaretskii
2020-09-22 5:26 ` Eli Zaretskii
2020-09-22 14:00 ` Stefan Monnier
2020-09-22 14:02 ` Eli Zaretskii
2020-09-22 15:51 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 16:06 ` Eli Zaretskii
2020-09-22 16:17 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 16:47 ` Eli Zaretskii
2020-09-22 16:49 ` Eli Zaretskii
2020-09-22 20:06 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-23 2:40 ` Eli Zaretskii
2020-09-23 7:15 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-23 14:34 ` Eli Zaretskii
2020-09-21 20:05 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 20:49 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-23 18:35 ` Stefan Monnier
2020-09-22 6:58 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-22 6:58 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 1:00 ` bug#43519: (no subject) Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 6:08 ` Eli Zaretskii
2020-09-20 8:27 ` bug#43519: 28.0.50; Overlay at end of minibuf hides minibuf's real content Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 9:03 ` Eli Zaretskii
2020-09-20 10:12 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-20 10:52 ` Eli Zaretskii
2020-09-20 19:50 ` Gregory Heytings via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] <<jwvft7dveii.fsf@iro.umontreal.ca>
[not found] ` <<83wo0p1twr.fsf@gnu.org>
[not found] ` <<jwvh7rta7et.fsf-monnier+emacs@gnu.org>
[not found] ` <<83r1qx1q9v.fsf@gnu.org>
[not found] ` <<jwvzh5l8med.fsf-monnier+emacs@gnu.org>
[not found] ` <<838sd425l2.fsf@gnu.org>
[not found] ` <<jwvd02g5bnp.fsf-monnier+emacs@gnu.org>
[not found] ` <<83y2l3xm15.fsf@gnu.org>
[not found] ` <<jwvwo0n2hgh.fsf-monnier+emacs@gnu.org>
[not found] ` <<83eemvxbvg.fsf@gnu.org>
[not found] ` <<jwv363b2b48.fsf@iro.umontreal.ca>
[not found] ` <<837dsmykrn.fsf@gnu.org>
[not found] ` <<E1kKapF-0007yc-Mb@fencepost.gnu.org>
[not found] ` <<831ritykni.fsf@gnu.org>
[not found] ` <<alpine.NEB.2.22.394.2009221712130453.10035@sdf.lonestar.org>
[not found] ` <<83k0wlx0cz.fsf@gnu.org>
[not found] ` <<alpine.NEB.2.22.394.2009221808130453.16638@sdf.lonestar.org>
[not found] ` <<83d02dwyfa.fsf@gnu.org>
2020-09-22 20:03 ` Drew Adams
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=83pn6fxk7f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=43519@debbugs.gnu.org \
--cc=ghe@sdf.org \
--cc=monnier@iro.umontreal.ca \
/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).