[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rectangular region kill saves leading whitespaces

From: Garreau\, Alexandre
Subject: Re: rectangular region kill saves leading whitespaces
Date: Tue, 30 Oct 2018 12:28:40 +0100
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian

Le 30/10/2018 à 07h06, Kaushal Modi a écrit :
>> It copies created leading whitespaces at each line shorter than the
>> longest one.
> I am assuming that you mean the trailing (towards the end of line) space.

Yes! sorry.

>> It is annoying to me: is it intended to be as it is, is it a bug, or a
>> non-existing-yet feature?
> I see that copying of whitespace as a feature, as I have needed that many
> times. It's really helpful when you are pasting a rectangle block of text
> in between some other text.

I don’t understand clearly and concretely what do you mean as an

> Also, as the name says, it copies a "reactangle" of text. Without the
> whitespace, the block won't be a rectangle.

I understand: that’s why I wasn’t sure.  Initially when discovering
rectangular selection I believed this did must be a feature.

> Look into delete-trailing-whitespace[0] function, which you can even add to
> the after-save-hook.

Okay so that’s the intended workaround…

However I find it unclean: most of times it should do, but if there
really were trailing whitespaces initially, it will either add some to
them, or remove them all.  Isn’t there a way to properly save the end of

That might be because you use rectangular selection so that to simply
filter out lines ends and beginning before and past a certain line
column (I often do that to get rid of some indentation, or “> ” line
prefixes, as it is faster than normal (non-rectangular) copy/pasting,
then rectangularely kill the ends/beginnings).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]