unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org, larsi@gnus.org
Subject: Re: master 6362f65474: Add new command `duplicate-line'
Date: Sun, 19 Jun 2022 08:55:38 +0300	[thread overview]
Message-ID: <83wnddmc2t.fsf@gnu.org> (raw)
In-Reply-To: <20220618222225.3ajabf4otw7ze3pn@Ergus> (message from Ergus on Sun, 19 Jun 2022 00:22:25 +0200)

> 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	other threads:[~2022-06-19  5:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <165548727183.24473.6170306052807994962@vcs2.savannah.gnu.org>
     [not found] ` <20220617173432.17B6FC00BAF@vcs2.savannah.gnu.org>
2022-06-17 17:44   ` master 6362f65474: Add new command `duplicate-line' Visuwesh
2022-06-17 17:47     ` Lars Ingebrigtsen
2022-06-18 16:30     ` Ergus
2022-06-18 16:52       ` Eli Zaretskii
2022-06-18 22:22         ` Ergus
2022-06-19  5:55           ` Eli Zaretskii [this message]
2022-06-19 11:55           ` Andreas Schwab
2022-06-19 11:06       ` Lars Ingebrigtsen
2022-06-19 17:10         ` [External] : " Drew Adams
2022-06-19  5:53 Pedro Andres Aranda Gutierrez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wnddmc2t.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).