GNU bug report logs - #19355
25.0.50; limit the popup window height

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Fri, 12 Dec 2014 01:51:01 UTC

Severity: minor

Found in version 25.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 19355 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#19355: 25.0.50; limit the popup window height
Date: Sat, 13 Dec 2014 11:21:24 +0100
> Thanks for the clarification. We are on the same page. I don't have
> anything specific to add. Just want to point out that
> fit-window-to-buffer is probably not the cause for this specific bug.
> The contents of the elisp buffer can be a few windowful and I am still
> seeing it being squeezed to 4 lines.

There's no specific bug here.  What you report can be easily considered
a user error like choosing a too broad base for completions or failing
to appropriately customize the option `window-min-height'.

But even if we decide that Emacs made a bad choice when making the
*Completions* that large we'd have to decide which heuristics we want to
apply instead, like

- use `shrink-window-if-larger-than-buffer' instead of
  `fit-window-to-buffer',

- explicitly pass a hardocded maximum height/width argument to
  `fit-window-to-buffer' (requires some minor changes to
  `with-displayed-buffer-window')

- add some options that allow users to specify the minimum and maximum
  sizes of _any_ window resized by `fit-window-to-buffer',

- tell users that they should customize `display-buffer' appropriately
  (in this case `with-displayed-buffer-window' would have to do much
  more work than it does now).

In any case, if you want the present behavior to change, you have to
express what you want Emacs to do instead ;-)

As an aside, I observe that displaying the *Completions* window
currently induces three calls to `fit-window-to-buffer' which aren't
that cheap, especially when the buffer is large.

martin




This bug report was last modified 10 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.