[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46621: Copy line
From: |
Mattias Engdegård |
Subject: |
bug#46621: Copy line |
Date: |
Sat, 25 Jun 2022 18:35:17 +0200 |
23 juni 2022 kl. 17.20 skrev Lars Ingebrigtsen <larsi@gnus.org>:
> I think that means that it might make sense to keep the command as is
> (point movement wise). I.e., if we move point to the duplicated line,
> then hitting `H-y' a whole bunch of times would leave point at the final
> line.
Right. Again, it is slightly more consistent to have it duplicate "below" than
"above" so I weakly favour this way of working, but don't take my word for it
-- try it out in anger.
> If we decide to move to the duplicated line, but keep the same column --
> then that makes no sense in a region-sensitive context at all. If you
> mark a word and hit `H-y', then there's no way to keep the "current
> column".
That's unavoidable because Emacs's region concept prevents the cursor from
moving independently of the selection. (Same goes for most other modern editors
although they use a slightly different selection paradigm.)
In no way does this diminish the utility of the command in either of its modes
of usage.
> It makes no sense to mash up these two totally different
> things into one command, and people do complain about commands that make
> no sense.
But the semantics do make sense -- let's not look for problems that don't
exist. It's like `upcase-dwim`: without an active region it acts on the current
word, which is the most practical unit for that operation.
If it helps, call the new command `duplicate-dwim` or just `duplicate`. The
user who only uses it to duplicate lines is unlikely to be disturbed by its
other ways of functioning.
- bug#46621: Copy line, (continued)
- bug#46621: Copy line, Pankaj Jangid, 2022/06/23
- bug#46621: Copy line, Andreas Schwab, 2022/06/23
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/23
- bug#46621: Copy line, Robert Pluim, 2022/06/23
- bug#46621: Copy line, Pankaj Jangid, 2022/06/23
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/23
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/23
- bug#46621: Copy line, Pankaj Jangid, 2022/06/23
- bug#46621: Copy line, Mattias Engdegård, 2022/06/23
- bug#46621: Copy line, Lars Ingebrigtsen, 2022/06/23
- bug#46621: Copy line,
Mattias Engdegård <=
- bug#46621: Copy line, Juri Linkov, 2022/06/23
- bug#46621: Copy line, Drew Adams, 2022/06/23
- bug#46621: Copy line, Mattias Engdegård, 2022/06/25
- bug#46621: Copy line, Drew Adams, 2022/06/25
- bug#46621: Copy line, Juri Linkov, 2022/06/27
- bug#46621: Copy line, Mattias Engdegård, 2022/06/28
- bug#46621: Copy line, Helmut Eller, 2022/06/28
- bug#46621: Copy line, Drew Adams, 2022/06/22
- bug#46621: Copy line, Pankaj Jangid, 2022/06/22
bug#46621: Copy line, Sean Whitton, 2022/06/22