help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set max size for *Completions*


From: Philip Kaludercic
Subject: Re: Set max size for *Completions*
Date: Mon, 07 Mar 2022 15:17:45 +0000

Ergus <spacibba@aol.com> writes:

> Hi:
>
> Do we have any way to specify a max size/height for the *Completions*
> window??

One way it to enable temp-buffer-resize-mode and then set
temp-buffer-max-height to whatever size you want.  This might have the
unintended side effect that other windows are also affected.  I manged
to solve this by setting temp-buffer-max-height to a function:

      (lambda (buf)
        (if (string-match-p
             (rx bos (or "*Completions*") eos)
             (buffer-name buf))
            10 (window-height)))

-- 
        Philip Kaludercic



reply via email to

[Prev in Thread] Current Thread [Next in Thread]