all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ergus <spacibba@aol.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: resize_mini_window question
Date: Fri, 18 Sep 2020 11:30:58 -0400	[thread overview]
Message-ID: <jwvh7rvhzwb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200918150113.4vz5vq3krfslrwdz@Ergus> (Ergus's message of "Fri,  18 Sep 2020 17:01:13 +0200")

> 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)

I don't think this will work reliably, e.g. even if your minibuffer only
has N lines of text, line wrapping different fonts used for different
scripts, plus overlays and text-properties applied to specific parts of
the minibuffer's content will make that computation fail to give the
desired result.

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

It might not even be possible anyway if the minibuffer's content uses up
more space than available in the frame.

> (This will be seen as ignoring the max-mini-window-height)

Indeed, which is another problem with this option.

> 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.

That sounds good.  It's not sufficient to fix the problem in
`icomplete-vertical` obviously, so `icomplete-vertical` would need to
be changed.  Maybe it could check the `window-end` to detect when the
minibuffer's content is larger than what fits and shorten
it accordingly?


        Stefan




  reply	other threads:[~2020-09-18 15:30 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 ` resize_mini_window question Ergus
2020-09-18 15:30   ` Stefan Monnier [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvh7rvhzwb.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.