emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New multi-command facility displays in the wrong echo area.


From: Eli Zaretskii
Subject: Re: New multi-command facility displays in the wrong echo area.
Date: Mon, 12 Oct 2020 19:01:23 +0300

> Date: Mon, 12 Oct 2020 15:41:35 +0000
> From: Gregory Heytings <ghe@sdf.org>
> cc: Juri Linkov <juri@linkov.net>, acm@muc.de, monnier@iro.umontreal.ca,
>         emacs-devel@gnu.org
> 
> > In any case, I think the condition could be relaxed: we only care about 
> > how much space is left from the minibuffer text's end till the end of 
> > the screen line, so "if minibuffer text size modulo window-width is less 
> > than something" would be better, I think.  E.g., if you use 70 instead 
> > of 67 in your recipe, the problem is mostly gone.
> 
> The condition could be refined indeed, but the modulo operation you 
> propose would not work with variable pitch faces.

It will, if the calculation is done in pixels.  The APIs you mentioned
can return pixels instead of columns, or there are alternatives which
do.

> I intentionally proposed something simple, which should work in
> (almost) all cases.  I'm an adept of the KISS principle.

Me too; "the solution should as simple as possible, but not simpler."

> > Also, it would be safer to use string-width instead of the number of 
> > characters, or even window-text-pixel-size: some people do customize the 
> > faces used in the minibuffer.
> 
> I won't comment on this.  As I already said elsewhere, it's IMO awful to 
> expect any code to do something like this.

That function was written because it's really needed and useful.  We
use it under the hood, and I see no reason not to use it in this case,
which is exactly one of the cases for which the function was
implemented.

> See above.  I've now read that bug thread, and I'm not at all convinced 
> that the chosen solution was TRT, quite the contrary.

We can discuss other solutions, of course.  However, significant
changes will have to wait for Emacs 28.

> It seems to me that being wiser would mean taking the time to evaluate a 
> proposed solution, instead of rejecting it outright based on a gut 
> feeling.

Please give me the credit of having done so.  I've given you no reason
to believe otherwise; disagreement doesn't imply incompetence or
sloppiness on my part.  It is simply unfair and even rude to suggest
that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]