[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: Stefan Monnier
Subject: bug#20626: Wishlist: M-x shell-command-on-rectangle-region
Date: Mon, 22 Jun 2015 22:02:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>  (defun shell-command-on-region (start end command
>                                     &optional output-buffer replace
> -                                   error-buffer display-error-buffer)
> +                                   error-buffer display-error-buffer
> +                                   region)
>    "Execute string COMMAND in inferior shell with region as input.
>  Normally display output (if any) in temp buffer `*Shell Command Output*';
>  Prefix arg means replace the region with it.  Return the exit code of
> @@ -3337,7 +3342,8 @@ (defun shell-command-on-region (start end command
>                      current-prefix-arg
>                      current-prefix-arg
>                      shell-command-default-error-buffer
> -                    t)))
> +                    t
> +                    rectangle-mark-mode)))

Doesn't make sense: if the value determine the use of rectangles, the
arg shouldn't be called `region' but something like `rectangle'.

Notice how kill-ring-save takes a `region' argument and doesn't have any
rectangle-specific code.

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


reply via email to

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