emacs-devel
[Top][All Lists]
Advanced

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

Re: select yank via completion


From: Juri Linkov
Subject: Re: select yank via completion
Date: Wed, 25 Nov 2020 09:36:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> +                             (when (> (length s) (- 40 b))
>> +                               (add-text-properties
>> +                                (min (+ b 40) (length s)) (length s)
>> +                                `(display ,ellipsis) s))
>
> Any chance this threshold can be configurable?  I don't mind completions
> as wide as or wider than the frame in Ivy's minibuffer.

The default value 40 was intended to be able to accommodate two columns of
completions in the *Completions* buffer in the default 80-column wide frame,
but indeed a hard-coded constant should be avoided.

Instead of adding a specific defcustom for kill-ring completions,
maybe some more general option is possible in minibuffer.el?
Something like how many columns the user expects for completions.

If a package like ivy is not column-oriented as the *Completions* buffer,
then ivy could set such an option to 1.  Then yank-pop could truncate
completions to the frame width.  Or such truncation should be moved
to minibuffer.el and extended with other features from its TODO item:

;;   - indicate how to display the completions in *Completions* (turn
;;     \n into something else, add special boundaries between
;;     completions).  E.g. when completing from the kill-ring.



reply via email to

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