Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Make Finder find Mail messages and all vcards System 10.4
Tiger only hintBy default, the Finder excludes Mail.app mail messages and Address Book vcards from searches. This exclusion does not appear in the default_smart.plist file inside the Finder bundle. However, if you save a search as a smart folder and then open it with a text editor, you will see these exclusions included as part of the "RAW" query, as seen here (line breaks added for readability):
<string>(* = "Search_Phrase*"wcd || kMDItemTextContent = "Search_Phrase*"cd) 
  && (kMDItemContentType != com.apple.mail.emlx) 
  && (kMDItemContentType != public.vcard)</string>
Rather then ponder the question of why these types are excluded, here is a (not for the feint-of-heart!) way of making the Finder find such items.

To do this hack, you need HexEdit, and you'll also need to either enable the root user and log in as them, or use Pseudo to launch HexEdit with admin privileges, or something similar.
  1. Open the /System/Library/CoreServices/ folder in the Finder.
  2. Control-click or right-click on the Finder and choose Show Package Contents from the pop-up.
  3. Navigate your way into the Contents/MacOS/ folder.
  4. Make a backup of the "Finder" executable (drag it to your Desktop).
  5. Launch the program HexEdit with admin/root privileges as noted above.
  6. Drag the "Finder" executable file onto HexEdit
  7. Search for the string (without the quotes, but including the leading space!), ' && (^1 != ^2) && (^1 != ^3)'.
  8. Make note of where this string starts and stops in the hex side of the window.
  9. In the hex side of the window, select the first of these (the space) and then change it and all the hex values of the string to 00. Be very sure to change the right number of them! Unfortunately, HexEdit doesn't seem to have a "type over" mode, so this is more of a pain then it should be.
  10. Quit and relaunch the Finder. One way to do this is to go to the Terminal and type killall Finder.
Enjoy your new found Finder mail message and vcard searching ways!

[robg adds: If you run a Finder search, you'll see that it does, in fact, return vCard matches from Address Book. After some digging, I believe I've figured out that the exclusion shown above (for public.vcard files) is there to exclude any networked Address Book data. So theoretically, making this change to your Finder will let you see the networked entries as well. However, I have not tested this hint, so I can't say for sure. But without any changes, the Finder will show the local vcards (but not Mail matches)...]
    •    
  • Currently 2.40 / 5
  You rated: 4 / 5 (5 votes cast)
 
[9,240 views]  

10.4: Make Finder find Mail messages and all vcards | 1 comments | Create New Account
Click here to return to the '10.4: Make Finder find Mail messages and all vcards' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Make Finder find Mail messages and all vcards
Authored by: KSchlz on Jan 17, '06 11:04:28PM

Hi
I tried this.
It is kind of dangerous, but somehow works. When you changed the Finder you can now search for emlx in the Finder. As any other file. You cannot though, search for them in the spotlight window (Apple-space bar). If I search there, I cannot find the emails. In the Finder I can.
The strange thing is, in the results window you see the emails with the Subject.
When you click on them (not double click) it changes to the file name, something like 3213.emlx. And sometimes the result window will mix the output without anything you have to do.
This is confusing. And worries me.
I wish Apple would allow searching for emails as for any other document.



[ Reply to This | # ]