Subject: Re: bug#64185: proposal for new function: copy-line

From: Mattias Engdegård <[email-masked]>
Date: Wed, 28 Jun 2023 15:17:08 +0200

27 juni 2023 kl. 20.28 skrev Juri Linkov <[email-masked]>:

> (The only consideration is performance, but probably not worth
> making the code more complex by increasing the size of copied region
> exponentially to avoid inserting a large amount of small chunks one by one.)

We can certainly do better. I just pushed another 10× improvement, on top of the previous performance doubling for duplicate-line.

> I see no problem in having two commands, since most users expect a standard
> command to duplicate lines, and a more general dwim command is a bonus
> for more advanced uses.  So AFAIC, a separate option for duplicate-line
> is a must, and an option for duplicate-dwim is a nice-to-have.

That duplicate-dwim is somehow 'advanced' is a misconception: it's just more useful, and definitely not harder to use.
I don't believe in hiding useful functionality from people by intentionally making them difficult to access.