From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: M-x call with optional arg; call from Elisp Date: Wed, 29 May 2013 23:44:01 -0600 Message-ID: References: <87hahobeac.fsf@VLAN-3434.student.uu.se> <87fvx6ubkr.fsf@VLAN-3434.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1369892626 17428 80.91.229.3 (30 May 2013 05:43:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 May 2013 05:43:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 30 07:43:45 2013 Return-path: Envelope-to: geh-help-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 1UhveJ-0002ng-CD for geh-help-gnu-emacs@m.gmane.org; Thu, 30 May 2013 07:43:43 +0200 Original-Received: from localhost ([::1]:50965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhveJ-0007sj-10 for geh-help-gnu-emacs@m.gmane.org; Thu, 30 May 2013 01:43:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhve1-0007r5-Pp for help-gnu-emacs@gnu.org; Thu, 30 May 2013 01:43:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhvdv-0001tK-Eg for help-gnu-emacs@gnu.org; Thu, 30 May 2013 01:43:25 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:55249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhvdv-0001tF-8g for help-gnu-emacs@gnu.org; Thu, 30 May 2013 01:43:19 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uhvdt-0002Tl-Qn for help-gnu-emacs@gnu.org; Thu, 30 May 2013 07:43:17 +0200 Original-Received: from 71-215-95-78.hlrn.qwest.net ([71.215.95.78]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 May 2013 07:43:17 +0200 Original-Received: from kevin.d.rodgers by 71-215-95-78.hlrn.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 May 2013 07:43:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 71-215-95-78.hlrn.qwest.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <87fvx6ubkr.fsf@VLAN-3434.student.uu.se> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91157 Archived-At: On 5/28/13 1:52 PM, Emanuel Berg wrote: > Stefan Monnier writes: >> Don't use shell-command-on-region from Elisp. Use >> call-process-region instead. > > The above function seems to work. shell-command-on-region and > call-process-region are not syntactically interchangeable, but I'll > do it if you care to tell me the advantage. If you are not using shell features such as redirection, pipes, globbing (file name expansion), variable expansion, conditional and iterative control flow etc. then there is no need to invoke an additional/intermediary shell process between emacs and the command you want to run. -- Kevin Rodgers Denver, Colorado, USA