DarwinAwardWinner/ido-completing-read-plus

Long lines are truncated with '…' when using `yank-pop`

Closed this issue · 3 comments

Description

Say I yank this fairly long line with (ido-ubiquitous-mode 1):

<MDTO xmlns="https://www.nationaalarchief.nl/mdto" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.nationaalarchief.nl/mdto https://www.nationaalarchief.nl/mdto/MDTO-XML1.0.1.xsd">

Then, if pop that line using M-x yank-pop (M-y), said line will be truncated with an ellipsis character:

<MDTO xmlns="https://www.nationaalarchief.nl/mdto" xmlns:xsi…

The truncated content is still there — it's present in the file if I save and then cat it, and I can put my cursor on the invisible truncated content. In fact, the line in question behaves a lot like content that's hidden/folded through hs-toggle-hiding. However, calling any of the hs-* functions doesn't work, so, quite annoyingly, I know of no way to "unfold" it.

This issue is independent mode of major mode.

Issue

How do I disable this behavior? I tried disabling completing-read+ for yank-pop using "Ido Cr+ Disable List", but that still does not work. For the record, the issue only occurs with this package enabled (see minimal reproducer below).

Minimal reproducer

Make an init.el with these contents:

(ido-mode 1)
(ido-everywhere 1)

(require 'ido-completing-read+)
(ido-ubiquitous-mode 1)

Hmm, I see the same thing, and surprisingly commands like revert-buffer and normal-mode don't fix it either. It seems that read-from-kill-ring uses text properties to add the ellipses, and for some reason completing-read-default ends up removing this properties while ido doesn't. I'm testing a fix now.

I've pushed the fix to the main branch. Please test and let me know if it fixes your problem. If it does, I'll release a new version.

Please test and let me know if it fixes your problem. If it does, I'll release a new version.

I can confirm everything works fine now!

A thousand times thanks not only for fixing this, but especially for fixing this so quickly 😄

surprisingly commands like revert-buffer and normal-mode don't fix it either

Yeah, it was very difficult to get rid off!