I am trying TextMate on two machines, both PPC. One machine displays subversion diffs with colours (the default behaviour, I believe), but the other has plain old black text with white background. I am not aware of having made any selections that should have caused the difference in behaviour between the two machines. I looked in the Preferences -> Fonts and Colors on the machine with no colours in the diffs, and I see nothing that appears to be related to diffs. I moved ~/Library/Preferences/com.macromates.textmate.plist aside and started TextMate again, but the diffs are still monochrome. Where else should I look?
TIA,
Kevin Horton Ottawa, Canada
On 25 Jul 2007, at 14:07, Kevin Horton wrote:
I am trying TextMate on two machines, both PPC. One machine displays subversion diffs with colours (the default behaviour, I believe), but the other has plain old black text with white background. I am not aware of having made any selections that should have caused the difference in behaviour between the two machines. I looked in the Preferences -> Fonts and Colors on the machine with no colours in the diffs, and I see nothing that appears to be related to diffs. I moved ~/Library/Preferences/ com.macromates.textmate.plist aside and started TextMate again, but the diffs are still monochrome. Where else should I look?
Have you set the language to Diff in the status bar?
On 25 Jul 2007, at 09:28, Ciarán Walsh wrote:
On 25 Jul 2007, at 14:07, Kevin Horton wrote:
I am trying TextMate on two machines, both PPC. One machine displays subversion diffs with colours (the default behaviour, I believe), but the other has plain old black text with white background. I am not aware of having made any selections that should have caused the difference in behaviour between the two machines. I looked in the Preferences -> Fonts and Colors on the machine with no colours in the diffs, and I see nothing that appears to be related to diffs. I moved ~/Library/Preferences/ com.macromates.textmate.plist aside and started TextMate again, but the diffs are still monochrome. Where else should I look?
Have you set the language to Diff in the status bar?
Ahh. That gives me coloured diffs. Thanks.
But, there is still a puzzling difference in behaviour between the two machines. On one machine, diffs are automatically detected as language Diff. On the other machine, they come up as language Plain Text. What could explain the difference?
Kevin Horton Ottawa, Canada
On 25 Jul 2007, at 15:01, Kevin Horton wrote:
there is still a puzzling difference in behaviour between the two machines. On one machine, diffs are automatically detected as language Diff. On the other machine, they come up as language Plain Text.
How are you getting the diffs into TM? The language is associated with the file extension, so if you changed a .diff file to Diff it should now be stored that way
On 25 Jul 2007, at 10:30, Ciarán Walsh wrote:
On 25 Jul 2007, at 15:01, Kevin Horton wrote:
there is still a puzzling difference in behaviour between the two machines. On one machine, diffs are automatically detected as language Diff. On the other machine, they come up as language Plain Text.
How are you getting the diffs into TM? The language is associated with the file extension, so if you changed a .diff file to Diff it should now be stored that way
On both machines I am using the command "Diff with Newest (HEAD)" from the Subversion bundle. Both machines have the same version of subversion, installed in the same place. Neither machine has any TM_* environment variables set.
Kevin Horton Ottawa, Canada
I get different behavior depending on how I run the diff command.
If I do an svn stat and then press the diff button next to a file, then I get a file/window with some random name and a .txt extension. This does not show up formatted as a diff file but rather shows up as restructured text, which is my usual setting for .txt files.
But if I do a diff on a single file by choosing diff from the subversion menu then the diff shows up in an untitled window and is colored appropriately.
It seems like coming up with some standard extension to use for these temporary diff files would be a reasonable way to get consistent behavior...
Brad
On 7/25/07, Kevin Horton khorton01@rogers.com wrote:
On 25 Jul 2007, at 10:30, Ciarán Walsh wrote:
On 25 Jul 2007, at 15:01, Kevin Horton wrote:
there is still a puzzling difference in behaviour between the two machines. On one machine, diffs are automatically detected as language Diff. On the other machine, they come up as language Plain Text.
How are you getting the diffs into TM? The language is associated with the file extension, so if you changed a .diff file to Diff it should now be stored that way
On both machines I am using the command "Diff with Newest (HEAD)" from the Subversion bundle. Both machines have the same version of subversion, installed in the same place. Neither machine has any TM_* environment variables set.
Kevin Horton Ottawa, Canada
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 25. Jul 2007, at 16:43, Brad Miller wrote:
[...] It seems like coming up with some standard extension to use for these temporary diff files would be a reasonable way to get consistent behavior...
We do always color “.diff” files as diff. In addition to that, we have a first-line match which catches most diff variants.
The problem is when the file has a .txt extension *and* TM has recorded an explicit preference for .txt files (like in your case, where they are assigned to reStructuredText).
The various commands that produce diff files shouldn’t use .txt as an extension for these (as it will fail in the above case), the reason is mainly that they just do: ‘svn diff …|mate’ and then it is mate which puts .txt on the temporary file resulting from this -- something I’d rather fix, than change all those commands :)
On 25 Jul 2007, at 10:01, Kevin Horton wrote:
On 25 Jul 2007, at 09:28, Ciarán Walsh wrote:
On 25 Jul 2007, at 14:07, Kevin Horton wrote:
I am trying TextMate on two machines, both PPC. One machine displays subversion diffs with colours (the default behaviour, I believe), but the other has plain old black text with white background. I am not aware of having made any selections that should have caused the difference in behaviour between the two machines. I looked in the Preferences -> Fonts and Colors on the machine with no colours in the diffs, and I see nothing that appears to be related to diffs. I moved ~/Library/Preferences/ com.macromates.textmate.plist aside and started TextMate again, but the diffs are still monochrome. Where else should I look?
Have you set the language to Diff in the status bar?
Ahh. That gives me coloured diffs. Thanks.
But, there is still a puzzling difference in behaviour between the two machines. On one machine, diffs are automatically detected as language Diff. On the other machine, they come up as language Plain Text. What could explain the difference?
I've finally found why the two machines behaved differently. On the machine that did not detect diffs as language Diff, today I noted that the first line of the diff was actually a ruby warning that my ~/ bin directory was world writable. I changed the permissions, and now the diffs do not have that warning as the first line, and they are automatically detected as language Diff.
I am left with one comment - if it is important that my ~/bin not be world writable, perhaps there is a better way to inform the user than hide a warning line at the top of a diff. Given that this is the only time TextMate has warned me about this, I suspect that it is not considered a TextMate concern, and ruby is the culprit. Perhaps this ruby warning should be caught, and not make it to the diffs.
Kevin Horton Ottawa, Canada
On 30. Jul 2007, at 14:18, Kevin Horton wrote:
[...] I am left with one comment - if it is important that my ~/bin not be world writable, perhaps there is a better way to inform the user than hide a warning line at the top of a diff. Given that this is the only time TextMate has warned me about this, I suspect that it is not considered a TextMate concern, and ruby is the culprit. Perhaps this ruby warning should be caught, and not make it to the diffs.
The error is from Ruby, or some underlying system function, which just prints the error when it finds that something in the current working directory is world-writable (or something like that).
There is no nice way to catch this specific error -- and probably it should generally just be addressed when the error appears.