ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* filter and/or vim module in current beta
@ 2011-08-26 18:26 Andreas Schneider
  2011-08-26 19:33 ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schneider @ 2011-08-26 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

it seems the filter module doesn't currently work (in MkIV at least). It 
may be a problem with the vim module though, I'm not quite sure.

The following example doesn't produce any output:

-----8<---------------------------------------------------
\usemodule[vim]

\definevimtyping[PASCAL][syntax=pascal]

\starttext

\startPASCAL
program test;
begin
	writeln('Hello World!');
end.
\stopPASCAL

\stoptext
-----8<---------------------------------------------------

The output of context has only one line regarding t-filter:
t-filter        > command :

I guess it's just "normal" then that there's no output ... if nothing is 
run.

Any ideas whats going wrong here?

Btw.:
ConTeXt  ver: 2011.08.26 13:32 MKIV  fmt: 2011.8.26  int: english/english

-- 
Best Regards,
Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-26 18:26 filter and/or vim module in current beta Andreas Schneider
@ 2011-08-26 19:33 ` Aditya Mahajan
  2011-08-27  1:40   ` Andreas Schneider
  0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-26 19:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 26 Aug 2011, Andreas Schneider wrote:

> Hi,
>
> it seems the filter module doesn't currently work (in MkIV at least). It may 
> be a problem with the vim module though, I'm not quite sure.
>
> The following example doesn't produce any output:
>
> -----8<---------------------------------------------------
> \usemodule[vim]
>
> \definevimtyping[PASCAL][syntax=pascal]
>
> \starttext
>
> \startPASCAL
> program test;
> begin
> 	writeln('Hello World!');
> end.
> \stopPASCAL
>
> \stoptext
> -----8<---------------------------------------------------
>
> The output of context has only one line regarding t-filter:
> t-filter        > command :
>
> I guess it's just "normal" then that there's no output ... if nothing is run.
>
> Any ideas whats going wrong here?
>
> Btw.:
> ConTeXt  ver: 2011.08.26 13:32 MKIV  fmt: 2011.8.26  int: english/english

Are you using the latest version (2011.08.23) of the filter module? The 
empty filter is due to a change in the how the context namespacing macros 
work and I fixed this a couple of days ago.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-26 19:33 ` Aditya Mahajan
@ 2011-08-27  1:40   ` Andreas Schneider
  2011-08-27  5:54     ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schneider @ 2011-08-27  1:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 26.08.2011 21:33, Aditya Mahajan wrote:
> Are you using the latest version (2011.08.23) of the filter module? The
> empty filter is due to a change in the how the context namespacing
> macros work and I fixed this a couple of days ago.

I updated via first-setup/minimals, so I hope so. But I'll double check 
later by manually grabbing the module.

-- 
Best Regards,
Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-27  1:40   ` Andreas Schneider
@ 2011-08-27  5:54     ` Aditya Mahajan
  2011-08-27  7:02       ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-27  5:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 27 Aug 2011, Andreas Schneider wrote:

> On 26.08.2011 21:33, Aditya Mahajan wrote:
>> Are you using the latest version (2011.08.23) of the filter module? The
>> empty filter is due to a change in the how the context namespacing
>> macros work and I fixed this a couple of days ago.
>
> I updated via first-setup/minimals, so I hope so. But I'll double check later 
> by manually grabbing the module.

The problem is with t-vim.

I need to figure out the best workaround that will work with both MkII and 
MkIV.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-27  5:54     ` Aditya Mahajan
@ 2011-08-27  7:02       ` Aditya Mahajan
  2011-08-28  7:49         ` Andreas Schneider
  0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-27  7:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 27 Aug 2011, Aditya Mahajan wrote:

> On Sat, 27 Aug 2011, Andreas Schneider wrote:
>
>> On 26.08.2011 21:33, Aditya Mahajan wrote:
>>> Are you using the latest version (2011.08.23) of the filter module? The
>>> empty filter is due to a change in the how the context namespacing
>>> macros work and I fixed this a couple of days ago.
>> 
>> I updated via first-setup/minimals, so I hope so. But I'll double check 
>> later by manually grabbing the module.
>
> The problem is with t-vim.

Fixed. Download t-vim and t-syntax-highlight from the dev branch at 
github.

https://github.com/adityam/filter/tree/dev

I'll upload a new version later.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-28  7:49         ` Andreas Schneider
@ 2011-08-27 13:52           ` Aditya Mahajan
  2011-08-28 13:43             ` Andreas Schneider
  0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-27 13:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 28 Aug 2011, Andreas Schneider wrote:

> On 27.08.2011 09:02, Aditya Mahajan wrote:
>> Fixed. Download t-vim and t-syntax-highlight from the dev branch at github.
>> 
>> https://github.com/adityam/filter/tree/dev
>> 
>> I'll upload a new version later.
>
> Thanks! The vimout file is now created and seems to be correct. There are 
> still some problems, though:
>
> Currently, pscolor doesn't seem to work as color scheme which renders a 
> default vimtyping environment (like my initial example) unhighlighted. Using 
> blackandwhite works.

Fixed. Again, was due to the change in the namespace handler. For a 
working version, you will need to download all the t-*.tex files from the 
dev branch at github.

> Here I noticed a second problem. A change to the to-be-highlighted buffer as 
> well as some options (like said "alternative") isn't processed at all.

The change in alternative is handled at the tex level, so there is no need 
to rerun vim

> I have 
> to manually delete the vimout, tmp and md5 files first before I actually see 
> the change.

You can also use --mode=force to force a rerun.

> Also it seems, that tabs are killed. If I manually replace them with spaces, 
> it works.

Tabs are converted to spaces at TeX level: tab=4 gives four spaces, tab=8 
gives eight spaces. However, there was a bug due to which the spaces at 
the beginning of the line were eaten. Fixed now.

> Empty lines also seem to be removed, however that appears to be a 
> feature - not sure.

No, it was a bug. Also fixed.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-27  7:02       ` Aditya Mahajan
@ 2011-08-28  7:49         ` Andreas Schneider
  2011-08-27 13:52           ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schneider @ 2011-08-28  7:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 27.08.2011 09:02, Aditya Mahajan wrote:
> Fixed. Download t-vim and t-syntax-highlight from the dev branch at github.
>
> https://github.com/adityam/filter/tree/dev
>
> I'll upload a new version later.

Thanks! The vimout file is now created and seems to be correct. There 
are still some problems, though:

Currently, pscolor doesn't seem to work as color scheme which renders a 
default vimtyping environment (like my initial example) unhighlighted. 
Using blackandwhite works.

Here I noticed a second problem. A change to the to-be-highlighted 
buffer as well as some options (like said "alternative") isn't processed 
at all. I have to manually delete the vimout, tmp and md5 files first 
before I actually see the change.

Also it seems, that tabs are killed. If I manually replace them with 
spaces, it works. Empty lines also seem to be removed, however that 
appears to be a feature - not sure.

-- 
Best Regards,
Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-27 13:52           ` Aditya Mahajan
@ 2011-08-28 13:43             ` Andreas Schneider
  2011-08-28 19:58               ` Aditya Mahajan
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schneider @ 2011-08-28 13:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 27.08.2011 15:52, Aditya Mahajan wrote:
> On Sun, 28 Aug 2011, Andreas Schneider wrote:
>> ...
>> Currently, pscolor doesn't seem to work as color scheme which renders
>> a default vimtyping environment (like my initial example)
>> unhighlighted. Using blackandwhite works.
>
> Fixed. Again, was due to the change in the namespace handler. For a
> working version, you will need to download all the t-*.tex files from
> the dev branch at github.

Works fine now.

>> Here I noticed a second problem. A change to the to-be-highlighted
>> buffer as well as some options (like said "alternative") isn't
>> processed at all.
>
> The change in alternative is handled at the tex level, so there is no
> need to rerun vim

I thought so and indeed it works now ... it was probably coincidence 
that it didn't work before.

>> I have to manually delete the vimout, tmp and md5 files first before I
>> actually see the change.
>
> You can also use --mode=force to force a rerun.

Shouldn't it detect changes to the buffer through the md5 sum? What I 
meant was: I modify the buffer (add a line, or change lines) but that 
change doesn't cause vim to be run again. From what I can see, the tmp 
file isn't written at all, if it already exists, therefore the md5 sum 
doesn't change, therefore vim isn't run again. Shouldn't the tmp file 
always be (re)written, to reflect the content of the current buffer?

>> Also it seems, that tabs are killed. If I manually replace them with
>> spaces, it works.
>
> Tabs are converted to spaces at TeX level: tab=4 gives four spaces,
> tab=8 gives eight spaces. However, there was a bug due to which the
> spaces at the beginning of the line were eaten. Fixed now.

Indeed, works as expected now.

>> Empty lines also seem to be removed, however that appears to be a
>> feature - not sure.
>
> No, it was a bug. Also fixed.

Even better (kinda ;-)).

Thank you for your efforts and the quick bug fixing!

-- 
Best Regards,
Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-28 13:43             ` Andreas Schneider
@ 2011-08-28 19:58               ` Aditya Mahajan
  2011-08-29  5:37                 ` Mojca Miklavec
  2011-08-29 16:18                 ` Andreas Schneider
  0 siblings, 2 replies; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-28 19:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 28 Aug 2011, Andreas Schneider wrote:

> On 27.08.2011 15:52, Aditya Mahajan wrote:
>>> I have to manually delete the vimout, tmp and md5 files first before I
>>> actually see the change.
>> 
>> You can also use --mode=force to force a rerun.
>
> Shouldn't it detect changes to the buffer through the md5 sum? What I meant 
> was: I modify the buffer (add a line, or change lines) but that change 
> doesn't cause vim to be run again. From what I can see, the tmp file isn't 
> written at all, if it already exists, therefore the md5 sum doesn't change, 
> therefore vim isn't run again. Shouldn't the tmp file always be (re)written, 
> to reflect the content of the current buffer?

This appears to be a Windows specific bug. os.rename does not overwrite 
file on Windows. I changed that with file.copy. Try the new version of the 
t-filter module.

> Thank you for your efforts and the quick bug fixing!

Thank you for testing. The recent change in the namespace macros broke a 
lot of functionality of the filter module. Hopefully, now everything is 
working correctly.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-28 19:58               ` Aditya Mahajan
@ 2011-08-29  5:37                 ` Mojca Miklavec
  2011-08-29 15:19                   ` Aditya Mahajan
  2011-08-29 16:18                 ` Andreas Schneider
  1 sibling, 1 reply; 12+ messages in thread
From: Mojca Miklavec @ 2011-08-29  5:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Aug 28, 2011 at 21:58, Aditya Mahajan wrote:
>
> Thank you for testing. The recent change in the namespace macros broke a lot
> of functionality of the filter module. Hopefully, now everything is working
> correctly.

Does it still work with TeX Live (in case it is not, it might make
sense to ask Karl not to update the package or to provide the old one
on CTAN).

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-29  5:37                 ` Mojca Miklavec
@ 2011-08-29 15:19                   ` Aditya Mahajan
  0 siblings, 0 replies; 12+ messages in thread
From: Aditya Mahajan @ 2011-08-29 15:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 29 Aug 2011, Mojca Miklavec wrote:

> On Sun, Aug 28, 2011 at 21:58, Aditya Mahajan wrote:
>>
>> Thank you for testing. The recent change in the namespace macros broke a lot
>> of functionality of the filter module. Hopefully, now everything is working
>> correctly.
>
> Does it still work with TeX Live

I haven't tested it with TL. I will test with an old ConTeXt version to 
see if anything breaks (it should not).

> (in case it is not, it might make sense to ask Karl not to update the 
> package or to provide the old one on CTAN).

OK.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: filter and/or vim module in current beta
  2011-08-28 19:58               ` Aditya Mahajan
  2011-08-29  5:37                 ` Mojca Miklavec
@ 2011-08-29 16:18                 ` Andreas Schneider
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Schneider @ 2011-08-29 16:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 28.08.2011 21:58, Aditya Mahajan wrote:
> On Sun, 28 Aug 2011, Andreas Schneider wrote:
>> Shouldn't it detect changes to the buffer through the md5 sum? What I
>> meant was: I modify the buffer (add a line, or change lines) but that
>> change doesn't cause vim to be run again. From what I can see, the tmp
>> file isn't written at all, if it already exists, therefore the md5 sum
>> doesn't change, therefore vim isn't run again. Shouldn't the tmp file
>> always be (re)written, to reflect the content of the current buffer?
>
> This appears to be a Windows specific bug. os.rename does not overwrite
> file on Windows. I changed that with file.copy. Try the new version of
> the t-filter module.

Weird, I didn't expect that to be a platform specific issue. Good thing, 
you figured out I was using Windows :-)

>> Thank you for your efforts and the quick bug fixing!
>
> Thank you for testing. The recent change in the namespace macros broke a
> lot of functionality of the filter module. Hopefully, now everything is
> working correctly.

Everything I tested works fine now, so I guess you are on the right 
track (if not even on the destination :D)

Again, Many thanks :-)

-- 
Best Regards,
Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-08-29 16:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 18:26 filter and/or vim module in current beta Andreas Schneider
2011-08-26 19:33 ` Aditya Mahajan
2011-08-27  1:40   ` Andreas Schneider
2011-08-27  5:54     ` Aditya Mahajan
2011-08-27  7:02       ` Aditya Mahajan
2011-08-28  7:49         ` Andreas Schneider
2011-08-27 13:52           ` Aditya Mahajan
2011-08-28 13:43             ` Andreas Schneider
2011-08-28 19:58               ` Aditya Mahajan
2011-08-29  5:37                 ` Mojca Miklavec
2011-08-29 15:19                   ` Aditya Mahajan
2011-08-29 16:18                 ` Andreas Schneider

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