GNU bug report logs - #64185
proposal for new function: copy-line

Previous Next

Package: emacs;

Reported by: Zachary Kanfer <zkanfer <at> gmail.com>

Date: Tue, 20 Jun 2023 05:09:02 UTC

Severity: wishlist

Full log


Message #17 received at 64185 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Zachary Kanfer <zkanfer <at> gmail.com>
Cc: 64185 <at> debbugs.gnu.org, me <at> eshelyaron.com
Subject: Re: bug#64185: proposal for new function: copy-line
Date: Thu, 22 Jun 2023 08:08:07 +0300
> From: Zachary Kanfer <zkanfer <at> gmail.com>
> Date: Wed, 21 Jun 2023 23:33:15 -0400
> Cc: Eshel Yaron <me <at> eshelyaron.com>, 64185 <at> debbugs.gnu.org
> 
> I do think it's more useful to put point on the second line; I almost always find myself wanting to edit the
> "new" line, not the old one. Yes, there isn't really a new vs old line, but I write the first thing I want to see
> first, then want to duplicate it to make a changed second line.

We could have the prefix arg of - (i.e., "C-u - M-x ...") produce that
behavior from duplicate-line.  Or we could have a user option to do
that regardless of the argument, but then we should decide on which of
the N new lines to put point: the first one copied or the last one.

> I suspect that although it hasn't been in a released version yet, it's slightly late to have a discussion
> about changing the behavior to leave point on the second line instead of the first.

Not the default behavior, but we could have it optionally behave
differently.




This bug report was last modified 1 year and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.