help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handling parenthesis and quotes


From: Harald Hanche-Olsen
Subject: Re: handling parenthesis and quotes
Date: Wed, 24 Jan 2007 21:07:06 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix)

+ Eli Zaretskii <eliz@gnu.org>:

|> From: Harald Hanche-Olsen <hanche@math.ntnu.no>
|> 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     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


reply via email to

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