I noticed strange behavior today in Dolphin. When browsing a directory of matlab scripts (*.m files) the file type reported by dolphin was inconsistent. Files were either reported as Objective-C source code, MATLAB script/function, or TeX documents. Objective-C or MATLAB are fine since the file associations are setup for that and they both have *.m extensions, but I can't explain why Dolphin would identify a *.m file as a TeX document. I checked in the file association setting and *.m does not map to any type of TeX document.
I tested further, and it turns out that if I remove the "%" from the first line in the file then Dolphin says it is either Objective-C or MATLAB. The "%" character starts comments in TeX, MATLAB, and Octave so it makes sense the there could be some confusion between MATLAB and TeX if the file extension is not known. But why would it set the type as TeX when the file has a .m extension? Is this intended behavior?
I tested further, and it turns out that if I remove the "%" from the first line in the file then Dolphin says it is either Objective-C or MATLAB. The "%" character starts comments in TeX, MATLAB, and Octave so it makes sense the there could be some confusion between MATLAB and TeX if the file extension is not known. But why would it set the type as TeX when the file has a .m extension? Is this intended behavior?
Comment