emacs-devel
[Top][All Lists]
Advanced

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

Re: master 6362f65474: Add new command `duplicate-line'


From: Eli Zaretskii
Subject: Re: master 6362f65474: Add new command `duplicate-line'
Date: Sun, 19 Jun 2022 08:55:38 +0300

> Date: Sun, 19 Jun 2022 00:22:25 +0200
> From: Ergus <spacibba@aol.com>
> Cc: emacs-devel@gnu.org, larsi@gnus.org
> 
> On Sat, Jun 18, 2022 at 07:52:30PM +0300, Eli Zaretskii wrote:
> >> Date: Sat, 18 Jun 2022 18:30:43 +0200
> >> From: Ergus <spacibba@aol.com>
> >>
> >> 2) From the same package may we consider a command "move-line", which in
> >> the same fashion the user could bind to move the current line up/down?
> >
> >Isn't that what transpose-lines already provides?
> >
> Actually no, transpose-lines is very confusing from the user point of
> view... because the line moved is not the current one, but the previous
> one...
> 
> but also, the cursor moves with it but not to it, but to the beginning
> of the next one, so we lost the current column position and line; so it
> looks like a command that acts outside the current position and moves
> the cursor to random places.

This just means you don't use that command frequently, or not at all.
It's one of the oldest and more useful text-editing commands in Emacs.

The solution to all of your problems is just one C-n (or C-p, as the
case may be), and that IMNSHO is a much smaller penalty than
introduction of a new command, binding it to some key that is both
short enough to be convenient and unused by other commands, and many
other repercussions all over the place.

> Could we make user live easier for simple editing stuff??

Since when moving a line is an important enough operation for us to
try to make it much easier than it already is?  How many times do you
need to move a line in your editing, and for what purposes?

> These commands + a repeat keymap are very useful?

I'm guessing you are used to it in "some other editor", so your muscle
memory longs for it.  Right?



reply via email to

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