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

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

bug#46621: Copy line


From: Juri Linkov
Subject: bug#46621: Copy line
Date: Sun, 21 Feb 2021 22:37:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> > Once in a while I want to do that.  It is easy: C-a C-k C-k,
>> > they C-y as many times as needed.
>>
>> Let's compare these two solutions.  Trying to copy 10 lines:
>>
>>   C-a C-k C-k C-y C-y C-y C-y C-y C-y C-y C-y C-y C-y
>>
>> and adds an unrequested entry to the kill ring
>> that the user needs to remove from the kill ring later.
>>
>> When bound to a short key, it's just
>>
>>   C-12 C-c c
>>
>> and doesn't change the contents of the kill ring.
>
> What is the use case for an Emacs user to need to copy a line 12
> times, and is it frequent enough

Yes, it is frequently used, as these Q&A sites indicate.

> to justify binding the command to a key, and to C-c key on top
> of that?

ISTR, 'C-c letter' keys are reserved for users, so users can bind the
command to 'C-c c' or any other short key.  But I can't prove if such
convention of 'C-c letter' for user keys really exists, I can't find it
in the manual.

Or it could be bound to some short key sequence by default.
Even without a keybinding the key sequence is very short:

  M-10 M-x dup RET

> Also, let's not forget that Emacs has keyboard macros, and those can
> be run with a repeat count.

This is how long it takes with keyboard macros:

  C-a C-k C-k C-x ( C-y C-x ) C-10 C-x e





reply via email to

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