[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46621: Copy line
From: |
Lars Ingebrigtsen |
Subject: |
bug#46621: Copy line |
Date: |
Sun, 19 Jun 2022 13:43:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Mattias Engdegård <mattiase@acm.org> writes:
>> I've now added this command to Emacs 29 as `duplicate-line'.
>
> Thank you! There was quite some discussion about generalising the
> concept last time it came up for discussion, and making it work on the
> region when active was found to be very useful. It comes quite
> naturally in use, much like upcase-dwim etc.
>
> The attached patch does that. For extra convenience, when the active
> region is rectangular it is duplicated to the right, since that is
> what is usually most convenient.
Simen proposed something quite similar (added to the CCs), and my only
objection was that the semantics of the simpler command is quite
clear -- it always creates a new line, even if we're at a final line in
a buffer without a newline. When dealing with regions, it's not quite
clear what the semantics should be in those corner cases (i.e., regions
that doesn't end with a newline)...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/17
- bug#46621: Copy line, Mattias Engdegård, 2022/06/18
- bug#46621: Copy line, Eli Zaretskii, 2022/06/18
- bug#46621: Copy line,
Lars Ingebrigtsen <=
- bug#46621: Copy line, Mattias Engdegård, 2022/06/19
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/19
- bug#46621: Copy line, Mattias Engdegård, 2022/06/20
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/21
- bug#46621: Copy line, Mattias Engdegård, 2022/06/21
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/22
- bug#46621: Copy line, Juri Linkov, 2022/06/21
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/22
- bug#46621: Copy line, Juri Linkov, 2022/06/22
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/22