[TxMt] Problems with Output: Show as HTML

Chris Brierley thebrier at gmail.com
Fri Mar 25 19:59:10 UTC 2005


I'm a little perplexed by this because I've searched the list and
can't find anyone else having this problem, so I'm starting to wonder
if it's just happening to me for some reason.

In the default W3C Validation command for HTML, which uses "Show as
HTML" for output, the perl filter leaves off the url part of the txmt
URL, which causes the frontmost TextMate window to be used as the
target rather than finding an explicit file. The problem is that
whenever you use that command (or I assume any command with HTML
output), the HTML output window *is* the frontmost window and so a
txmt URL without the file specified can't work.

Isn't anyone else seeing this?

It seems to me that the only way for this to work would be if the
output window wasn't counted when looking for the frontmost window. Is
that possible?

I've fixed this problem for myself by changing the W3C validation command to:

,-----
curl 2>/dev/null -F uploaded_file=@/dev/stdin\;type=text/html
http://validator.w3.org/check \
| perl -pe 's#(Line (\d+), column (\d+))#<a
href="txmt:\/\/open?url=file://$ENV{TM_FILEPATH}&line=$2&column=@{[$3
+ 1]}">$1<\/a>#'
`-----

...but I'm intrigued that no one else is reporting this problem. Does
this not happen for others?

Thanks much.



More information about the textmate mailing list