emacs-devel
[Top][All Lists]
Advanced

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

Re: Yanking wrong text


From: Chris Moore
Subject: Re: Yanking wrong text
Date: Tue, 21 Aug 2007 03:26:41 +0200

On 6/23/07, Juri Linkov <address@hidden> wrote:
>> I wonder if we can tune it to detect that common case
>> while not triggering in your case.
>
> I think the key is to check not just whether the two strings are equal, but
> also whether the head of the kill-ring really comes from the currently
> active region.  E.g. check that last-command is one that uses
> copy-region-as-kill.

Should we care only for situation of selecting and yanking with the mouse?
In this case we could check last-command-event for mouse keys.

I don't think that's enough.  The selection may have been unchanged by the last command.

For example, with a single window in the frame, and using cua-selection-mode, select one word with the mouse, then select another word, then type "C-x o" (there's only one window, so this does nothing) then hit "C-y".  The selected word isn't edited.  Try the same but omit the "C-x o" step and the selected word is replaced by the previously selected word.

reply via email to

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