Spotlight query for ‘messages in the drafts folder’?

12 views
Skip to first unread message

Andy

unread,
Feb 1, 2014, 5:32:24 PM2/1/14
to blacktree-...@googlegroups.com
Hi,

I’m trying to index draft messages for quicker template responses. Later I’ll wire it with some kind of template variable processing so I can get presented a window where I can put in the recipient and other incident-specific parts of the message.

I looked near the mail plugin and it appears it doesn’t yet grok mailboxes. Next next thing I looked into was the Spotlight plugin which I think could make it work, if I could work out a good Spotlight query for ‘draft Mail.app inbox(es)’.

Is anyone on the list well-versed with Spotlight querying that I may ask for advice on, before I start scouring for the details? I smell some minor hiccups ahead and would like to check if nobody has a better way to suggest for me to grab my draft emails using Quicksilver, before implementing.

Regards,
Andy Park


Rob McBroom

unread,
Feb 3, 2014, 4:53:15 PM2/3/14
to blacktree-...@googlegroups.com

On 1 Feb 2014, at 17:32, Andy wrote:

I looked near the mail plugin and it appears it doesn’t yet grok mailboxes.

You should be able to access Mailboxes by selecting Mail.app and hitting → or /. You can’t currently add these things directly to the catalog, though.

Next next thing I looked into was the Spotlight plugin which I think could
make it work, if I could work out a good Spotlight query for ‘draft
Mail.app inbox(es)’.

The Mail plug-in actually uses Spotlight to show mailboxes and messages, so that should work in theory.

Try a new Spotlight catalog entry with the search as kMDItemKind == 'Mail Message’ and limit it to the folder ~/Library/Mail/V2/Some-Account/Drafts.mbox

The main problem you’ll see is that Quicksilver just presents the name of the file, so it might be difficult to locate a specific message that way. (When you right-arrow into Mail.app, there are additional things happening that make the messages recognizable.)

--
Rob McBroom
http://www.skurfer.com/

Andy Park

unread,
Feb 4, 2014, 10:09:53 AM2/4/14
to blacktree-...@googlegroups.com
Rob, thanks for the great unpacking.

Working with the Mail.app and its children items presented me with the following difficulties.

- It makes QS very unresponsive. Not just the initial listing when I right-arrow (which beachballed and took about a minute), but also after I drilled down into a mailbox, it would make QS activation / deactivation lag by more than 20 seconds. 

- So it looks like working with the spotlight catalog wouldn't be very useful unless it could access the QuickLook data (as Finder or menu bar Spotlight hits do), or whatever else the Mail plugin would do with its items -- I didn't actually get the chance to see this one due to the unresponsiveness. Would it be feasible to influence the Spotlight plugin to present a different view of the item?

Regards,
Andy Park


--
You received this message because you are subscribed to the Google Groups "Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blacktree-quicks...@googlegroups.com.
To post to this group, send email to blacktree-...@googlegroups.com.
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/groups/opt_out.

Rob McBroom

unread,
Feb 4, 2014, 10:31:17 AM2/4/14
to blacktree-...@googlegroups.com

On 4 Feb 2014, at 10:09, Andy Park wrote:

Working with the Mail.app and its children items presented me with the following difficulties.

  • It makes QS very unresponsive. Not just the initial listing when I right-arrow (which beachballed and took about a minute), but also after I drilled down into a mailbox, it would make QS activation / deactivation lag by more than 20 seconds.

Oh, yeah. It’s passable on an SSD, but I imagine it’s unusable on anything else. It has to pull in subject, etc. from every single message.

  • So it looks like working with the spotlight catalog wouldn't be very useful unless it could access the QuickLook data

Actually, I forgot, but you can Quick Look the messages in Quicksilver. You can set the “Spacebar behavior” preference to Quick Look, or just use ⌘Y.

Would it be feasible to influence the Spotlight plugin to present a different view of the item?

It’s just using Quicksilver’s default code for dealing with files. I have plans to allow plug-ins to say “I can do a better job with this file type”, but nothing that will be available any time soon.

Andy Park

unread,
Feb 12, 2014, 8:37:01 AM2/12/14
to blacktree-...@googlegroups.com
On 4 Feb 2014, at 16:31, Rob McBroom <mailin...@skurfer.com> wrote:

On 4 Feb 2014, at 10:09, Andy Park wrote:

Working with the Mail.app and its children items presented me with the following difficulties.

  • It makes QS very unresponsive. Not just the initial listing when I right-arrow (which beachballed and took about a minute), but also after I drilled down into a mailbox, it would make QS activation / deactivation lag by more than 20 seconds.

Oh, yeah. It’s passable on an SSD, but I imagine it’s unusable on anything else. It has to pull in subject, etc. from every single message.


SSD doesn't help -- I'm on a 1012 MacBook Air, and I have a lot of emails (mailbox tallies at around 4-5GB). Perhaps people who delete their emails all the time can actually have workable data navigation for Mail though. 


  • So it looks like working with the spotlight catalog wouldn't be very useful unless it could access the QuickLook data

Actually, I forgot, but you can Quick Look the messages in Quicksilver. You can set the “Spacebar behavior” preference to Quick Look, or just use ⌘Y.


Thanks for the tip. What I found though is that the user experience becomes untenable at the very first search phase, as the fuzzy match only has the meaningless filenames of the emails to work with. I just couldn't get any decent hits to start the workflow with.

Would it be feasible to influence the Spotlight plugin to present a different view of the item?

It’s just using Quicksilver’s default code for dealing with files. I have plans to allow plug-ins to say “I can do a better job with this file type”, but nothing that will be available any time soon.


That would be nice. Although I initially mentioned it purely as a spotlight-aware mechanism to view things, it now appears quite closely coupled to a more spotlight-aware mechanism to search things with, given the above experience. I.e. it would be nice if QS can work with the same data Spotlight menubar search works with, and also show it the same way the menubar search does. 

Nevermind that will probably be quite a bit of work :)

Reply all
Reply to author
Forward
0 new messages