unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: resize_mini_window question
Date: Fri, 18 Sep 2020 17:01:13 +0200	[thread overview]
Message-ID: <20200918150113.4vz5vq3krfslrwdz@Ergus> (raw)
In-Reply-To: 20200918150113.4vz5vq3krfslrwdz.ref@Ergus


Hi Eli:

As you know I have been working in icomplete-vertical and I just
received an issue that has to do with resize_mini_window function more
than with icomplete.

They are related with this bugs:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24293
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39379

The problem to me seems that the function xdisp.c:resize_mini_window
uses FRAME_LINE_HEIGHT(f); to resize; but in the report the user sets a
different font for the minibuffer. So when it sets
Vmax_mini_window_height to an int

Vmax_mini_window_height * unit is a "wrong" value and the lines will not
fit.

I see 3 possible clean solutions:

1) Modify resize_mini_window to use the minibuffer's font size to
calculate the height when Vmax_mini_window_height is an int. (don't know
if it is possible to access the minibuffer font size from there or if
this could produce some undesired side effect)

2) Modify the documentation of max-mini-window-height to specify that if
an integer, it specifies a number of lines respecting to the frame's
default font, not the minibuffer's visible lines.

3) Just force the text to fit ignoring that the number of real visible
lines will be different than max-mini-window-height. (This will be seen
as ignoring the max-mini-window-height)

What do you think is better?
Best,
Ergus



       reply	other threads:[~2020-09-18 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200918150113.4vz5vq3krfslrwdz.ref@Ergus>
2020-09-18 15:01 ` Ergus [this message]
2020-09-18 15:30   ` resize_mini_window question Stefan Monnier
2020-09-18 15:56     ` Ergus
2020-09-18 16:02       ` Stefan Monnier
2020-09-18 16:50         ` Ergus
2020-09-18 19:49           ` Stefan Monnier
2020-09-18 19:39   ` Eli Zaretskii

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=20200918150113.4vz5vq3krfslrwdz@Ergus \
    --to=spacibba@aol.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).