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

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

bug#46621: Copy line


From: Helmut Eller
Subject: bug#46621: Copy line
Date: Mon, 22 Feb 2021 19:42:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Mon, Feb 22 2021, Eli Zaretskii wrote:

>> One example where copy-line would be useful is editing configuration
>> files.  E.g. /etc/ssh/sshd_config list many options with the default
>> value but as comments, like so:
>> 
>>   #SyslogFacility AUTH
>>   #LogLevel INFO
>>   ... other options ...
>>   
>> Now, if I want to change LogLevel to say DEBUG, I would copy the line,
>> keep the original, and edit the copied line.
>
> I already mentioned M-/ as the alternative.  In the above case, type
> "#L M-/", and Emacs will complete to "#LogLevel".  IOW, if these cases
> are considered as "repeat a previous word" rather than "copy a
> previous line, then edit it", the solution already exists.  I suspect
> that people who are looking for this command simply don't know about
> M-/ in Emacs, because IME it's still quite a unique feature.

I certainly know about M-/, but in this situation it's pretty far down
the list of alternatives I would consider.  Killing the whole line and
inserting it two times is what I usually end up doing.

Admittedly, I do have my own copy-line command and it's bound to C-x-,.
But I often forget the key binding.

Helmut





reply via email to

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