emacs-devel
[Top][All Lists]
Advanced

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

Re: Recentish C-s M-y change


From: Filipp Gunbin
Subject: Re: Recentish C-s M-y change
Date: Thu, 31 Dec 2020 20:09:26 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

On 31/12/2020 15:18 +0000, Gregory Heytings wrote:

>>> Would it not be possible to use C-u to have both behaviors?  With the
>>> following code C-s C-y M-y... and C-s M-y M-y... work as before, and
>>> C-s C-u C-y and C-s C-u M-y use the new feature.
>>
>> Looks overly complex
>>
>
> What is "overly complex"?  The "u" and "y" keys are next to each other on
> most keyboards.

I was referring to the usage of prefix arg in subcommands.

> There are not many possible solutions if we want to make that new feature,
> which I think is a useful one, accessible without changing the keymap too
> much.  C-y, M-y and C-M-y are already bound.  Using TAB as you suggested
> does not seem to be a good solution, newcomers would have to learn that
> searching for TAB requires a C-q.

I suggested TAB because a second TAB would conveniently show
*Completions* with alternatives from the kill ring.  Yet you're right,
having to enter C-q to search for tab *character* may be confusing for
newcomers.

> Another solution would be to use C-S-y or M-S-y.
>
> But I do believe that C-u is better, the universal argument is commonly
> used to select between different behaviors in Emacs, and is in particular
> already used to start a regexp isearch and a regular isearch.
>
>>
>> and currently "sub-commands" (bound to keys in isearch-mode-map) do not
>> use universal arg AFAICT.
>>
>
> That's not correct.  C-s C-u C-q C-i searches for four consecutive tabs,
> for example; C-s C-u 6 C-w starts isearch with the next six words.

Now I know about this, thanks!

Are there any examples where the prefix arg would alter the *behavior*
of the subcommand (make it do something different), not just set a
quantifier?

Filipp



reply via email to

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