Using Spotlight from Mew
You can use Spotlight of Mac from Mew both on Emacs 21 and Emacs 22.
Installing MewImporter
To make indexes of e-mail messages, you need to install MewImporter made by Mr. Izawa. Obtain MewImporter.mdimporter.tar.gz and copy it to "~/Library/Spotlight/".
To tell whether or not Mew Importer is actually installed, type as follows:
% mdimport -L
If a string "MewImporter" is displayed, it's OK.
Then, make a test with "lsregister". This command is stored in the following directory:
MacOS 10.4.x: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/ MacOS 10.5.x: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/
For readability, this prefix is omitted in this document.
Execute "lsregister" as follows:
% lsregister -dump
If you find the following string, the ".mew" suffix and the "MewX" data type are bound to MewImporter.
tags: .mew, 'MewX'
If not, type as follows:
% lsregister -f ~/Library/Spotlight/MewImporter.mdimporter
Then repeat the test above.
If you find multiple entries for ".mew" and feel somthing wrong, type the followings to fix it:
% lsregister -kill -r -domain local -domain system -domain user
Note that this command would make some information (e.g you have used WORD) lost.
Making Indexes
You need to make indexes to currently existing e-mail messages. There are two ways to do it:
- Use Emacs 22. Since Emacs 22 can set data type, Spotlight will automatically make indexes. If you take this way, type "kM" in Summary mode of Mew to set the data type to your e-mail messages.
- Add the ".mew" suffix to your e-mail messages. For more information, please refer to the suffix page. Then Spotlight will automatically make indexes. You do NOT have to rebuild Summary mode with "s" + "all".
Indexes will be automatically made for newly stored messages.
Testing the Indexes
With an appropriate e-mail message, type as follows to see if an index for the message was made:
% mdls 123
If you can find a value for the kMDItemRecipients property, you succeeded.
Searching Messages
Please refer to the Search section of the Mew manual for concrete usage.
Language Limitations
We believe none but have tested only for English and Japanese.