[Top][All Lists]

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

bug#20626: Wishlist: M-x shell-command-on-rectangle-region

From: Juri Linkov
Subject: bug#20626: Wishlist: M-x shell-command-on-rectangle-region
Date: Thu, 25 Jun 2015 01:27:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)

>> in ‘shell-command-on-region’ to check for a rectangular region and
>> insert the output accordingly, so I see no way to avoid checking for
>> ‘rectangle-mark-mode’ in ‘shell-command-on-region’.
> In any case checking specifically for a rectangular region is wrong.
> Having a "fast-path" for the case of a simple contiguous region is fine,
> but the "slow&complex" path is not just for rectangular regions:
> the code should also work with a region made up of various
> arbitrary chunks (there's currently no package that provides this
> feature, but that's no excuse).

Then what about adding a new arg REGION to ‘shell-command-on-region’
and other region-sensitive commands that will provide the region
configuration including information about region type and region shape,
e.g. a list in the form ‘(rectangle …)’.  Then the command's body
will check the car of the arg REGION and act accordingly depending
on the region shape.

reply via email to

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