ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: t-vim failed under windows
Date: Fri, 10 Apr 2009 10:22:01 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0904101016000.25855@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <000001c9b9e4$96d39320$56e0a8c0@tea.state.tx.us>

On Fri, 10 Apr 2009, Andy wrote:

>> Does
>>
>> mtxrun --verbose  --noquotes bin:vim "-u NONE"
>>
>> work correctly on windows?
>
> Yes.
>
>> What about if you run "texexec --lua" instead of "context" (with noquote
>> changed to noquotes in t-vim.tex)?
>
> Same problem. The log shows:
>
> MTXrun |
> MTXrun | executing: vim "-u NONE -e -C -n -c set" "tabstop=8 -c syntax" "on
> -c set" "syntax=c -c let" "contextstartline=1 -c let" "contextstopline=0 -c
> source" "c:/context/tex/texmf-context/tex/context/third/vim/2context.vim -c
> wqa vimdemo-vimsyntax.tmp "
> MTXrun |
> MTXrun |
>
> You can see from above that the argument of vim command -c is not correctly
> quoted. As mentioned in my last email, the \runvimsyntax generates an
> incorrect vim command. For example, we expect the line in \runvimsyntax

The generated command is correct. mtxrun messes up the quotes.

> -c \shellescapedquote syntax on\shellescapedquote\space
>
> Will be: -c "syntax on" in the vim command line. However, the log shows it
> become to: -c syntax " " on. I think that is one problem cause the failure.
>
> I also tried type the command manually:
>
> vim -u None -e -C -n -c "set tabstop=8" -c "syntax on" -c "set syntax=c" -c
> "let contextstartline=1" -c "let contextstopline=0" -c "source
> c:/context/tex/texmf-context/tex/context/third/vim/2context.vim" -c "wqa"
> "vimdemo-vimsyntax.tmp"
>
>
> It works. File named "vimdemo-vimsyntax.tmp-vimsyntax.tmp" generated. Next
> time run texexec will get the correct pdf output.
>
> Another found is if tried mtxrun as:
>
> mtxrun --verbose --noquotes bin:vim "-u None -e -C -n -V10log -c \"set
> tabstop=8\" -c \"syntax on\" -c \"set syntax=c\" -c \"let
> contextstartline=1\" -c \"let contextstopline=0\" -c \"source
> c:/context/tex/texmf-context/tex/context/third/vim/2context.vim\" -c \"wqa\"
> \"vimdemo-vimsyntax.tmp\" "
>
> or
>
> mtxrun --verbose --noquotes bin:vim -u None -e -C -n -V10log -c "set
> tabstop=8" -c "syntax on" -c "set syntax=c" -c "let contextstartline=1" -c
> "let contextstopline=0" -c "source
> c:/context/tex/texmf-context/tex/context/third/vim/2context.vim" -c "wqa"
> "vimdemo-vimsyntax.tmp" "
>
> No vimdemo-vimsyntax.tmp-vimsyntax.tmp generated. The vim log says that it:
> could not source "None"

It should be -u NONE (all capitals)

> It seems the vim may not received the -c "source ..." and other parameters.
> So I move the vim command to a batch file: vimcmd.bat with following line,
>
> call vim -u None -e -C -n -c "set tabstop=8" -c "syntax on" -c "set
> syntax=c" -c "let contextstartline=1" -c "let contextstopline=0" -c "source
> c:/context/tex/texmf-context/tex/context/third/vim/2context.vim" %*
>
> then call
>
> mtxrun --verbose --noquotes bin:vimcmd -c "wqa" "vimdemo-vimsyntax.tmp"
> or
> mtxrun --verbose --noquotes bin:vimcmd "-c \"wqa\" \"vimdemo-vimsyntax.tmp\"
> "
>
> It works well.

Great.

> I haven't linux/unix machine on hand so I didn't know if this
> problem is only occurred in windows. Or the mtxrun related?

It is mtxrun related. It works in linux, so it could be windows related. I 
do not have a windows machine to test (and not enough diskspace to install 
windows on a VM).

As a last resort, what does the log file say for this (all in one line)

mtxrun --verbose --noquotes bin:vim "-u NONE -e -C -n -V10log -c \"set
tabstop=8\" -c \"syntax on\" -c \"set syntax=c\" -c \"let
contextstartline=1\" -c \"let contextstopline=0\" -c \"source
c:/context/tex/texmf-context/tex/context/third/vim/2context.vim\" -c \"wqa\"
\"vimdemo-vimsyntax.tmp\" "


If this does not work, does replacing bin:vim with bin:gvim work?

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2009-04-10 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 15:31 Andy Wong
2009-04-09 21:22 ` Aditya Mahajan
2009-04-10  0:06   ` Andy Wong
2009-04-10  2:54     ` Aditya Mahajan
2009-04-10 13:59       ` Andy
2009-04-10 14:22         ` Aditya Mahajan [this message]
2009-04-10 15:12           ` Andy Wong
2009-04-10 20:13 ` Aditya Mahajan
2009-04-10 20:23   ` Andy Wong
2009-04-10 20:28     ` Aditya Mahajan
2009-04-10 20:33       ` Andy Wong

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

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

  git send-email \
    --in-reply-to=alpine.LNX.2.00.0904101016000.25855@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /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 NNTP newsgroup(s).