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:
MacOS 10.5.x:

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:

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.