pipe message with folder name

Kevin J. McCarthy kevin at 8t8.us
Tue Aug 21 01:46:07 UTC 2018


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20180820/a0fd7fb0/attachment.asc>


More information about the Mutt-users mailing list