Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-23 Thread Vincent Massol
Hi,

On Jan 24, 2013, at 8:34 AM, Richard Hierlmeier  
wrote:

> Am 24.01.2013 07:29, schrieb Ldm Public:
>> Hello,
>> 
>> I've tried to document this Macro on http://platform.xwiki.org by
>> running/displaying somewhere the macro results, but I failed :
>> - I'm not allowed to create a new page (I was thinking of creating a
>> page containing Richard's macro)
>> - I'm not allowed to modify syntax page
>> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax (I was
>> thinking of adding a footnote with link to the extension)
>> - thus I've checked if I was allowed to add a comment on the page
>> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax and I succeed
>> with a dummy comment but now I can not change/remove this comment ;-(.
> 
> I also tried to run the python script in the
> 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages
> 
> page. But it is not possible because my user account has no programming 
> rights on extensions.xwiki.org.
> 
> Someone of the XWiki team with programming rights can do it ;:.

Actually our practice is not execute scripts on extensions.xwiki.org since that 
takes CPU/memory and is potentially dangerous for the stability of the 
platform. It's also more maintenance intensive.

In addition the result only represent the result on the XWiki version installed 
there. Thus our practice is to attach screenshots instead.

Thanks
-Vincent

> Richard
> 
> 
>> 
>> 2 requests:
>> First : please delete my dummy comment here :
>> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax . That's in
>> advance to Wiki admins
>> Second : what is the best way to "promote" Richard's macro and to let
>> users know what are / how they can check the available languages in Code
>> macro ?
>> 
>> regards,
>> 
>> Le 23/01/2013 08:10, Richard Hierlmeier a écrit :
>>> Am 22.01.2013 18:04, schrieb Vincent Massol:
 
 On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier
  wrote:
 
> Am 21.01.2013 21:37, schrieb Vincent Massol:
>> Hi Richard,
>> 
>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier
>>  wrote:
>> 
>>> 
>>> Hi XWiki users,
>>> 
>>> I could not find in the XWiki documentation a hint of the
>>> supported languages for the code macro.
>>> 
>>> I wrote a small script in a XWiki page that read out of pygment
>>> (the technology behind the code macro) all supported languages
>>> with language name, files extension and mimetype.
>>> 
>>> See:
>>> 
>>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>>> 
>> 
>> Very nice! Would be awesome if you contribute it as a code snippet
>> on http://extensions.xwiki.org ! :)
> 
> I added the following page:
> 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro
> 
 
 Thanks but this is not correct…
 
 What you need to do is contribute an extension of type "snippet".
 
 Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in
 the "contribute extension" field type "Supported Languages in Code
 Macro" and click submit… :)
 
>>> 
>>> Sorry for that,
>>> 
>>> I added a extension is the described way:
>>> 
>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages
>>> 
>>> Vincent can you delete the incorrect page.
>>> 
>>> Richard
>>> 
>>> 
 Thanks
 -Vincent
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-23 Thread Richard Hierlmeier

Am 24.01.2013 07:29, schrieb Ldm Public:

Hello,

I've tried to document this Macro on http://platform.xwiki.org by
running/displaying somewhere the macro results, but I failed :
- I'm not allowed to create a new page (I was thinking of creating a
page containing Richard's macro)
- I'm not allowed to modify syntax page
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax (I was
thinking of adding a footnote with link to the extension)
- thus I've checked if I was allowed to add a comment on the page
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax and I succeed
with a dummy comment but now I can not change/remove this comment ;-(.


I also tried to run the python script in the

http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages

page. But it is not possible because my user account has no programming 
rights on extensions.xwiki.org.


Someone of the XWiki team with programming rights can do it ;:.

Richard




2 requests:
First : please delete my dummy comment here :
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax . That's in
advance to Wiki admins
Second : what is the best way to "promote" Richard's macro and to let
users know what are / how they can check the available languages in Code
macro ?

regards,

Le 23/01/2013 08:10, Richard Hierlmeier a écrit :

Am 22.01.2013 18:04, schrieb Vincent Massol:


On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier
 wrote:


Am 21.01.2013 21:37, schrieb Vincent Massol:

Hi Richard,

On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier
 wrote:



Hi XWiki users,

I could not find in the XWiki documentation a hint of the
supported languages for the code macro.

I wrote a small script in a XWiki page that read out of pygment
(the technology behind the code macro) all supported languages
with language name, files extension and mimetype.

See:

http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages



Very nice! Would be awesome if you contribute it as a code snippet
on http://extensions.xwiki.org ! :)


I added the following page:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro



Thanks but this is not correct…

What you need to do is contribute an extension of type "snippet".

Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in
the "contribute extension" field type "Supported Languages in Code
Macro" and click submit… :)



Sorry for that,

I added a extension is the described way:

http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages

Vincent can you delete the incorrect page.

Richard



Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-23 Thread Vincent Massol
Hi,

On Jan 24, 2013, at 7:29 AM, Ldm Public  wrote:

> Hello,
> 
> I've tried to document this Macro on http://platform.xwiki.org by 
> running/displaying somewhere the macro results, but I failed :
> - I'm not allowed to create a new page (I was thinking of creating a page 
> containing Richard's macro)

Anyone registered can create pages normally so that's strange. However this 
doesn't look like the place to document the code macro. That is already done 
here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro

Not sure what is Richard's macro but if Richard contributed a new macro it 
should be contributed on extensions.xwiki.org and thus documented in that page 
there.

> - I'm not allowed to modify syntax page 
> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax (I was thinking of 
> adding a footnote with link to the extension)

This one is normal. There's a special page acess right set on it because this 
page is generated, see
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax?viewer=code

The reason is that this page is packaged in the default XWiki XAR and we didn't 
want duplication.

> - thus I've checked if I was allowed to add a comment on the page 
> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax and I succeed with 
> a dummy comment but now I can not change/remove this comment ;-(.

I don't remember what rights we ask for removing comments.

> 2 requests:
> First : please delete my dummy comment here : 
> http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax . That's in advance 
> to Wiki admins

Done

> Second : what is the best way to "promote" Richard's macro and to let users 
> know what are / how they can check the available languages in Code macro ?

It's already promoted here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages

But it's not a macro, it's a code snippet.

Thanks
-Vincent

> regards,
> 
> Le 23/01/2013 08:10, Richard Hierlmeier a écrit :
>> Am 22.01.2013 18:04, schrieb Vincent Massol:
>>> 
>>> On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier 
>>>  wrote:
>>> 
 Am 21.01.2013 21:37, schrieb Vincent Massol:
> Hi Richard,
> 
> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
>  wrote:
> 
>> 
>> Hi XWiki users,
>> 
>> I could not find in the XWiki documentation a hint of the supported 
>> languages for the code macro.
>> 
>> I wrote a small script in a XWiki page that read out of pygment (the 
>> technology behind the code macro) all supported languages with language 
>> name, files extension and mimetype.
>> 
>> See:
>> 
>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
> 
> Very nice! Would be awesome if you contribute it as a code snippet on 
> http://extensions.xwiki.org ! :)
 
 I added the following page:
 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro
  
>>> 
>>> Thanks but this is not correct…
>>> 
>>> What you need to do is contribute an extension of type "snippet".
>>> 
>>> Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in the 
>>> "contribute extension" field type "Supported Languages in Code Macro" and 
>>> click submit… :)
>>> 
>> 
>> Sorry for that,
>> 
>> I added a extension is the described way:
>> 
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages
>> 
>> Vincent can you delete the incorrect page.
>> 
>> Richard
>> 
>> 
>>> Thanks
>>> -Vincent
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-23 Thread Ldm Public

Hello,

I've tried to document this Macro on http://platform.xwiki.org by 
running/displaying somewhere the macro results, but I failed :
- I'm not allowed to create a new page (I was thinking of creating a page 
containing Richard's macro)
- I'm not allowed to modify syntax page 
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax (I was thinking of 
adding a footnote with link to the extension)
- thus I've checked if I was allowed to add a comment on the page 
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax and I succeed with a 
dummy comment but now I can not change/remove this comment ;-(.


2 requests:
First : please delete my dummy comment here : 
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax . That's in advance to 
Wiki admins
Second : what is the best way to "promote" Richard's macro and to let users know 
what are / how they can check the available languages in Code macro ?


regards,

Le 23/01/2013 08:10, Richard Hierlmeier a écrit :

Am 22.01.2013 18:04, schrieb Vincent Massol:


On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier  
wrote:



Am 21.01.2013 21:37, schrieb Vincent Massol:

Hi Richard,

On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
 wrote:




Hi XWiki users,

I could not find in the XWiki documentation a hint of the supported 
languages for the code macro.


I wrote a small script in a XWiki page that read out of pygment (the 
technology behind the code macro) all supported languages with language 
name, files extension and mimetype.


See:

http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages


Very nice! Would be awesome if you contribute it as a code snippet on 
http://extensions.xwiki.org ! :)


I added the following page:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro 



Thanks but this is not correct…

What you need to do is contribute an extension of type "snippet".

Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in the 
"contribute extension" field type "Supported Languages in Code Macro" and 
click submit… :)




Sorry for that,

I added a extension is the described way:

http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages

Vincent can you delete the incorrect page.

Richard



Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Richard Hierlmeier

Am 22.01.2013 09:33, schrieb Thomas Mortagne:

On Tue, Jan 22, 2013 at 9:31 AM, Thomas Mortagne
 wrote:

On Mon, Jan 21, 2013 at 9:10 PM, Richard Hierlmeier
 wrote:


Hi XWiki users,

I could not find in the XWiki documentation a hint of the supported
languages for the code macro.


Well you have a link to http://pygments.org/languages/ on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro but
its not always perfectly up to date.



I wrote a small script in a XWiki page that read out of pygment (the
technology behind the code macro) all supported languages with language
name, files extension and mimetype.

See:

http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages


That's indeed very useful. Especially getting the exact identifier of
the language which is not very clear on
http://pygments.org/languages/.


By the way it would probably be easier to directly use the python
macro instead of the groovy one ;)


A stick-in-the-mud will try nothing new (:.
I implemented it in python and it is indeed much shorter.

Thank you

Richard








Richard
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users




--
Thomas Mortagne




--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Vincent Massol

On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier  
wrote:

> Am 21.01.2013 21:37, schrieb Vincent Massol:
>> Hi Richard,
>> 
>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
>> wrote:
>> 
>>> 
>>> Hi XWiki users,
>>> 
>>> I could not find in the XWiki documentation a hint of the supported 
>>> languages for the code macro.
>>> 
>>> I wrote a small script in a XWiki page that read out of pygment (the 
>>> technology behind the code macro) all supported languages with language 
>>> name, files extension and mimetype.
>>> 
>>> See:
>>> 
>>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>> 
>> Very nice! Would be awesome if you contribute it as a code snippet on 
>> http://extensions.xwiki.org ! :)
> 
> I added the following page:
> 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro
> 
> Richard

Thanks! I've removed the page.

-Vincent
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Richard Hierlmeier

Am 22.01.2013 18:04, schrieb Vincent Massol:


On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier  
wrote:


Am 21.01.2013 21:37, schrieb Vincent Massol:

Hi Richard,

On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
wrote:



Hi XWiki users,

I could not find in the XWiki documentation a hint of the supported languages 
for the code macro.

I wrote a small script in a XWiki page that read out of pygment (the technology 
behind the code macro) all supported languages with language name, files 
extension and mimetype.

See:

http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages


Very nice! Would be awesome if you contribute it as a code snippet on 
http://extensions.xwiki.org ! :)


I added the following page:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro


Thanks but this is not correct…

What you need to do is contribute an extension of type "snippet".

Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in the "contribute 
extension" field type "Supported Languages in Code Macro" and click submit… :)



Sorry for that,

I added a extension is the described way:

http://extensions.xwiki.org/xwiki/bin/view/Extension/CodeMacro+Languages

Vincent can you delete the incorrect page.

Richard



Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Vincent Massol

On Jan 22, 2013, at 5:51 PM, Richard Hierlmeier  
wrote:

> Am 21.01.2013 21:37, schrieb Vincent Massol:
>> Hi Richard,
>> 
>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
>> wrote:
>> 
>>> 
>>> Hi XWiki users,
>>> 
>>> I could not find in the XWiki documentation a hint of the supported 
>>> languages for the code macro.
>>> 
>>> I wrote a small script in a XWiki page that read out of pygment (the 
>>> technology behind the code macro) all supported languages with language 
>>> name, files extension and mimetype.
>>> 
>>> See:
>>> 
>>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>> 
>> Very nice! Would be awesome if you contribute it as a code snippet on 
>> http://extensions.xwiki.org ! :)
> 
> I added the following page:
> 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro

Thanks but this is not correct…

What you need to do is contribute an extension of type "snippet".

Go to http://extensions.xwiki.org/xwiki/bin/view/Main/WebHome and in the 
"contribute extension" field type "Supported Languages in Code Macro" and click 
submit… :)

Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Richard Hierlmeier

Am 21.01.2013 21:37, schrieb Vincent Massol:

Hi Richard,

On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
wrote:



Hi XWiki users,

I could not find in the XWiki documentation a hint of the supported languages 
for the code macro.

I wrote a small script in a XWiki page that read out of pygment (the technology 
behind the code macro) all supported languages with language name, files 
extension and mimetype.

See:

http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages


Very nice! Would be awesome if you contribute it as a code snippet on 
http://extensions.xwiki.org ! :)


I added the following page:

http://extensions.xwiki.org/xwiki/bin/view/Extension/Supported+Languages+in+CodeMacro

Richard




Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Thomas Mortagne
On Tue, Jan 22, 2013 at 2:37 PM, Arnaud bourree
 wrote:
> 2013/1/22 Thomas Mortagne :
>> Thanks, I commented on the issue.
>
> You comment is true, it is more a Java/Jython/Pygments integration issue

Yea, I will try to find some time to test various version of the JVM
with Jython 2.7a2 to see if I can find a working couple. Unless
Pygments guys decide to be nice with us poor Java users ;)

>
> Arnaud.
>
>>
>> On Tue, Jan 22, 2013 at 10:46 AM, Arnaud bourree
>>  wrote:
>>> 2013/1/22 Thomas Mortagne :
 On Tue, Jan 22, 2013 at 9:19 AM, Arnaud bourree
  wrote:
> 2013/1/21 Vincent Massol :
>> Hi Richard,
>>
>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
>>  wrote:
>>
>>>
>>> Hi XWiki users,
>>>
>>> I could not find in the XWiki documentation a hint of the supported 
>>> languages for the code macro.
>>>
>>> I wrote a small script in a XWiki page that read out of pygment (the 
>>> technology behind the code macro) all supported languages with language 
>>> name, files extension and mimetype.
>>>
>>> See:
>>>
>>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>>
>> Very nice! Would be awesome if you contribute it as a code snippet on 
>> http://extensions.xwiki.org ! :)
>>
>> Thanks
>> -Vincent
>>
>
> Yes, very nice page.
> More than snippet, generated table could be in Code Macro page
> itselft, couldn't it?

 That would only reflect what is supported in xwiki.org instance.

>
> I directly put in application the page nad update on my own wiki a
> page where I have ViM code, and I get the following error
> org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight 
> content
> at 
> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
> at 
> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
> [...]
> Caused by: Traceback (most recent call last):
>   File "", line 3, in 
>   File "", line 3, in 
>   File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
> get_lexer_by_name
>   File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
>   File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
> java.lang.ClassFormatError: Invalid method Code length 79892 in class
> file pygments/lexers/_vimbuiltins$py
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> at 
> org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
> at 
> org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
> at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
> at org.python.core.util.importer.getModuleCode(importer.java:217)
> at 
> org.python.core.util.importer.importer_load_module(importer.java:95)
> at 
> org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
> at 
> org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
> Source)
> at 
> org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
> at org.python.core.imp.loadFromLoader(imp.java:513)
> at org.python.core.imp.find_module(imp.java:467)
> at org.python.core.PyModule.impAttr(PyModule.java:100)
> at org.python.core.imp.import_next(imp.java:715)
> at org.python.core.imp.import_logic(imp.java:777)
> at org.python.core.imp.import_name(imp.java:839)
> at org.python.core.imp.importName(imp.java:884)
> at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
> at org.python.core.PyObject.__call__(PyObject.java:357)
> at org.python.core.__builtin__.__import__(__builtin__.java:1173)
> at org.python.core.imp.importFromAs(imp.java:978)
> at org.python.core.imp.importFrom(imp.java:954)
> at 
> pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
> at 
> pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
> at org.python.core.PyTableCode.call(PyTableCode.java:165)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
> at org.python.core.PyFunction.__call__(PyFunction.java:387)
> at 
> org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
> at org.python.core.PyMethod.__call__(PyMethod.java:211)
> at org.python.core.PyMethod.__call__(PyMethod.java:206)
> at org.python

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Arnaud bourree
2013/1/22 Thomas Mortagne :
> Thanks, I commented on the issue.

You comment is true, it is more a Java/Jython/Pygments integration issue

Arnaud.

>
> On Tue, Jan 22, 2013 at 10:46 AM, Arnaud bourree
>  wrote:
>> 2013/1/22 Thomas Mortagne :
>>> On Tue, Jan 22, 2013 at 9:19 AM, Arnaud bourree
>>>  wrote:
 2013/1/21 Vincent Massol :
> Hi Richard,
>
> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
>  wrote:
>
>>
>> Hi XWiki users,
>>
>> I could not find in the XWiki documentation a hint of the supported 
>> languages for the code macro.
>>
>> I wrote a small script in a XWiki page that read out of pygment (the 
>> technology behind the code macro) all supported languages with language 
>> name, files extension and mimetype.
>>
>> See:
>>
>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>
> Very nice! Would be awesome if you contribute it as a code snippet on 
> http://extensions.xwiki.org ! :)
>
> Thanks
> -Vincent
>

 Yes, very nice page.
 More than snippet, generated table could be in Code Macro page
 itselft, couldn't it?
>>>
>>> That would only reflect what is supported in xwiki.org instance.
>>>

 I directly put in application the page nad update on my own wiki a
 page where I have ViM code, and I get the following error
 org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight 
 content
 at 
 org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
 at 
 org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
 [...]
 Caused by: Traceback (most recent call last):
   File "", line 3, in 
   File "", line 3, in 
   File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
 get_lexer_by_name
   File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
   File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
 java.lang.ClassFormatError: Invalid method Code length 79892 in class
 file pygments/lexers/_vimbuiltins$py
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
 at 
 org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
 at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
 at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
 at org.python.core.util.importer.getModuleCode(importer.java:217)
 at 
 org.python.core.util.importer.importer_load_module(importer.java:95)
 at 
 org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
 at 
 org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
 Source)
 at 
 org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
 at org.python.core.imp.loadFromLoader(imp.java:513)
 at org.python.core.imp.find_module(imp.java:467)
 at org.python.core.PyModule.impAttr(PyModule.java:100)
 at org.python.core.imp.import_next(imp.java:715)
 at org.python.core.imp.import_logic(imp.java:777)
 at org.python.core.imp.import_name(imp.java:839)
 at org.python.core.imp.importName(imp.java:884)
 at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
 at org.python.core.PyObject.__call__(PyObject.java:357)
 at org.python.core.__builtin__.__import__(__builtin__.java:1173)
 at org.python.core.imp.importFromAs(imp.java:978)
 at org.python.core.imp.importFrom(imp.java:954)
 at 
 pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
 at 
 pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
 at org.python.core.PyTableCode.call(PyTableCode.java:165)
 at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
 at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
 at org.python.core.PyFunction.__call__(PyFunction.java:387)
 at 
 org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
 at org.python.core.PyMethod.__call__(PyMethod.java:211)
 at org.python.core.PyMethod.__call__(PyMethod.java:206)
 at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
 at 
 org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1057)
 at org.python.core.PyType.type___call__(PyType.java:1565)
 at org.python.core.PyType$type___call___exposer.__call__(Unknown 
 Source)
 at 
 org.python.core.PyMethodDescr.met

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Thomas Mortagne
Thanks, I commented on the issue.

On Tue, Jan 22, 2013 at 10:46 AM, Arnaud bourree
 wrote:
> 2013/1/22 Thomas Mortagne :
>> On Tue, Jan 22, 2013 at 9:19 AM, Arnaud bourree
>>  wrote:
>>> 2013/1/21 Vincent Massol :
 Hi Richard,

 On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
  wrote:

>
> Hi XWiki users,
>
> I could not find in the XWiki documentation a hint of the supported 
> languages for the code macro.
>
> I wrote a small script in a XWiki page that read out of pygment (the 
> technology behind the code macro) all supported languages with language 
> name, files extension and mimetype.
>
> See:
>
> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages

 Very nice! Would be awesome if you contribute it as a code snippet on 
 http://extensions.xwiki.org ! :)

 Thanks
 -Vincent

>>>
>>> Yes, very nice page.
>>> More than snippet, generated table could be in Code Macro page
>>> itselft, couldn't it?
>>
>> That would only reflect what is supported in xwiki.org instance.
>>
>>>
>>> I directly put in application the page nad update on my own wiki a
>>> page where I have ViM code, and I get the following error
>>> org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight 
>>> content
>>> at 
>>> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
>>> at 
>>> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
>>> [...]
>>> Caused by: Traceback (most recent call last):
>>>   File "", line 3, in 
>>>   File "", line 3, in 
>>>   File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
>>> get_lexer_by_name
>>>   File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
>>>   File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
>>> java.lang.ClassFormatError: Invalid method Code length 79892 in class
>>> file pygments/lexers/_vimbuiltins$py
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>>> at 
>>> org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
>>> at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
>>> at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
>>> at org.python.core.util.importer.getModuleCode(importer.java:217)
>>> at 
>>> org.python.core.util.importer.importer_load_module(importer.java:95)
>>> at 
>>> org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
>>> at 
>>> org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
>>> Source)
>>> at 
>>> org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
>>> at org.python.core.imp.loadFromLoader(imp.java:513)
>>> at org.python.core.imp.find_module(imp.java:467)
>>> at org.python.core.PyModule.impAttr(PyModule.java:100)
>>> at org.python.core.imp.import_next(imp.java:715)
>>> at org.python.core.imp.import_logic(imp.java:777)
>>> at org.python.core.imp.import_name(imp.java:839)
>>> at org.python.core.imp.importName(imp.java:884)
>>> at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
>>> at org.python.core.PyObject.__call__(PyObject.java:357)
>>> at org.python.core.__builtin__.__import__(__builtin__.java:1173)
>>> at org.python.core.imp.importFromAs(imp.java:978)
>>> at org.python.core.imp.importFrom(imp.java:954)
>>> at 
>>> pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
>>> at 
>>> pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
>>> at org.python.core.PyTableCode.call(PyTableCode.java:165)
>>> at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>>> at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
>>> at org.python.core.PyFunction.__call__(PyFunction.java:387)
>>> at 
>>> org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
>>> at org.python.core.PyMethod.__call__(PyMethod.java:211)
>>> at org.python.core.PyMethod.__call__(PyMethod.java:206)
>>> at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
>>> at 
>>> org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1057)
>>> at org.python.core.PyType.type___call__(PyType.java:1565)
>>> at org.python.core.PyType$type___call___exposer.__call__(Unknown 
>>> Source)
>>> at 
>>> org.python.core.PyMethodDescr.method_descriptor___call__(PyMethodDescr.java:54)
>>> at org.python.core.PyMethodDescr.__call__(PyMethodDescr.java:43)
>>> at org.python.core.PyObject._callextra(PyObject.java:527)
>>> at 
>>> pygments

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Arnaud bourree
2013/1/22 Thomas Mortagne :
> On Tue, Jan 22, 2013 at 9:19 AM, Arnaud bourree
>  wrote:
>> 2013/1/21 Vincent Massol :
>>> Hi Richard,
>>>
>>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier 
>>>  wrote:
>>>

 Hi XWiki users,

 I could not find in the XWiki documentation a hint of the supported 
 languages for the code macro.

 I wrote a small script in a XWiki page that read out of pygment (the 
 technology behind the code macro) all supported languages with language 
 name, files extension and mimetype.

 See:

 http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>>>
>>> Very nice! Would be awesome if you contribute it as a code snippet on 
>>> http://extensions.xwiki.org ! :)
>>>
>>> Thanks
>>> -Vincent
>>>
>>
>> Yes, very nice page.
>> More than snippet, generated table could be in Code Macro page
>> itselft, couldn't it?
>
> That would only reflect what is supported in xwiki.org instance.
>
>>
>> I directly put in application the page nad update on my own wiki a
>> page where I have ViM code, and I get the following error
>> org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight 
>> content
>> at 
>> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
>> at 
>> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
>> [...]
>> Caused by: Traceback (most recent call last):
>>   File "", line 3, in 
>>   File "", line 3, in 
>>   File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
>> get_lexer_by_name
>>   File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
>>   File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
>> java.lang.ClassFormatError: Invalid method Code length 79892 in class
>> file pygments/lexers/_vimbuiltins$py
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>> at 
>> org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
>> at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
>> at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
>> at org.python.core.util.importer.getModuleCode(importer.java:217)
>> at 
>> org.python.core.util.importer.importer_load_module(importer.java:95)
>> at 
>> org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
>> at 
>> org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
>> Source)
>> at 
>> org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
>> at org.python.core.imp.loadFromLoader(imp.java:513)
>> at org.python.core.imp.find_module(imp.java:467)
>> at org.python.core.PyModule.impAttr(PyModule.java:100)
>> at org.python.core.imp.import_next(imp.java:715)
>> at org.python.core.imp.import_logic(imp.java:777)
>> at org.python.core.imp.import_name(imp.java:839)
>> at org.python.core.imp.importName(imp.java:884)
>> at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
>> at org.python.core.PyObject.__call__(PyObject.java:357)
>> at org.python.core.__builtin__.__import__(__builtin__.java:1173)
>> at org.python.core.imp.importFromAs(imp.java:978)
>> at org.python.core.imp.importFrom(imp.java:954)
>> at 
>> pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
>> at 
>> pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
>> at org.python.core.PyTableCode.call(PyTableCode.java:165)
>> at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>> at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
>> at org.python.core.PyFunction.__call__(PyFunction.java:387)
>> at 
>> org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
>> at org.python.core.PyMethod.__call__(PyMethod.java:211)
>> at org.python.core.PyMethod.__call__(PyMethod.java:206)
>> at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
>> at 
>> org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1057)
>> at org.python.core.PyType.type___call__(PyType.java:1565)
>> at org.python.core.PyType$type___call___exposer.__call__(Unknown 
>> Source)
>> at 
>> org.python.core.PyMethodDescr.method_descriptor___call__(PyMethodDescr.java:54)
>> at org.python.core.PyMethodDescr.__call__(PyMethodDescr.java:43)
>> at org.python.core.PyObject._callextra(PyObject.java:527)
>> at 
>> pygments.lexer$py.__call__$38(__pyclasspath__/pygments/lexer.py:451)
>> at pygments.lexer$py.call_function(__pyclasspath__/pygments/lexer.py)
>> at org.python.core.PyTableCode.call(PyTableCode

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Thomas Mortagne
On Tue, Jan 22, 2013 at 9:31 AM, Thomas Mortagne
 wrote:
> On Mon, Jan 21, 2013 at 9:10 PM, Richard Hierlmeier
>  wrote:
>>
>> Hi XWiki users,
>>
>> I could not find in the XWiki documentation a hint of the supported
>> languages for the code macro.
>
> Well you have a link to http://pygments.org/languages/ on
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro but
> its not always perfectly up to date.
>
>>
>> I wrote a small script in a XWiki page that read out of pygment (the
>> technology behind the code macro) all supported languages with language
>> name, files extension and mimetype.
>>
>> See:
>>
>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>
> That's indeed very useful. Especially getting the exact identifier of
> the language which is not very clear on
> http://pygments.org/languages/.

By the way it would probably be easier to directly use the python
macro instead of the groovy one ;)

>
>>
>>
>> Richard
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne



--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Thomas Mortagne
On Mon, Jan 21, 2013 at 9:10 PM, Richard Hierlmeier
 wrote:
>
> Hi XWiki users,
>
> I could not find in the XWiki documentation a hint of the supported
> languages for the code macro.

Well you have a link to http://pygments.org/languages/ on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Code+Macro but
its not always perfectly up to date.

>
> I wrote a small script in a XWiki page that read out of pygment (the
> technology behind the code macro) all supported languages with language
> name, files extension and mimetype.
>
> See:
>
> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages

That's indeed very useful. Especially getting the exact identifier of
the language which is not very clear on
http://pygments.org/languages/.

>
>
> Richard
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



--
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Thomas Mortagne
On Tue, Jan 22, 2013 at 9:19 AM, Arnaud bourree
 wrote:
> 2013/1/21 Vincent Massol :
>> Hi Richard,
>>
>> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
>> wrote:
>>
>>>
>>> Hi XWiki users,
>>>
>>> I could not find in the XWiki documentation a hint of the supported 
>>> languages for the code macro.
>>>
>>> I wrote a small script in a XWiki page that read out of pygment (the 
>>> technology behind the code macro) all supported languages with language 
>>> name, files extension and mimetype.
>>>
>>> See:
>>>
>>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>>
>> Very nice! Would be awesome if you contribute it as a code snippet on 
>> http://extensions.xwiki.org ! :)
>>
>> Thanks
>> -Vincent
>>
>
> Yes, very nice page.
> More than snippet, generated table could be in Code Macro page
> itselft, couldn't it?

That would only reflect what is supported in xwiki.org instance.

>
> I directly put in application the page nad update on my own wiki a
> page where I have ViM code, and I get the following error
> org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content
> at 
> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
> at 
> org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
> [...]
> Caused by: Traceback (most recent call last):
>   File "", line 3, in 
>   File "", line 3, in 
>   File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
> get_lexer_by_name
>   File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
>   File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
> java.lang.ClassFormatError: Invalid method Code length 79892 in class
> file pygments/lexers/_vimbuiltins$py
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> at 
> org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
> at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
> at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
> at org.python.core.util.importer.getModuleCode(importer.java:217)
> at 
> org.python.core.util.importer.importer_load_module(importer.java:95)
> at 
> org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
> at 
> org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
> Source)
> at 
> org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
> at org.python.core.imp.loadFromLoader(imp.java:513)
> at org.python.core.imp.find_module(imp.java:467)
> at org.python.core.PyModule.impAttr(PyModule.java:100)
> at org.python.core.imp.import_next(imp.java:715)
> at org.python.core.imp.import_logic(imp.java:777)
> at org.python.core.imp.import_name(imp.java:839)
> at org.python.core.imp.importName(imp.java:884)
> at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
> at org.python.core.PyObject.__call__(PyObject.java:357)
> at org.python.core.__builtin__.__import__(__builtin__.java:1173)
> at org.python.core.imp.importFromAs(imp.java:978)
> at org.python.core.imp.importFrom(imp.java:954)
> at 
> pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
> at 
> pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
> at org.python.core.PyTableCode.call(PyTableCode.java:165)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
> at org.python.core.PyFunction.__call__(PyFunction.java:387)
> at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
> at org.python.core.PyMethod.__call__(PyMethod.java:211)
> at org.python.core.PyMethod.__call__(PyMethod.java:206)
> at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
> at 
> org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1057)
> at org.python.core.PyType.type___call__(PyType.java:1565)
> at org.python.core.PyType$type___call___exposer.__call__(Unknown 
> Source)
> at 
> org.python.core.PyMethodDescr.method_descriptor___call__(PyMethodDescr.java:54)
> at org.python.core.PyMethodDescr.__call__(PyMethodDescr.java:43)
> at org.python.core.PyObject._callextra(PyObject.java:527)
> at 
> pygments.lexer$py.__call__$38(__pyclasspath__/pygments/lexer.py:451)
> at pygments.lexer$py.call_function(__pyclasspath__/pygments/lexer.py)
> at org.python.core.PyTableCode.call(PyTableCode.java:165)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
> at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
> 

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-22 Thread Arnaud bourree
2013/1/21 Vincent Massol :
> Hi Richard,
>
> On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
> wrote:
>
>>
>> Hi XWiki users,
>>
>> I could not find in the XWiki documentation a hint of the supported 
>> languages for the code macro.
>>
>> I wrote a small script in a XWiki page that read out of pygment (the 
>> technology behind the code macro) all supported languages with language 
>> name, files extension and mimetype.
>>
>> See:
>>
>> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages
>
> Very nice! Would be awesome if you contribute it as a code snippet on 
> http://extensions.xwiki.org ! :)
>
> Thanks
> -Vincent
>

Yes, very nice page.
More than snippet, generated table could be in Code Macro page
itselft, couldn't it?

I directly put in application the page nad update on my own wiki a
page where I have ViM code, and I get the following error
org.xwiki.rendering.macro.MacroExecutionException: Failed to highlight content
at 
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:121)
at 
org.xwiki.rendering.internal.macro.code.CodeMacro.parseContent(CodeMacro.java:51)
[...]
Caused by: Traceback (most recent call last):
  File "", line 3, in 
  File "", line 3, in 
  File "__pyclasspath__/pygments/lexers/__init__.py", line 75, in
get_lexer_by_name
  File "__pyclasspath__/pygments/lexer.py", line 451, in __call__
  File "__pyclasspath__/pygments/lexers/text.py", line 791, in __init__
java.lang.ClassFormatError: Invalid method Code length 79892 in class
file pygments/lexers/_vimbuiltins$py
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at 
org.python.core.BytecodeLoader$Loader.loadClassFromBytes(BytecodeLoader.java:119)
at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java:37)
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:67)
at org.python.core.util.importer.getModuleCode(importer.java:217)
at org.python.core.util.importer.importer_load_module(importer.java:95)
at 
org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
at 
org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown
Source)
at 
org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:513)
at org.python.core.imp.find_module(imp.java:467)
at org.python.core.PyModule.impAttr(PyModule.java:100)
at org.python.core.imp.import_next(imp.java:715)
at org.python.core.imp.import_logic(imp.java:777)
at org.python.core.imp.import_name(imp.java:839)
at org.python.core.imp.importName(imp.java:884)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importFromAs(imp.java:978)
at org.python.core.imp.importFrom(imp.java:954)
at 
pygments.lexers.text$py.__init__$25(__pyclasspath__/pygments/lexers/text.py:796)
at 
pygments.lexers.text$py.call_function(__pyclasspath__/pygments/lexers/text.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
at org.python.core.PyFunction.__call__(PyFunction.java:387)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
at org.python.core.PyMethod.__call__(PyMethod.java:211)
at org.python.core.PyMethod.__call__(PyMethod.java:206)
at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
at 
org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1057)
at org.python.core.PyType.type___call__(PyType.java:1565)
at org.python.core.PyType$type___call___exposer.__call__(Unknown Source)
at 
org.python.core.PyMethodDescr.method_descriptor___call__(PyMethodDescr.java:54)
at org.python.core.PyMethodDescr.__call__(PyMethodDescr.java:43)
at org.python.core.PyObject._callextra(PyObject.java:527)
at pygments.lexer$py.__call__$38(__pyclasspath__/pygments/lexer.py:451)
at pygments.lexer$py.call_function(__pyclasspath__/pygments/lexer.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
at org.python.core.PyFunction.__call__(PyFunction.java:387)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:220)
at org.python.core.PyMethod.__call__(PyMethod.java:211)
at org.python.core.PyMethod.__call__(PyMethod.java:206)
at org.python.core.PyTyp

Re: [xwiki-users] Overview of supported languages for the code macro

2013-01-21 Thread Vincent Massol
Hi Richard,

On Jan 21, 2013, at 9:10 PM, Richard Hierlmeier  
wrote:

> 
> Hi XWiki users,
> 
> I could not find in the XWiki documentation a hint of the supported languages 
> for the code macro.
> 
> I wrote a small script in a XWiki page that read out of pygment (the 
> technology behind the code macro) all supported languages with language name, 
> files extension and mimetype.
> 
> See:
> 
> http://www.hierlmeier.de/wiki/bin/view/Main/SupportedCodeMacroLanguages

Very nice! Would be awesome if you contribute it as a code snippet on 
http://extensions.xwiki.org ! :)

Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users