From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.help Subject: Re: Shell argument quoting woes Date: Thu, 25 Jul 2013 07:51:05 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1374764117 7684 80.91.229.3 (25 Jul 2013 14:55:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Jul 2013 14:55:17 +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 Jul 25 16:55:20 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V2Mwn-00066L-KF for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jul 2013 16:55:17 +0200 Original-Received: from localhost ([::1]:55970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Mwn-00071q-5T for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Jul 2013 10:55:17 -0400 X-Received: by 10.224.171.72 with SMTP id g8mr41289955qaz.7.1374763865893; Thu, 25 Jul 2013 07:51:05 -0700 (PDT) X-Received: by 10.50.66.208 with SMTP id h16mr220914igt.11.1374763865847; Thu, 25 Jul 2013 07:51:05 -0700 (PDT) Original-Path: usenet.stanford.edu!gh1no286999qab.0!news-out.google.com!dk8ni1421qab.0!nntp.google.com!cb17no224156qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.30.186; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.30.186 User-Agent: G2/1.0 Injection-Date: Thu, 25 Jul 2013 14:51:05 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:200135 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92401 Archived-At: 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))