From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20626: Wishlist: M-x shell-command-on-rectangle-region Date: Mon, 22 Jun 2015 22:02:33 -0400 Message-ID: References: <527474961.10107734.1432245870451.JavaMail.zimbra@comcast.net> <87twv51raf.fsf@mail.linkov.net> <87fv5s4pm0.fsf@mail.linkov.net> <874mlzweri.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1435025003 5876 80.91.229.3 (23 Jun 2015 02:03:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jun 2015 02:03:23 +0000 (UTC) Cc: 20626@debbugs.gnu.org, asparagus@comcast.net To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 23 04:03:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7DYM-0003uj-Ny for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jun 2015 04:03:10 +0200 Original-Received: from localhost ([::1]:42862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7DYL-000527-TB for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jun 2015 22:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7DYI-000521-8q for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 22:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7DYF-0002Zf-39 for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 22:03:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7DYE-0002ZE-WA for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 22:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z7DYE-0005hw-GL for bug-gnu-emacs@gnu.org; Mon, 22 Jun 2015 22:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jun 2015 02:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20626-submit@debbugs.gnu.org id=B20626.143502496421914 (code B ref 20626); Tue, 23 Jun 2015 02:03:02 +0000 Original-Received: (at 20626) by debbugs.gnu.org; 23 Jun 2015 02:02:44 +0000 Original-Received: from localhost ([127.0.0.1]:54792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7DXv-0005hN-HL for submit@debbugs.gnu.org; Mon, 22 Jun 2015 22:02:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:62323) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7DXr-0005h4-Go for 20626@debbugs.gnu.org; Mon, 22 Jun 2015 22:02:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A1FgA731xV/7fp92hcgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA0kiD/PIwEBAQEBAQQBAQEBHos6hQUHhC0FmW2Bd4NGlVojhBQigngBAQE X-IPAS-Result: A0A1FgA731xV/7fp92hcgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA0kiD/PIwEBAQEBAQQBAQEBHos6hQUHhC0FmW2Bd4NGlVojhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="128021843" Original-Received: from 104-247-233-183.cpe.teksavvy.com (HELO ceviche.home) ([104.247.233.183]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Jun 2015 22:02:33 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 50B55660FA; Mon, 22 Jun 2015 22:02:33 -0400 (EDT) In-Reply-To: <874mlzweri.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 23 Jun 2015 01:37:53 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104248 Archived-At: > (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). Stefan