unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
To: help-gnu-emacs@gnu.org
Subject: Re: handling parenthesis and quotes
Date: Wed, 24 Jan 2007 08:24:51 +0100	[thread overview]
Message-ID: <pcor6tkj398.fsf@shuttle.math.ntnu.no> (raw)
In-Reply-To: ep5tl3$rco$1@lust.ihug.co.nz

+ Adam <nospam@example.com>:

| Giorgos Keramidas wrote:
|
|> AFAIK, you can `escape' the quotes, with:
|> 
|>   (shell "grep -i \"(define \" ~/mydir/myfile?.lisp")
|
| That's got it, Giorgos.  Thank you. 
| Seems I didn't escape often enough.
|
| (shell "grep -i \"\(define \" ~/mydir/myfile?.lisp")

Much easier to use the single quote for the shell command.  It does
not need to be escaped within the emacs string (and escaping the
parenthesis seems pointless BTW):

(shell "grep -i 'define ' ~/mydir/myfile?.lisp")

Of course, sometimes shell syntax demands double quotes and then you
must escape those: as in "$foo" vs '$foo'.

-- 
* 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	other threads:[~2007-01-24  7:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 20:09 handling parenthesis and quotes Adam
2007-01-23 20:55 ` Giorgos Keramidas
2007-01-23 21:12   ` Adam
2007-01-24  7:24     ` Harald Hanche-Olsen [this message]
2007-01-24 19:14       ` Eli Zaretskii
     [not found]       ` <mailman.3530.1169666053.2155.help-gnu-emacs@gnu.org>
2007-01-24 20:07         ` Harald Hanche-Olsen
2007-01-24 21:32           ` Adam
2007-01-24 22:02             ` Harald Hanche-Olsen
2007-01-25 13:53               ` Adam
2007-01-27  2:20               ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pcor6tkj398.fsf@shuttle.math.ntnu.no \
    --to=hanche@math.ntnu.no \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).