From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 6362f65474: Add new command `duplicate-line' Date: Sun, 19 Jun 2022 08:55:38 +0300 Message-ID: <83wnddmc2t.fsf@gnu.org> References: <165548727183.24473.6170306052807994962@vcs2.savannah.gnu.org> <20220617173432.17B6FC00BAF@vcs2.savannah.gnu.org> <87ilozrxqp.fsf@gmail.com> <20220618163043.g4r2a5inkldmwjue@Ergus> <835ykxoqwh.fsf@gnu.org> <20220618222225.3ajabf4otw7ze3pn@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="351"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, larsi@gnus.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 19 07:56:34 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2nvG-000AUX-C9 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jun 2022 07:56:34 +0200 Original-Received: from localhost ([::1]:37816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2nvE-0003ki-Qa for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Jun 2022 01:56:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2nue-00035h-2Z for emacs-devel@gnu.org; Sun, 19 Jun 2022 01:55:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2nud-00031g-M4; Sun, 19 Jun 2022 01:55:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lGJERDM4Jocut4P/p5wGCzurUd/Bs7AeMBAB9rzHB0U=; b=Y3mJdEq8zMYM 0flMxt1T32wXcMAGQEePtfAMrjGQnAHq8LAwAUAab0WMXvtLuovhWW9wJZxTgZ3j7RP99U1NqzFR6 +sJ1FOic0ufOxte5cuTVz7+kCVZ0/eCn6HA1OCAQqHNBQrBKgia3u31nYeFukmGIm6pVN/Y6cA7LQ rl14c/dBszrQ4k54XyvA0h/PHWZcM3uImUKQJszDdksV85F0G5PfC3XbDwRUso3+1zuFRSHAbo1fi /1wpv8limiNv10Yr7LDtaBKgRcujsx7nWIY+63TpMDK1Ggd+TehZM1GEmuERYlJ0GRjXFbrAnU3/x C7Zb1/nDuRulq+fAo/FMEA==; Original-Received: from [87.69.77.57] (port=3166 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2nud-0007BF-5A; Sun, 19 Jun 2022 01:55:55 -0400 In-Reply-To: <20220618222225.3ajabf4otw7ze3pn@Ergus> (message from Ergus on Sun, 19 Jun 2022 00:22:25 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291402 Archived-At: > Date: Sun, 19 Jun 2022 00:22:25 +0200 > From: Ergus > 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 > >> > >> 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?