[TxMt] TextMate selectively refuses to open files.

Josh DiMauro josh at metacarpal.net
Sat Mar 18 19:55:56 UTC 2006


A search of the ML archives has come up empty, so I turn to the  
mothership: I have a problem.

Textmate is selectively refusing to open (or, rather, display) files  
that it should have no problem with.

Some quick and dirty testing seems to indicate that this has to do  
with specific file extensions. It first manifested with a problem in  
using the "Edit in TextMate" command, but now I fear it's more  
widespread than that.

First, an example to show what the behavior is like. Then, how it  
affects the whole system.

### Illustrative Example ###

At the moment I am writing this email in TextMate, via using the  
"Edit in TextMate" command.

The file:

/private/var/tmp/folders.501/TemporaryItems/Trouble with "Edit in  
Textmate".mail

opens just fine in TextMate. An experiment shows that I can open it  
fine from the Finder by dragging it onto the TM icon.

However, when I tried to write this email from gmail, and used the  
"Edit in TextMate" command from within Safari, it changes focus to  
TextMate, but no file opens.

A file has been created:

/private/var/tmp/folders.501/TemporaryItems/Loading “Gmail - Compose  
Mail”.safari

But textmate won't open it, not via File:Open, not via a drag to the  
dock, and not via Get Info association of .safari files with TextMate.

__However__. If I select _more than one_ .safari file in the Finder,  
and drag them to the TextMate, a very odd thing happens.

Textmate opens a new project with the three files listed. But  
clicking on one of those files doesn't actually open the file:

![TextMate Project Blank Tab](http://images.metacarpal.net/blog/ 
textmateoddbehavior1.png)

You get a blank tab. Clicking on that tab _does_ display the file:

![TextMate Project Clicked Tab](http://images.metacarpal.net/blog/ 
textmateoddbehavior2.png)

So there's something odd going on here.

Another wrinkle is that, once you've clicked the tab and closed it  
once, it opens properly from the Project drawer. But not from the  
Finder or File:Open or the "Edit in TextMate" command.

(Yes, I am OCD about checking things like this out, why do you ask?)

I thought this was just for items in the TemporaryItems folder. But,  
it seems, I was wrong about that. I dragged a .safari file to the  
desktop and tried to open from there. No dice. Same odd multiple-item  
behavior.

### The Real Problem ###

The loss of "Edit in TextMate" from the browser is, for me, bad  
enough. I have tasted the "real text editor for the browser" crack,  
and I'm hooked.

But what really gets me is that this started with .php files, in  
Transmit. And I can't open .php files at all.

I first edited a .php file remotely in Transmit, off my SFTP server.  
Saved the contents, got a system beep, closed it. Totally normal,  
except that after that, .php files broke.

Same behavior as above: I try double-clicking a .php file in the  
Finder, I get TextMate open and nothing else; no document window,  
nothing. Multiple .php files = a new project with multiple files in  
the drawer. Clicking one gets a blank tab. Clicking the tab shows the  
file.

Now, I _can_ edit non-php files remotely in Transmit. HTML works  
fine. Python works fine. But no .php

Naturally, I spend most of my remote time editing .php files these  
days. :/

I'd prefer not to have to totally nuke TextMate, but I would really  
dearly love to have a functional text editor.

Thanks in advance.

Cheers,
-- 
Josh DiMauro
josh at metacarpal.net
http://blog.metacarpal.net





More information about the textmate mailing list