GNU bug report logs - #17809
24.4.50; Completions display

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Thu, 19 Jun 2014 07:12:03 UTC

Severity: wishlist

Tags: patch

Merged with 12618

Found in version 24.2.50

Fixed in version 24.4.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 17809 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 17809 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#17809: 24.4.50; Completions display
Date: Sat, 28 Jun 2014 02:54:10 +0300
[Message part 1 (text/plain, inline)]
>>> explicitly instead of using an action alist `(window-height
>>> . fit-window-to-buffer)'?
>>
>> IIUC that would mean that it couldn't be configured via
>> display-buffer-alist, right?
>
> Obviously.  Do we want to control filling via `display-buffer'?

Maybe it would be a good thing to add a new action parameter to
`display-buffer' that would be like the existing `quit-function'
in `with-current-buffer-window', and will call its body between
displaying the buffer and applying final actions alists like
(window-height . fit-window-to-buffer)

> Anyway, the output happens via `with-output-to-temp-buffer' which has no
> direct means to pass an appropriate action to `display-buffer'.  If we
> used `with-temp-buffer-window' instead, we could pass an ACTION argument
> to fill the buffer according to the size of the window used instead of
> adjusting the window to the buffer size.  In that case the configuration
> could be controlled via `display-buffer-alist'.

`dired-mark-pop-up' already uses `with-current-buffer-window' that is
like `with-temp-buffer-window', but still has the same problem
as the screenshot below demonstrates: it inserts the contents
to the buffer before displaying it, so it has no way to get the
final window dimensions while inserting the contents, and leaves
empty columns.

It's possible in `dired-mark-pop-up' to move formatting
(i.e. the call to `dired-format-columns-of-files')
from the BODY arg of `with-current-buffer-window'
to its QUIT-FUNCTION arg, and it will fill the empty columns,
because the formatting will happen after displaying the buffer.

But then (window-height . fit-window-to-buffer) will be called
on the empty buffer, that will always produce a small window
with 3-lines height.

[completions.png (image/png, inline)]

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

Previous Next


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