On Feb 11, 2014, at 9:12 PM, Allan Odgaard mailinglist@textmate.org wrote:
On 12 Feb 2014, at 10:10, Matt Neuburg wrote:
I would like to suggest that it is a bug that when you create a bundle the grammar file is named untitled.tmLanguage even after you change the name of the grammar in the bundle editor. I should not have had to reach into the innards of the bundle in order to do this...
The first time you save the new grammar, it is given a name. So generally when creating new items, name them before saving them.
The reason it does not update the name on disk is because it can cause version control issues.
It should be possible to manually rename in Finder or a terminal (TextMate does consider it the same, but if you have the fs-events issue/bug, you should delete the bundle index in Library/Caches after renaming it and then relaunch TextMate).
I believe I created the grammar file in a perfectly natural way. Perhaps I saved it before naming it, perhaps not; I can't possibly remember that. The problem is that the user doesn't know what is happening to the name of the tmLanguage file. People do not normally look inside their bundles! People expect the program to behave sensibly. In my opinion, it does not.
Now, however, since I intend to release this bundle publicly pretty soon, I find I must grapple with the matter - I can't leave the grammar file with the name untitled.tmLanguage; people are going to see this name in github. So I had to change its name _now_. Therefore I am having those version control issues _now_. Well, it would have been better to give me those issues before I had actually written any of the grammar, don't you think??? At that time, there was no history to lose, if you see what I mean. In fact, at that time I had not yet put the bundle under version control at all, so there would have been _no problem at all_ if TextMate had just behaved in a sensible way. m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com