From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: handling parenthesis and quotes Date: Wed, 24 Jan 2007 21:07:06 +0100 Organization: Norwegian university of science and technology Message-ID: References: <878xftpinw.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169671378 16470 80.91.229.12 (24 Jan 2007 20:42:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 20:42:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 24 21:42:49 2007 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.50) id 1H9oxC-0006gR-6a for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jan 2007 21:42:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9oxB-0006JA-93 for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jan 2007 15:42:45 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!news.tiscali.de!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1169669083 8962 129.241.15.140 (24 Jan 2007 20:04:43 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Wed, 24 Jan 2007 20:04:43 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:gJXfkrRFeGxYeIJJAUYAzDJjWM8= Original-Xref: shelby.stanford.edu gnu.emacs.help:145005 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:40608 Archived-At: + Eli Zaretskii : |> From: Harald Hanche-Olsen |> Date: Wed, 24 Jan 2007 08:24:51 +0100 |> | |> | (shell "grep -i \"\(define \" ~/mydir/myfile?.lisp") |> |> Much easier to use the single quote for the shell command. | | But double quotes are more portable, as the Windows shells support | them, but don't support '...' quoting. Oh. I didn't know that. But single quotes are more portable, as es and rc both support them, but not "...". Er, never mind. Oh, but I am confused now, because shell doesn't even take a command as an argument. Did the OP mean shell-command? And *that* isn't really portable either, if you wish to obsess about it, because (a) by default it uses the user's login shell, and (b) as you pointed out, different OSes have different kinds of shells anyhow. In summary, if you wish to use shell-command portably on unix you need to wrap (let ((explicit-shell-file-name "/bin/sh")) ...) around it. (Disclaimer: I use a CVS emacs, so that variable may not be available on older emacsen for all I know.) -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell