<div class="markdown">
<p dir="auto">On 22 Nov 2013, at 20:56, Terpstra Brett wrote:</p>

<blockquote>
<p dir="auto">Sorry if this has been covered, I couldn't find it in the archives:</p>

<p dir="auto">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?</p>
</blockquote>

<p dir="auto">Two answers:</p>

<p dir="auto">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.</p>

<p dir="auto">Yes: The path can be derived from the ${#source} variable which is kind of an IMAP URL (not quite following the IMAP URL standard).</p>

<p dir="auto">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 <code>input = 'raw'</code>).</p>

<blockquote>
<p dir="auto">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.</p>
</blockquote>

<p dir="auto">Similar to “View ▸ Copy as Link…”?</p>

<blockquote>
<p dir="auto">More to come, I hope. I got addicted to writing TextMate bundles back in the early days...</p>
</blockquote>

<p dir="auto">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.</p>

<p dir="auto">-- <br>
Benny</p>

</div>