As you probably know, I'm trying to write a new AsciiDoc bundle from the ground up. When I created this bundle, my tmLanguage file was named untitled.tmLanguage even though I have entered AsciiDoc in the bundle editor as the name of the language grammar. My question is, how can I rename this file asciidoc.tmLanguage? (If I do it directly in the Finder, TextMate simply loses track of the file altogether and thinks I no longer have a language grammar.) 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
I solved this but I don't know how. :(
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...
m.
On Feb 11, 2014, at 3:51 PM, Matt Neuburg matt@tidbits.com wrote:
As you probably know, I'm trying to write a new AsciiDoc bundle from the ground up. When I created this bundle, my tmLanguage file was named untitled.tmLanguage even though I have entered AsciiDoc in the bundle editor as the name of the language grammar. My question is, how can I rename this file asciidoc.tmLanguage? (If I do it directly in the Finder, TextMate simply loses track of the file altogether and thinks I no longer have a language grammar.) 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
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).
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
On 12 Feb 2014, at 12:34, Matt Neuburg wrote:
[…] 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
The issue I refer to is that it is not at all uncommon that we rename bundle items. If we do that, and TextMate changes names on disk, we have to manually tell the VCS about the rename, and the history of the item gets harder to extract. This is why we decided to newer let TM rename files on disk.
Most users do not care about the names on disk (they are not visible), bundle authors (using VC) would be bothered if TM would rename files on disk. Yes, you have to do some extra work before publishing a bundle, but even if TM had given you perfect names, you would still have to dig into the bundle to initialize the repository…
[…] there would have been _no problem at all_ if TextMate had just behaved in a sensible way
The problem is that we cannot know, unless TextMate has code for all potential version control systems in existance now and the future.
On Feb 11, 2014, at 9:12 PM, Allan Odgaard mailinglist@textmate.org wrote:
The first time you save the new grammar, it is given a name. So generally when creating new items, name them before saving them.
By the way, I think you are wrong about this. I think I am right and there is a bug. I am being _very_ careful and yet I keep getting these untitled files. For example I just created a smart pair rules file and I was careful not to save until I had given it a name, but then when I went to check it in with git, it turned out it was untitled.
-- 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
On 13 Feb 2014, at 9:06, Matt Neuburg wrote:
On Feb 11, 2014, at 9:12 PM, Allan Odgaard mailinglist@textmate.org wrote:
The first time you save the new grammar, it is given a name. So generally when creating new items, name them before saving them.
By the way, I think you are wrong about this […]
Should be simple to test and provide “steps to reproduce” if it behaves contrary to expected behavior ;)
On Feb 12, 2014, at 6:32 PM, Allan Odgaard mailinglist@textmate.org wrote:
Should be simple to test and provide “steps to reproduce” if it behaves contrary to expected behavior ;)
I don't know what is "expected". I'm just saying that what I'm seeing is annoying and inconvenient because I keep having to dive into the bundle and rename things manually. 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
On 13 Feb 2014, at 23:32, Matt Neuburg wrote:
On Feb 12, 2014, at 6:32 PM, Allan Odgaard mailinglist@textmate.org wrote:
Should be simple to test and provide “steps to reproduce” if it behaves contrary to expected behavior ;)
I don't know what is "expected". I'm just saying that what I'm seeing is annoying and inconvenient because I keep having to dive into the bundle and rename things manually.
What I mean is that instead of saying “I think things are not working as they should” (paraphrasing) then tell me what you did, what you got, and what you expected, i.e. following the recipe at https://github.com/textmate/textmate/wiki/Writing-Bug-Reports
This makes it easier for me to determine if there is an addressable issue.