[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: |
Wed, 24 Jun 2015 01:59:10 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) |
> I still believe that shell-command-on-region should not have
> rectangle-specific code. The current `region-extract-function' does let
> you extract the region (rectangular or not) in order to pass it to
> a shell command. So you don't need any rectangle-specific code for that
> part of shell-command-on-region.
> OTOH There is indeed some functionality missing there to let you insert
> the output in a rectangular way (whatever that means).
‘shell-command-on-region’ currently relies on the call to
(call-process-region start end shell-file-name replace ...
but I'm not sure if ‘call-process-region’ is not too low level
to handle rectangular regions. Otherwise, there should be a condition
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’.