[OS X TeX] tex files and smart folders

Adam R. Maxwell amaxwell at mac.com
Fri Jul 27 19:25:05 EDT 2007


On Jul 27, 2007, at 16:02, Maarten Sneep wrote:

> On Jul 28, 2007, at 00:27, Adam R. Maxwell wrote:
>
>>
>> Try changing it to <string>(kMDItemDisplayName = "*.tex"cd)  
>> && (kMDItemContentType != com.apple.mail.emlx) &&  
>> (kMDItemContentType != public.vcard)</string>.  Earlier versions of  
>> TeXShop probably don't export a kMDItemKind of 'TeX Document'.
>
> Isn't it better (more robust) to use kMDItemFSName instead of  
> kMDItemDisplayName? I believe that if the preferences are set to  
> hide extensions, the kMDItemDisplayName will not include .tex, and  
> thus never give a result here. kMDItemFSName is the name as used on  
> disk, and always includes the extension.

Yeah, that sounds right.  I used Finder's UI to set it up, and it  
chose kMDItemDisplayName.  The most robust way would be to use  
kMDItemContentType, if you have a program that exports a UTI for .tex  
files.

It's strange that Scott is seeing this behavior in the first place, so  
it would be interesting to see the output of `mdls filname.tex` for a  
file that shows up in the smart folder and a file that doesn't show up.

-- 
Adam

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list