From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: Problem to run shell-command Date: Thu, 26 Aug 2010 09:43:16 +0300 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282805042 3430 80.91.229.12 (26 Aug 2010 06:44:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 06:44:02 +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 Aug 26 08:44:00 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OoWBr-0006Eh-IY for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 08:43:59 +0200 Original-Received: from localhost ([127.0.0.1]:47547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoWBq-0005tD-W4 for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 02:43:59 -0400 Original-Received: from [140.186.70.92] (port=41662 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoWBQ-0005t8-2V for help-gnu-emacs@gnu.org; Thu, 26 Aug 2010 02:43:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoWBO-0005V8-KJ for help-gnu-emacs@gnu.org; Thu, 26 Aug 2010 02:43:31 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:36405) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoWBO-0005Us-A4 for help-gnu-emacs@gnu.org; Thu, 26 Aug 2010 02:43:30 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OoWBJ-0005nz-2R for help-gnu-emacs@gnu.org; Thu, 26 Aug 2010 08:43:25 +0200 Original-Received: from 91.193.68.214 ([91.193.68.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Aug 2010 08:43:25 +0200 Original-Received: from gavenko by 91.193.68.214 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 26 Aug 2010 08:43:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 91.193.68.214 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74809 Archived-At: On 25.08.2010 19:16, filebat Mark wrote: > Thanks, gavenkoa. > > Well, could you have a try on your environment? > > I am suspicious that shell-command of emacs doesn't support pipe, thus > the two commands fail. > What OS you run? shell-command pass typed string to command interpreter like 'sh' or 'cmdproxy.exe'. So you must type command that correspond to your command interpreter language syntax. Under Linux all work fine out of the box. For Windows I use Cygwin (be ware put 'cygwin/bin' before 'windows/system32' in PATH). Also check 'shell-file-name ' and try play with: (setq shell-file-name (concat exec-directory "cmdproxy.exe")) or like (setq shell-file-name "bash") (setq shell-command-switch "-c") (setenv "SHELL" shell-file-name)