Subject: bug#73667: 31.0.50; fido-vertical-mode and yank-pop do not work well together

From: João Távora <[email-masked]>
Date: Sun, 13 Oct 2024 10:08:46 +0100

On Sat, Oct 12, 2024 at 1:09 PM Eli Zaretskii <[email-masked]> wrote:
>
> > Date: Sun, 6 Oct 2024 20:33:38 +0200
> > From: parlando--- via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <[email-masked]>
> >
> > Hi,
> >
> > With fido-vertical-mode and if the kill-ring holds some larger text
> > blocks, then yank-pop (M-y) shows several blank lines between the
> > candidates in the minibuffer.
> >
> > The selection of a candidate becomes cumbersome too, which unfortunately
> > makes M-y quite unusable. This may generally apply to cases with long
> > completion entries.
> >
> > To reproduce:
> > emacs -Q; then eval:
> >
> > (fido-vertical-mode 1)
> > (kill-ring-save 1 1) ; somehow, this leaves the system clipboard out
> >
> > ;; set kill-ring to some short and one long entries
> > (setq kill-ring
> >        '(#("Short line 1")
> >       #("Short line 2")
> >       #("Short line 3")
> >       #("Short line 4")
> >       #("Large block
> > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
> > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> > veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
> > commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> > velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
> > occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> > mollit anim id est laborum.
> >
> > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
> > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> > veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
> > commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> > velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
> > occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> > mollit anim id est laborum.
> >
> > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
> > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> > veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
> > commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> > velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
> > occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> > mollit anim id est laborum.")
> >       #("Short line 5")
> >         ))
> >
> > (yank-pop)
>
> João, any comments?

fido-vertical-mode, by its nature, is for selecting single line strings.  As are
most other selection methods I think.  Maybe some display-time string
truncation could be done,  or maybe newlines could be represented
differently.

I don't maintain fido-vertical-mode anymore.

João