GNU bug report logs - #36859
Customizable fit-window-to-buffer

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 30 Jul 2019 20:40:02 UTC

Severity: wishlist

Tags: patch

Merged with 51062, 52855

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 36859 <at> debbugs.gnu.org
Subject: Re: bug#36859: Customizable fit-window-to-buffer
Date: Sun, 04 Aug 2019 00:16:45 +0300
>> I hope it would be possible to specify a special action alist entry
>> in 'display-buffer-alist' , e.g.
>>
>>    (window-height . no-fit-window)
>
> Wouldn't just (window-height) suffice?

Maybe, I'm not sure if the case when window-height is missing in alist
can be distinguished from the case when window-height is nil.

>> Do you think this is feasible?  If not, then maybe these commands
>> should provide post-display hooks such as e.g. 'proced-post-display-hook'
>> where 'fit-window-to-buffer' is added by default, but can be removed
>> by customization.
>
> We could introduce a new ALIST argument, say 'pre-display-function'.
> The function specified there would be called before running the body
> of 'window--display-buffer'.  In the case at hand, that function would
> fill the buffer so OT1H 'shrink-window-if-larger-than-buffer' would
> know the real buffer size and OTOH a 'window-height' entry would allow
> to override that.  I wouldn't know whether and how to suitably pass
> any arguments to such a function, though.

Or maybe 'shrink-window-if-larger-than-buffer' could be added in the body
of another new ALIST argument 'post-display-function'.




This bug report was last modified 3 years and 131 days ago.

Previous Next


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