From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Shell argument quoting woes
Date: Thu, 25 Jul 2013 17:28:51 +0200 [thread overview]
Message-ID: <87d2q6fyks.fsf@gmail.com> (raw)
In-Reply-To: cedb9081-fc0c-45e9-9b91-bb5e65211a4a@googlegroups.com
Rustom Mody <rustompmody@gmail.com> writes:
> On Thursday, July 25, 2013 7:00:32 PM UTC+5:30, Thorsten Jolitz wrote:
> Seems to me that this inside lisp
>
>> ,------------------------
>> | prg -'fun \"strg\" num'
>> `------------------------
>> How can I quote such a 'cmd' string in a way that it finally arrives as
>
> should be this
>
>>
>> ,------------------------
>> | $ prg -'fun "strg" num'
>> `------------------------
>
> at the shell... No?
>
> Anyway heres some (not too great) hacking:
> (with my recently learnt from Bastien's C-j!)
>
> (setq cmd "prg -'fun \"strg\" num'")
> "prg -'fun \"strg\" num'"
> (setq x (split-string cmd "-"))
> ("prg " "'fun \"strg\" num'")
> (setq p (car (split-string (car x))))
> "prg"
> (setq arg (cadr x))
> "'fun \"strg\" num'"
> ; (make-comint "buffer-name" p nil (concat "-" arg))
I see, so the problem was actually the string-splitting by spaces and
not the quoting. Thanks!
--
cheers,
Thorsten
next prev parent reply other threads:[~2013-07-25 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1758.1374759057.12400.help-gnu-emacs@gnu.org>
2013-07-25 14:51 ` Shell argument quoting woes Rustom Mody
2013-07-25 15:28 ` Thorsten Jolitz [this message]
[not found] ` <mailman.1765.1374766754.12400.help-gnu-emacs@gnu.org>
2013-07-25 16:46 ` Rustom Mody
2013-07-25 13:30 Thorsten Jolitz
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=87d2q6fyks.fsf@gmail.com \
--to=tjolitz@gmail.com \
--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).