On Mon, Aug 20, 2018 at 09:24:40PM -0400, Ben Fitzgerald wrote:
> My idea for solving this would be to save both the Message-ID *and* the folder
> the message resides in. Then I could, from emacs:

You could set an environment variable in Mutt and then access that from
the script.

folder-hook . 'set visual=^;setenv MYCURFOLDER $visual'

However, the value of $MYCURFOLDER will contain Mutt mailbox shortcuts,
such as '='.  If you don't want that you'll have to temporarily unset
$folder:

folder-hook . 'set my_folder=$folder;set folder="XXX";set visual=^'
folder-hook . 'setenv MYCURFOLDER $visual'
folder-hook . 'set folder=$my_folder'

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to