Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-23 Thread Patrice Dumas
On Sat, Nov 23, 2024 at 12:16:14AM +, Carlos Maniero wrote: > > I agree, it would be better to use HIGHLIGHT_SYNTAX. If the value is > > not a known value, then the command would be called. I prefer a called > > with fixed informations rather than %X arguments replacement. That > > means tha

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-22 Thread Carlos Maniero
> I agree, it would be better to use HIGHLIGHT_SYNTAX. If the value is > not a known value, then the command would be called. I prefer a called > with fixed informations rather than %X arguments replacement. That > means that users would have to use wrappers to translate the arguments > to a com

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-22 Thread Patrice Dumas
On Thu, Nov 21, 2024 at 04:42:24PM +, Carlos Maniero wrote: > There is another point that is good to mention: If *HIGHLIGHT_SYNTAX* > is set to anything other than "highlight" or "pygments" it defaults to > *source-highlight*. So, if the user set "./myscript.pl" as > *HIGHLIGHT_SYNTAX* without

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-22 Thread Patrice Dumas
On Thu, Nov 21, 2024 at 08:05:46AM +0200, Eli Zaretskii wrote: > Thanks, but I don't think I understand why you need a new variable. > Just teach texi2any that some specially-formatted value of > HIGHLIGHT_SYNTAX means to use whatever program is specified by the > value. For example, if the value

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-21 Thread Carlos Maniero
> +++ b/tp/ext/highlight_syntax_cmd.pm > > > @@ -0,0 +1,154 @@

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-21 Thread Carlos Maniero
> We could also have placeholders for > command-line arguments, e.g. "(SOMETHING %i %o)" means invoke > SOMETHING with a single command-line argument where %i is substituted > by the name of a file with the code to be highlighted ("input") and %o > with the name of the file to write the results ("o

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-21 Thread Eli Zaretskii
> Cc: > From: "Carlos Maniero" > Date: Thu, 21 Nov 2024 16:42:24 + (UTC) > > > We could also have placeholders for > > command-line arguments, e.g. "(SOMETHING %i %o)" means invoke > > SOMETHING with a single command-line argument where %i is substituted > > by the name of a file with the co

Re: [PATCH] syntax highlight: allows any program to be used as a syntax highlighter

2024-11-20 Thread Eli Zaretskii
> From: Carlos Maniero > Cc: Carlos Maniero > Date: Wed, 20 Nov 2024 19:41:33 + (UTC) > > The HIGHLIGHT_SYNTAX is great and is suitable for most of the cases. > However, since it works with a predefined set of supported programs it > limits the user's options and requires the text2any to gro