[SVN] Re: New version of source-highlight (Brad Miller) (Allan Odgaard)

Paulo Moura pmoura at di.ubi.pt
Thu Aug 11 21:18:28 UTC 2005


Hi Brad,

> On 06/08/2005, at 17.16, Paulo Moura wrote:
>
>> [...] An easier solution, and this is my proposal, is to use an
>> user-installed version of source-highlight (we can point interested
>> users to DarwinPorts or Fink) instead of providing its binary
>> inside the TextMate application bundle.
>>
>
> Now it uses "${TM_SRC_HIGHLIGHT:=source-highlight}".
>
> I also changed it so that the Support/bin is last in the path, so if
> you have your own source-highlight (in the path), it should use that
> one (if it's not in the path: set TM_SRC_HIGHLIGHT).
>
> I think this is a pretty good compromise!?!

Agree. There is still an issue when using an user-installed source- 
highlight 2.1 or later version. This version allows us to view LaTeX  
files as (X)HTML. However, the "Source" commands "View source as  
HTML" and "Source to HTML" expect *source* code files, not *text*  
files. As such, when trying the commands on a LaTeX file, we get the  
error:

     source-highlight: source language text.latex not handled

The problem lies on the following line on the commands code:

     lang=$(perl <<<$TM_SCOPE -pe 's/.*\bsource\.([^. ]*).*/ 
$1/')

Maybe we should change it to accept both source.* and text.*.

Cheers,

Paulo


-----------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Informatics                   Office 4.3  Ext. 3257
University of Beira Interior          Phone: +351 275319700
6201-001 Covilhã                      Fax:   +351 275319899
Portugal

<mailto:pmoura at di.ubi.pt>
<http://www.di.ubi.pt/~pmoura>     <http://www.logtalk.org>
-----------------------------------------------------------





More information about the textmate-dev mailing list