From: Ergus <spacibba@aol.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Protesilaos Stavrou <info@protesilaos.com>, emacs-devel@gnu.org
Subject: Re: [PATCH] completions-max-height
Date: Wed, 9 Mar 2022 12:34:16 +0100 [thread overview]
Message-ID: <20220309113416.nwqpfhbdvzmxho6h@Ergus> (raw)
In-Reply-To: <20220308132910.iatgy7fzqkbgw4df@Ergus>
On Tue, Mar 08, 2022 at 02:29:10PM +0100, Ergus wrote:
>On Tue, Mar 08, 2022 at 08:47:13AM +0000, Philip Kaludercic wrote:
>>Ergus <spacibba@aol.com> writes:
>>
>>>I understand your intention, but in practice making this more complex
>>>is useless. The mini buffer is always down and making the completions
>>>to move somewhere else is uncomfortable and may require more
>>>lisp/emacs knowledge to change the default behavior from the
>>>user. Which is completely the opposite to my intention. Actually this
>>>same result may be reached with an advise as I discussed on yesterday
>>>on emacs help. But a simple custom is better.
>>>
>>>I am totally fine if you propose something else more general if that don't forces the user to write a function to change a simple height.
>>
>>What I proposed would just require something like
>>
>> (setq completion-display-buffer-option '(display-buffer-at-bottom (window-height . 10)))
>>
>
>This just works:
>
>(setq display-buffer-alist '(("^\\*Completions\\*$" .
> (display-buffer-at-bottom
> (window-height . 10)))))
>
>For the simplest case this works... But there is not a way to handle the
>conditionals without affecting some users. For example when using inline
>completion or the ones using resize-temp-buffer-window
>
>We can use a function instead, but in that case the user customization
>may need a more complex approach instead of just a setq.
>
>Maybe a better lisper could propose something better that allows to set
>this without a defun, an advise or defining a tricky alist that may
>conflict with something else?
>
>
After a day with this config I found several issues.
At the end it required to do:
(add-to-list 'display-buffer-alist
'("^\\*Completions\\*$" .
((display-buffer--maybe-same-window
display-buffer-reuse-window
display-buffer--maybe-pop-up-frame)
(window-height . 10))))
Otherwise many things happen (completions buffer replication for not
reusing window, not popup frames and so on.)
So at the end I think that the initial patch is the best simpler
approach (the code could be simplified even more by a better lisper
probably) because otherwise the user may need do a complex config for a
most simple need, creating conflicts and changing some of the default
behaviors...
Simple is better than complex.
Complex is better than complicated.
Best,
Ergus
prev parent reply other threads:[~2022-03-09 11:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220307210740.veiocemir46mmerk.ref@Ergus>
2022-03-07 21:07 ` [PATCH] completions-max-height Ergus
2022-03-07 22:10 ` Philip Kaludercic
2022-03-08 5:13 ` Protesilaos Stavrou
2022-03-08 8:05 ` Ergus
2022-03-08 8:47 ` Philip Kaludercic
2022-03-08 10:32 ` Ergus
2022-03-08 13:29 ` Ergus
2022-03-09 11:34 ` Ergus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220309113416.nwqpfhbdvzmxho6h@Ergus \
--to=spacibba@aol.com \
--cc=emacs-devel@gnu.org \
--cc=info@protesilaos.com \
--cc=philipk@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.