[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67925: 29.1; delete-rectangle fails on multi-column characters
From: |
Eli Zaretskii |
Subject: |
bug#67925: 29.1; delete-rectangle fails on multi-column characters |
Date: |
Thu, 21 Dec 2023 18:46:26 +0200 |
> From: awrhygty@outlook.com
> Cc: 67925@debbugs.gnu.org
> Date: Thu, 21 Dec 2023 23:26:05 +0900
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> This patch gives similar result of kill-rectangle.
> >> In the example above, I want all '4' characters moved to same column.
> >
> > How can that be done, when the first character takes 2 or more
> > columns? Deleting the first character is IMO wrong, since the other
> > lines leave the first character intact. Adding SPC to other lines is
> > also wrong, since delete-rectangle is not supposed to _add_ columns.
>
> I think wide characters may be replaced with SPC like TAB.
I don't think I agree. Let's see what others think Stefan, Juri,
Stefan, any opinions? Does anyone else have an opinion on this?
> >> And TAB characters crossing the end column are not edited correctly
> >> with delete-rectangle if indent-tabs-mode is on.
> >>
> >> 012345678
> >> 8(TAB at head)
> >> 012345678
> >>
> >> The text above is edited to the text below.
> >> 45678
> >> 8(TAB at head)
> >> 45678
> >>
> >> If indent-tabs-mode is off, the result is the text below.
> >> 45678
> >> 8(four SPCs)
> >> 45678
> >
> > This is a separate issue with the original code. It also happens with
> > kill-rectangle, btw. We could fix it by temporarily binding
> > indent-tabs-mode to nil inside these commands -- would that be
> > acceptable? The result will be that the killed rectangle includes
> > spaces, not the leading TAB.
>
> I prefer that the killed rectangle has same column for each line.
> If TAB is included when yanking, the current column affects the width of
> the yanked string for each line.
Again, does anyone else have an opinion here? I tend to think that we
should bind indent-tabs-mode to nil inside those functions.
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, awrhygty, 2023/12/20
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Eli Zaretskii, 2023/12/20
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, awrhygty, 2023/12/21
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Eli Zaretskii, 2023/12/21
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, awrhygty, 2023/12/21
- bug#67925: 29.1; delete-rectangle fails on multi-column characters,
Eli Zaretskii <=
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Stefan Monnier, 2023/12/21
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Juri Linkov, 2023/12/22
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Eli Zaretskii, 2023/12/22
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Stefan Monnier, 2023/12/22
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Juri Linkov, 2023/12/23
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Eli Zaretskii, 2023/12/23
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Juri Linkov, 2023/12/24
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Stefan Kangas, 2023/12/24
- bug#67925: 29.1; delete-rectangle fails on multi-column characters, Eli Zaretskii, 2023/12/28