bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7700: 24.0.50; C-y binding withing Isearch mode


From: Dani Moncayo
Subject: bug#7700: 24.0.50; C-y binding withing Isearch mode
Date: Fri, 24 Dec 2010 14:34:24 +0100

On Fri, Dec 24, 2010 at 13:13, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Fri, Dec 24, 2010 at 12:39 PM, Dani Moncayo <dmoncayo@gmail.com> wrote:
>> On Fri, Dec 24, 2010 at 04:25, Lennart Borgman
>> <lennart.borgman@gmail.com> wrote:
>>> On Fri, Dec 24, 2010 at 3:39 AM, Stefan Monnier
>>> <monnier@iro.umontreal.ca> wrote:
>>>>> I use C-y ("grab to next end of line") quite a bit.
>>>>
>>>> I'd much rather have a prefix key that lets me use any standard movement
>>>> to select the text to grab from the buffer (so "<prefix> C-e" would do
>>>> what C-y does and "<prefix> M-f" would do more or less what C-w does).
>>>
>>>
>>> I like the logic/mnemonic but wouldn't it would be cumbersome to use it?
>>>
>>
>> Not much, provided that the <prefix> key was required only one time. I
>> think would be good to have that key as a switch to turn "grabbing
>> mode" on/off.
>
> You have to do it every time you want to grab something more. A common
> situation is that you have moved from the last hit and then want to
> grab more.
>
Maybe there was a misunderstanding here: I didn't mean <prefix> to be
a prefix argument only for the following command. I meant it to be a
command to switch "grabbing" on/off (for the entire Isearch session).


>>> I suggest instead that any standard forward movement command while in
>>> isearch forward mode should select the text to grab WITHOUT any prefix
>>> key. For backward movement I suggest a similar logic.
>>>
>>
>> I prefer Stefan's proposal because with that there would be no need to
>> alter the current meaning of prefix arguments in movement commands,
>> and thus, you could use movement commands _even with prefix arguments_
>> to both (a) grab text from the buffer,
>
> Why should that be different from my proposal?
>
>> and (b) leave Isearch mode and
>> move point (all in a single operation, as you can do currently).
>
> You just leave isearch once after the search so this way of solving
> the problems leads to more key strokes, doesn't it?
>
> And besides, if you happen to forget to leave isearch before a forward
> movement command you are still at the right point after it. So you can
> just leave it there.
>
I definitively misunderstood you.

Your proposal is basically what I had in my mind, but always with
"grabbing" switched on.

In that case I like it, but I would make a small adjustment: Let's
suppose that you are in forward Isearch mode and have grabbed a couple
of words after the point. Then you change your mind and want to grab
only the first word. In that case, would be convenient to allow M-b
without exiting Isearch mode.

Thus, I propose two alternatives:
a) In Isearch (forward or backward), every movement command would
update the grabbed text. If the last grabbed text was in a different
side of the point than current, switch the direction of the Isearch.
b) The same, but replacing the direction switching with "exit Isearch
mode and move point in the buffer".


-- 
Dani Moncayo





reply via email to

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