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 #38 received at 17809 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> jurta.org>
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 10:18:02 +0200
> 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)

`display-buffer' has no body and hardly ever will get one.

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

Then don't do that.  If you want to do both - formatting and fitting -
have QUIT-FUNCTION do that.  So in BODY put the text into the buffer and
in QUIT-FUNCTION first format the text according to what the window size
gives and then try to fit the window to the formatted text.

martin




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

Previous Next


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