[MlMt] smart mailbox to select emojis
John Doherty
jld at jld3.net
Mon Mar 27 00:09:08 EDT 2023
What I ended up doing here was not elegant and maybe slightly
underhanded but seems OK.
First I selected all the messages in my inbox and used
Command->MailMate->Copy Subjects and pasted that into BBEdit.
Did a little work there to reduce it to a list of 103 emojis. Then I
created a smart mailbox to select messages whose subjects included three
of them, just using three separate conditions.
Then I quit MailMate and poked around a little. Found
~/Library/Application Support/MailMate/Mailboxes.plist and looked at it.
Found something that looked like this:
{ filter = "(subject.body ~ '🐶' or subject.body ~ '🏀' or
subject.body ~ '🐾')";
name = "emojis";
parentUUID = "INBOX:REDACTED";
set = "INBOX:REDACTED";
uuid = "REDACTED";
}
Then I turned the list of 103 emojis into "subject.body ~ '🐶' or
subject.body ~ '🏀' or..." and so on for all 103. Then I pasted that
into Mailboxes.plist where (I hoped) it belonged, saved the file,
started MailMate again, and kept my fingers crossed.
Seems to work fine. The list of conditions in the smart mailbox
definition looks right and the mailbox seems to work as expected.
After all this, I found a grand total 171 messages, three of which I
want to keep. :-) Maybe could have found them faster just by visually
scanning the inbox but what fun would that be?
This gives me something I can now add to as needed using the normal
smart mailbox UI as people send me messages with emojis not already in
the list in their subjects. That will be sort of handy to have, I think.
I don't know at what point the list of conditions gets long enough to be
a problem or hits some internal maximum. That smart mailbox is already
noticeably slower to open for editing than more normal ones: it takes
about five seconds or so.
On Sun 2023-03-26 07:59 AM MDT -0600, <jld at jld3.net> wrote:
> I'd like to create a smart mailbox that selects messages whose
> subjects include emojis.
>
> I don't think it's possible to use regular expression character
> classes in a "subject contains" condition, but if it were, I think
> something like this would be a pretty good start:
>
> subject contains [^[:alnum:][:punct:] ]
>
> That would potentially catch a lot of things that aren't actually
> emojis but my sense is that in my mail there are not actually a lot of
> other things to catch. It may be, for example, that I have more mail
> than I think with, say, accented characters or copyright symbols in
> their subjects, but I doubt it.
>
> Any ideas? Thanks.
More information about the mailmate
mailing list