emacs-devel
[Top][All Lists]
Advanced

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

Re: kill-ring visualization


From: Stefan Monnier
Subject: Re: kill-ring visualization
Date: Tue, 30 Mar 2010 16:35:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>>>> +      ((eq completions-format 'line)
>>>>> +       ;; One-line format
>>>>> +       (setq str (query-replace-descr str)))
>>>> But this will not just change the string displayed, but also the string
>>>> inserted by the yank.  We need to distinguish the two.
>>> Maybe to put the `display' property with the value "^J" on newlines?
>> That would only work if this property is removed when the string in
>> subsequently inserted.
> In the patch I sent earlier, yank-pop doesn't insert the string selected
> from the *Completions* buffer.  It searches for selected completion string
> in the kill-ring (using `member' that ignores the `display' property),
> gets its position in the kill-ring, and calls `yank' with this position
> as a numeric index.

Yes, I noticed it, and the problem is that my yank happens to be advised
and that breaks it (because the advice occasionally adds elements to
the kill-ring).

So, while I also started with such an approach, I ended up going the
more straightforward route of inserting the actual selected text, since
it's more reliable.


        Stefan




reply via email to

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