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: Gregory Heytings
Subject: Re: New multi-command facility displays in the wrong echo area.
Date: Mon, 12 Oct 2020 16:31:27 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)


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.


Indeed, this would also work:

(< (mod (car (window-text-pixel-size (active-minibuffer-window))) 
(window-text-width (active-minibuffer-window) t))
   (/ (car (window-text-pixel-size (active-minibuffer-window))) 2))

But going in that direction means that one should also take the current window height into account: if the miniwindow is tall enough, the above condition could be nil even though there would be enough room to display the message.

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.


Ouch.  So this last-minute change will last for several years?

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.


I do not suggest anything like that. But I'm a doubting Thomas, and I can't give you this credit until I see a recipe that would convincingly demonstrate a potential problem that my proposed solution would create. Especially given I explained that this solution is only _at the moment_ the best solution, for earlier versions and the current version of Emacs, until a better solution is implemented.



reply via email to

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