In Spotlight you can enable and disable file categories that will appear in search results.
How does Spotlight determine that a certain file belongs to a certain category?
The following specific event triggered this curiosity:
For some time .tex
files would come up under the Documents category. Spotlight would handle the search filename.tex
just fine. Then suddenly I could not find .tex
files anymore in Spotlight. Finder searches were OK though.
Turns out that I had the Developer category disabled in the Spotlight preferences, and Spotlight now thought that .tex
files belonged in that category. After enabling the Developer category everything went back to normal.
What made Spotlight decide to switch categories for the .tex
files?
Best Answer
I think it depends on the parent UTIs defined in an application's Info.plist or in
/System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
..tex
is not included in the CoreTypes Info.plist, so the UTI depends on which application's UTI declaration was registered first. For example on my installation the UTI wascom.barebones.bbedit.tex-source
and the first parent UTI waspublic.source-code
:When I deleted BBEdit and rebuilt the Launch Services database, the UTI became
org.tug.tex
and the first parent UTI becamepublic.text
: