Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Andy
 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

-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 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. 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?


Andy

___
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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Aditya Mahajan

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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Andy Wong
  It should be -u NONE (all capitals)

 -u NONE is the same result.

 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).

mtxrun seems not execute the vim command line correctly.

 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\ 
The log file list as follows:
-

tabstop=8 [New File]
  line 0: set
--- Options ---
  helplang=En ttyfast verbose=20
noloadplugins updatecount=0   verbosefile=log
  iskeyword=@,48-57,_,192-255
 line 0: syntax
No Syntax items defined for this buffer
   line 0: set
--- Options ---
  helplang=En ttyfast verbose=20
noloadplugins updatecount=0   verbosefile=log
  iskeyword=@,48-57,_,192-255
 line 0: let
b:changedtick #3
v:version #702
v:beval_winnr #0
v:lnum#0
v:scrollstart  command line line 0
v:dying   #0
v:lang C
v:count   #0
v:progname vim.exe
v:cmdbang #0
v:foldlevel   #0
v:ctypeC
v:prevcount   #0
v:mouse_win   #0
v:count1  #0
v:foldstart   #0
v:foldend #0
v:profiling   #0
v:beval_col   #0
v:beval_lnum  #0
v:mouse_lnum  #0
v:beval_bufnr #0
v:shell_error #0
v:servername   VIM
v:lc_time  English_United States.1252
v:searchforward   #1
v:mouse_col   #0
v:statusmsgline 0: let
  line 0: let
b:changedtick #3
v:version #702
v:beval_winnr #0
v:lnum#0
v:scrollstart  command line line 0
v:dying   #0
v:lang C
v:count   #0
v:progname vim.exe
v:cmdbang #0
v:foldlevel   #0
v:ctypeC
v:prevcount   #0
v:mouse_win   #0
v:count1  #0
v:foldstart   #0
v:foldend #0
v:profiling   #0
v:beval_col   #0
v:beval_lnum  #0
v:mouse_lnum  #0
v:beval_bufnr #0
v:shell_error #0
v:servername   VIM
v:lc_time  English_United States.1252
v:searchforward   #1
v:mouse_col   #0
v:statusmsgline 0: let
  line 0: source
Error detected while processing command line:
E471: Argument required
   line 0: wqa

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

No.

Andy
___
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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Aditya Mahajan

On Thu, 9 Apr 2009, Andy Wong wrote:


Hello,

I have tried the example using the vim mode to typeset some c codes. When I
run the sample file, context stop with errors. the sample file and log file
as
list below. I use the windowsXP with the minimal context from ConTeXt garden
and \write18 is enabled.  From the log file, it seems the vim command is not
properly quoted as follows:


Another attempt. Does the following test file work for you?

%
%%% Start file
%

\unprotect
\def\shellescapedquote{\letterdoublequote}

\def\runvimsyntax#1
   {\executesystemcommand
  {mtxrun --verbose bin:vim
   -u NONE  % No need to read unnessary configurations
   -e   % run in ex mode
   -C   % Set compatibile
   -n   % No swap
   -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}}
\protect

\setupcolors[state=start]
\usemodule[vim]
\definevimtyping [C] [syntax=c]
\starttext
\startC
#include stdio.h
#include stdlib.h
void main()
{
  printf(Hello World\n) ;
  return;
}
\stopC
\stoptext

%
%%% End file
%

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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Andy Wong
It did not work, either. Same problem.


Andy
On Fri, Apr 10, 2009 at 3:13 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 9 Apr 2009, Andy Wong wrote:

 Hello,

 I have tried the example using the vim mode to typeset some c codes. When
 I
 run the sample file, context stop with errors. the sample file and log
 file
 as
 list below. I use the windowsXP with the minimal context from ConTeXt
 garden
 and \write18 is enabled.  From the log file, it seems the vim command is
 not
 properly quoted as follows:


 Another attempt. Does the following test file work for you?

 %
 %%% Start file
 %

 \unprotect
 \def\shellescapedquote{\letterdoublequote}

 \def\runvimsyntax#1
   {\executesystemcommand
  {mtxrun --verbose bin:vim
   -u NONE  % No need to read unnessary configurations
   -e   % run in ex mode
   -C   % Set compatibile
   -n   % No swap
   -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}}
 \protect

 \setupcolors[state=start]
 \usemodule[vim]
 \definevimtyping [C] [syntax=c]
 \starttext
 \startC
 #include stdio.h
 #include stdlib.h
 void main()
 {
  printf(Hello World\n) ;
  return;
 }
 \stopC
 \stoptext

 %
 %%% End file
 %


 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

 ___

___
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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Aditya Mahajan

On Fri, 10 Apr 2009, Andy Wong wrote:


It did not work, either. Same problem.


Then, for the moment use your workaround of having a batch file. I will 
try to get access to a windows environment in a few days and then check 
what is going wrong on windows.


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
___


Re: [NTG-context] t-vim failed under windows

2009-04-10 Thread Andy Wong
Thanks.
Andy
On Fri, Apr 10, 2009 at 3:28 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Fri, 10 Apr 2009, Andy Wong wrote:

 It did not work, either. Same problem.


 Then, for the moment use your workaround of having a batch file. I will try
 to get access to a windows environment in a few days and then check what is
 going wrong on windows.


 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

 ___

___
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
___


Re: [NTG-context] t-vim failed under windows

2009-04-09 Thread Aditya Mahajan

On Thu, 9 Apr 2009, Andy Wong wrote:


Hello,

I have tried the example using the vim mode to typeset some c codes. When I
run the sample file, context stop with errors. the sample file and log file
as
list below. I use the windowsXP with the minimal context from ConTeXt garden
and \write18 is enabled.  From the log file, it seems the vim command is not
properly quoted as follows:

MTXrun | executing: 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 
I check the t-vim.tex, the definition of the vim command is correct. I don't
know why the \shellescapedquote is not properly resolved.
Any help? thanks.


Does changing noquote to noquotes in line 797 of t-vim help?

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
___


Re: [NTG-context] t-vim failed under windows

2009-04-09 Thread Andy Wong
The same problem. It seems the \shellescapedquote generated to the wrong
position.
So vim complains the -c parameters is wrong.

Andy.

On Thu, Apr 9, 2009 at 4:22 PM, Aditya Mahajan adit...@umich.edu wrote:

 On Thu, 9 Apr 2009, Andy Wong wrote:

 Hello,

 I have tried the example using the vim mode to typeset some c codes. When
 I
 run the sample file, context stop with errors. the sample file and log
 file
 as
 list below. I use the windowsXP with the minimal context from ConTeXt
 garden
 and \write18 is enabled.  From the log file, it seems the vim command is
 not
 properly quoted as follows:

 MTXrun | executing: 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 
 I check the t-vim.tex, the definition of the vim command is correct. I
 don't
 know why the \shellescapedquote is not properly resolved.
 Any help? thanks.


 Does changing noquote to noquotes in line 797 of t-vim help?

 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

 ___

___
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
___


Re: [NTG-context] t-vim failed under windows

2009-04-09 Thread Aditya Mahajan

On Thu, 9 Apr 2009, Andy Wong wrote:


The same problem. It seems the \shellescapedquote generated to the wrong
position.
So vim complains the -c parameters is wrong.


Does

mtxrun --verbose  --noquotes bin:vim -u NONE

work correctly on windows?

What about if you run texexec --lua instead of context (with noquote 
changed to noquotes in t-vim.tex)?


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
___