On 22 Nov 2013, at 14:56, Benny Kjær Nielsen wrote:
On 22 Nov 2013, at 20:56, Terpstra Brett wrote:
Sorry if this has been covered, I couldn't find it in the archives:
Is there a way to get the filename/path for a message into an
environment variable for a bundle? Similar to the ${subject.body}
variables?
Two answers:
No: The reason is that even though MailMate knows the path where a
given message should be saved then it might not have happened yet.
Saving is handled by a separate thread.
Yes: The path can be derived from the ${#source} variable which is
kind of an IMAP URL (not quite following the IMAP URL standard).
What are you going to do with the path? If it is with the purpose of
reading the raw file then it might be better just to ask MailMate to
provide the message on stdin (using `input = 'raw'`).
No, I'm actually playing with the idea of feeding the file url to a
script for Mavericks tagging, just to see if I can pull it off.
Ultimately useful? Dunno. Fun to try? Yep.
Side note: I'm just getting started on my first bundle. It currently
has one command that lets you grab a message URL with a shortcut key,
which is handy for pasting into nvALT or TaskPaper.
Similar to “View ▸ Copy as Link…”?
Sonofabitch. I searched the menus for "url" instead of "link." Oh well,
it was a fun exercise and got me rolling.
More to come, I hope. I got addicted to writing TextMate bundles back
in the early days...
Sounds great. Just what I need even if it exposes the missing features
of the bundle system ;-) Questions are welcome. Eventually it'll force
me to document more features.
You write great documentation, I'm sure you'll get to it :). I've been
poring over the help system for hours now._______________________________________________
mailmate mailing list
mailmate@lists.freron.com
http://lists.freron.com/listinfo/mailmate