[TxMt] (no subject)

Rob McBroom textmate at skurfer.com
Wed Jun 21 18:20:39 UTC 2006


On Jun 21, 2006, at 11:59 AM, Allan Odgaard wrote:

> As for editing the Info.plist, create a patch of the Info.plist  
> (using diff -u) and apply it, instead of “hand editing.”
>
> So your script should boil down to:
>
>    patch …/Info.plist <tm_info_plist.patch
>    lsregister …
>    killall Finder
>
> To automate it further, put in a LaunchAgent which monitors  
> TextMate’s Info.plist and runs the script when that file has  
> changed (which would happen after an update) -- actually, I am not  
> exactly sure if the notify would work on the Info.plist, depends on  
> how LA works. But you likely could monitor TextMate.app.

Good idea. I'll most likely do this for now.

>> Or could it just be removed?
>
> Before I added it, I had a question roughly every week about “how  
> can I make files w/o extension open with TM” — since I added it,  
> I’ve had 3 people comment on the disadvantage of the feature,  
> yours included

Fair enough. I was aware of the difficulties you described with  
making it a preference, but I thought suggesting outright removal  
alone would be too presumptuous. :) Based on what a minority I seem  
to be in, it looks like I was right.

>> Personally, I use Path Finder, which allows you to right-click any  
>> file and open with the [GUI] editor of your choice.
>
> If you are using Path Finder, then there is the possibility to file  
> a request with them, about their current handling of this.

Well, I mentioned it because I like the feature, so I wouldn't really  
have anything to ask them for. I suppose a keyboard shortcut for this  
menu option would make it even nicer, like ⌘E to "edit". I tried to  
add it in System Preferences, but it isn't working. My guess is that  
because you can specify an editor in Path Finder's prefs, the name of  
the menu could change, so while the menu item might look look like  
"Open with TextMate" to me, to the system, it probably looks like  
"Open with $EDITOR_THE_USER_CHOSE" or something.

> AFAICT Finder has this procedure for determining a file type:
>
> 1) does LS return an app for it? use that apps definition
> 2) does the file have a scpt extension? then it’s an AppleScript
> 3) is the file executable? then assign Terminal to it
> 4) everything else failed: give it to TextEdit
>
> To the best of my knowledge, the applications used for step 3 and 4  
> are hardcoded.
>
> The “problem” here is that suddenly TM is returned in step 1,  
> not because TM says it can handle executable files,

Yes, I suppose a proper fix would depend on Apple.

> but because it says that it can handle everything, and no other app  
> says that,

I can't help thinking that this was no accident (i.e. no app is  
*supposed* to say it handles everything), but I'll shut up about it now.

> nor does Terminal say that it can handle executable files, thus  
> TextMate is chosen simply because no other app can apparently  
> handle the file.

I would actually like such files to open in TextMate when double- 
clicked, rather than be executed (which I imagine Terminal would do).  
If I want to execute one I'll do it from the command line. It's just  
that I would also like them to be correctly identified by the Finder,  
etc.

> I am aware of the problem, so there is no need to file a request,  
> unless the request is specific about a clean solution to the problem.

OK, I'll forget about the feature request aspect, but maybe a Howto  
on manually disabling would be useful?

Rob


More information about the textmate mailing list