[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Yanking wrong text
From: |
Juri Linkov |
Subject: |
Re: Yanking wrong text |
Date: |
Sat, 23 Jun 2007 23:04:11 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> IIUC the current code tries to handle the following situation:
> - select text "toto" with the mouse to "cut" or "copy" it.
> - select text "titi" with the mouse.
> - hit C-y to replace "titi" with "toto".
> What really happens instead is that "titi" gets replaced with "titi" because
> the selection of "titi" with the mouse did an implicit M-w.
>
> But in Juri's case he did not select with the mouse, so "titi" wasn't added
> to the kill-ring. Instead in his case "titi" and "toto" are actually the
> same string.
>
>> 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.
--
Juri Linkov
http://www.jurta.org/emacs/
- Yanking wrong text, Juri Linkov, 2007/06/22
- Re: Yanking wrong text, Stefan Monnier, 2007/06/23
- Re: Yanking wrong text, David Kastrup, 2007/06/23
- Re: Yanking wrong text, Juri Linkov, 2007/06/23
- Re: Yanking wrong text, Richard Stallman, 2007/06/23
- Re: Yanking wrong text, Stefan Monnier, 2007/06/23
- Re: Yanking wrong text,
Juri Linkov <=
- Re: Yanking wrong text, Richard Stallman, 2007/06/24
- Re: Yanking wrong text, Juri Linkov, 2007/06/29
- Re: Yanking wrong text, Richard Stallman, 2007/06/30