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

From: Juri Linkov <[email-masked]>
Date: Fri, 26 Jun 2015 01:30:45 +0300

> 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).

It's more-less clear how to write code for the "slow&complex" path
using the existing ‘region-extract-function’ and a new function like
‘region-insert-function’ like I demonstrated with define-advice
for shell-command-on-region in the beginning of this thread (where
specific ‘insert-rectangle’ should be replaced with ‘region-insert-function’).

What is not clear is how to distinguish "slow&complex" from the "fast-path"?
Maybe with a new arg REGION?