[OS X TeX] status of Spotlight indexing of .tex files?

Frank STENGEL fstengel at mac.com
Wed Dec 7 11:52:37 CET 2005


Just to add to the conundrum: If I create a TeX file using textures  
(which adds a resource fork) then mdimport works perfectly. It gives  
say (I edited the paths):


2005-12-07 10:39:01.647 mdimport[11497] Import '/editedPath/ 
Numero-6.tex' type 'com.apple.traditional-mac-plain-text' using  
'file://localhost/System/Library/Spotlight/RichText.mdimporter/'
2005-12-07 10:39:01.727 mdimport[11497] Sending attributes of '/ 
editedPath/Numero-6.tex' to server.  Attributes: '{
     "_kMDItemImporterCrashed" = <null>;
     "com_apple_metadata_modtime" = 151352554;
     kMDItemAuthors = <null>;
     kMDItemComment = <null>;
     kMDItemContentCreationDate = 2005-10-12 12:04:24 +0000;
     kMDItemContentModificationDate = 2005-10-18 18:22:34 +0000;
     kMDItemContentType = "com.apple.traditional-mac-plain-text";
     kMDItemContentTypeTree = (
         "com.apple.traditional-mac-plain-text",
         "public.plain-text",
         "public.text",
         "public.data",
         "public.item",
         "public.content"
     );
     kMDItemCopyright = <null>;
     kMDItemDisplayName = {"" = "Numero-6.tex"; };
     kMDItemKeywords = <null>;
     kMDItemKind = {"" = TeX; };
     kMDItemOrganizations = <null>;
     kMDItemSubject = <null>;
     kMDItemTextContent = "\\documentclass[a5paper,twoside,  
reversehead]{polycopies\
....

If I open the same file and save it with TeXShop then, well what we  
get is the "dyn.xxxxx" behaviour (i.e. no importer). Of course, if I  
rename the file to "Numero-6.txt" then everything works as expected  
(no surprise here).

So the long and short is that mdimport uses the presence of the  
resource fork to help ascertaining the type of the file being  
imported. Basically, if there is a resource fork it will look at the  
type code to determine the importer to be used if it can't find one  
using the extension...


-- 
Frank STENGEL (fstengel<at>mac.com)

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list