From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51655 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: pretty C with MKIV Date: Tue, 7 Jul 2009 13:09:38 -0400 (EDT) Message-ID: References: <4A537B46.9000705@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1587112142-1246986578=:31926" X-Trace: ger.gmane.org 1246986674 7769 80.91.229.12 (7 Jul 2009 17:11:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2009 17:11:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 07 19:11:08 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1MOECA-0002Jf-AC for gctc-ntg-context-518@m.gmane.org; Tue, 07 Jul 2009 19:11:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4575E1FB64; Tue, 7 Jul 2009 19:11:05 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15212-01; Tue, 7 Jul 2009 19:10:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D41041FAD7; Tue, 7 Jul 2009 19:10:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E038A1FAD7 for ; Tue, 7 Jul 2009 19:10:08 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13341-03 for ; Tue, 7 Jul 2009 19:09:59 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by ronja.ntg.nl (Postfix) with ESMTP id 487D51FA2B for ; Tue, 7 Jul 2009 19:09:59 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5) with ESMTP id n67H9vMD001407 for ; Tue, 7 Jul 2009 19:09:58 +0200 Original-Received: FROM dhcp128036168123.med.yale.edu (dhcp128036168123.med.yale.edu [128.36.168.123]) By tombraider.mr.itd.umich.edu ID 4A538164.DE277.29830 ; Authuser adityam; 7 Jul 2009 13:09:56 EDT In-Reply-To: <4A537B46.9000705@wxs.nl> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.93.161; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 257141438 - 9ba0edc394d5 - 20090707 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:51655 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1587112142-1246986578=:31926 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 7 Jul 2009, Hans Hagen wrote: > Aditya Mahajan wrote: >> On Tue, 7 Jul 2009, Peter M=C3=BCnster wrote: >>=20 >>> On Tue, 7 Jul 2009, Peter M=C3=BCnster wrote: >>> >>>> (I've tried t-vim.tex, but it seems to be broken: >>>> ERROR: I can't find file `test-vimsyntax.tmp-vimsyntax.tmp'.) >>> >>> Ok, t-vim.tex works now. The mtxrun part was the problem. Here my new >>> version of the \runvimsyntax macro (perhaps no more MS-Windows >>> compatibility): >>> >>> \def\runvimsyntax#1 >>> {\executesystemcommand >>> {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=3D\@@vstab" >>> -c "syntax on" >>> -c "set syntax=3D\@@vssyntax" >>> -c "let contextstartline=3D\@@vsstart" >>> -c "let contextstopline=3D\@@vsstop" >>> -c "source `kpsewhich 2context.vim`" >>> -c "wqa" "#1"}} >>=20 >> Hey, `kpsewhich 2context.vim` is cheating! >>=20 >> In MkIV, I think that it should be possible to get the full file name=20 >> using luatex's kpse library. Once I figure that out, the call to mtxrun= =20 >> can be omitted in a platform independent manner. However, I have no time= =20 >> for it right now. > > starting point : > > mtxrun --run vim full:2context.vim > > inside a context run you can use > > resolvers.resolve("full:2context.vim") > > or just resolvers.find_file("2context.vim","other text file") > > so using: > > \ctxlua{os.execute("....")} > > should be doable Thanks, this seems to work as expected. I will work on a new version that= =20 will use resolvers.resolve in MkIV, and the old method in MkII. Aditya --8323328-1587112142-1246986578=:31926 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --8323328-1587112142-1246986578=:31926--