[TxMt] Re: question: how to insert a "\" - NOT WORKING

Piero D'Ancona pierodancona at gmail.com
Tue Sep 26 15:34:01 UTC 2006


> Allan Odgaard <throw-away-1 <at> ...> writes:
> 
> > 
> > On 26/9/2006, at 11:27, Piero D'Ancona wrote:
> > 
> > > [...] osascript -s 'tell app "TextMate" to insert "\"'
> > >
> > > I want to do the same from a javascript
> > > contained in an a href link. But I can not find the
> > > correct way to escape things [...]
> > 
> > Use \\ for one backslash in JavaScript strings.
> > 

I confirm what I said: it does not work. Try the following html:

<a href="javascript:TextMate.system("/usr/bin/osascript 
	&>/dev/null -e 'tell app \"TextMate\" to insert 
	\"\\eqref\"' &&quot, null);">try</a>

A link is produced but if you click on it nothing happens. (if you
put \eqref instead of \\eqref, the text "eqref" is inserted).
Sorry! something here really escapes me, as usual

Piero





More information about the textmate mailing list