From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59018 Path: news.gmane.org!not-for-mail From: Riobard Newsgroups: gmane.comp.tex.context Subject: t-vim module quoting problem on OS X Date: Sun, 23 May 2010 20:17:31 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274638662 18616 80.91.229.12 (23 May 2010 18:17:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 18:17:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun May 23 20:17:41 2010 connect(): No such file or directory Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGFk5-0006u0-Gv for gctc-ntg-context-518@m.gmane.org; Sun, 23 May 2010 20:17:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 01941C9C01; Sun, 23 May 2010 20:17:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gxwQtx0yYKGw; Sun, 23 May 2010 20:17:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA989C9C22; Sun, 23 May 2010 20:17:36 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C03AEC9C22 for ; Sun, 23 May 2010 20:17:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fZBlgrVPX5Or for ; Sun, 23 May 2010 20:17:33 +0200 (CEST) Original-Received: from mail-iw0-f169.google.com (mail-iw0-f169.google.com [209.85.214.169]) by balder.ntg.nl (Postfix) with ESMTP id 34088C9C01 for ; Sun, 23 May 2010 20:17:32 +0200 (CEST) Original-Received: by iwn39 with SMTP id 39so3085486iwn.14 for ; Sun, 23 May 2010 11:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=J3vqdkVm6L5fQGCETVWfktgkKbPsX0cb+tZcSSmtomE=; b=IE9cVROg6X9v0aeB4HxTz8DxzwmTqDx4yVpVLXSgUQn8NRrq1PGVEJ1J680srQtJbD xF7yyeCofMfvBhTCC/VfgLNujpCKWqy7pdeC1rkUZyUKasjKwrj/GRPcN/nvpJYLXIJV 1Xk0sJa/F5XyL2ejCy/e+vZWQq+wxHd1kunGw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=on1ydcO8tRFuouPAmhNFHfRYNAyfaVGe/O+VOEOa01uc8PnRfdNbkFMv4q20tMwl2n F1s+Ua1F0w6deZNDsxRNR5cWJa2xPtk2h3Tr7JrN9z0emE4jwN6iLRM+eaHkgAM9VqxY YR7B/OdB6bBSpGLx185wRUEr9v5HJTdh6Zvfg= Original-Received: by 10.231.149.145 with SMTP id t17mr3595919ibv.25.1274638651768; Sun, 23 May 2010 11:17:31 -0700 (PDT) Original-Received: by 10.231.173.148 with HTTP; Sun, 23 May 2010 11:17:31 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:59018 Archived-At: Hi, t-vim.tex has a very strange quoting issue when it tries to invoke vim. Here is the piece of code that causes problem: ---------------------- \def\runvimsyntax#1 {\executesystemcommand {mtxrun --verbose --noquote bin:vim "-u NONE % No need to read unnessary configurations -e % run in ex mode -C % Set compatibile -n % No swap % -V10log % For debugging only, will go away later. -c \shellescapedquote set tabstop=\@@vstab \shellescapedquote\space -c \shellescapedquote syntax on\shellescapedquote\space -c \shellescapedquote set syntax=\@@vssyntax\shellescapedquote\space -c \shellescapedquote let contextstartline=\@@vsstart\shellescapedquote\space -c \shellescapedquote let contextstopline=\@@vsstop\shellescapedquote \space -c \shellescapedquote source kpse:2context.vim\shellescapedquote\space -c \shellescapedquote wqa\shellescapedquote\space \shellescapedquote#1\shellescapedquote\space " }} ------------------------- On OS X (10.6) Vim complains: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 10 2010 21:54:21) Garbage after option argument: "-u NONE -e -C -n -c "set tabstop=8" -c "syntax on" -c "set syntax=scala" -c "let contextstartline=1" -c "let contextstopline=0" -c "source /Users/rio/ConTeXt/tex/texmf-context/tex/context/third/vim/2context.vim" -c "wqa" "usecase-vimsyntax.tmp" " More info with: "vim -h" I searched the mailing list and found an old thread where Mojca talked about the rare strange quoting behavior. So I changed the above code to -------------------------- \def\runvimsyntax#1 {\executesystemcommand {mtxrun --verbose --noquote bin:vim -u NONE % No need to read unnessary configurations -e % run in ex mode -C % Set compatibile -n % No swap % -V10log % For debugging only, will go away later. -c "set tabstop=\@@vstab" -c "syntax on" -c "set syntax=\@@vssyntax" -c "let contextstartline=\@@vsstart" -c "let contextstopline=\@@vsstop" -c "source kpse:2context.vim" -c "wqa" "#1"}} ----------------------------- and it works on OS X. Not sure if it will work on other platforms. Can someone try it out on Windows and Linux please? What's the proper way to do quoting in a crossplatform manner in ConTeXt? - Rio ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________