Re: jump to a message given by filename
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, February 27 at 02:54 PM, quoth Nagyon Almos:
>> have a look at mairix, http://www.rc0.org.uk/mairix
>
> Thanks for the tip, but I already know the filename
> (from beagle or mc or anything else).
>
> Or simply extract the message-id and search for it
> with -e?
> Is there a nicer solution?
I think the -e, as cumbersome as that is, is probably your best bet.
The thing with mutt is that it supports all kinds of different mail
storage types, so the authors are usually unwilling to add features
that only work for some (i.e. say we had --read-mail-in-file as an
option, how would that work with, say, an mbox?).
That said, and assuming you have something like the mess822 package
installed, what you want could be a pretty simple script like so:
#!/bin/bash
filename="$1"
messageid=`822field Message-ID < $filename`
messageid="${messageid//\$/\\\\\\\\\$}"
mailbox="${filename%/*/*}"
mutt -e 'push "<search>~i '$messageid'<enter><display-message>"' \
-f "$mailbox"
~Kyle
- --
Men, as an organization, are getting more women than any other group
working anywhere in the world. Wherever women are, we have men looking
into it.
-- Jerry Seinfeld
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFF5E1wBkIOoMqOI14RAu31AJsEyeEOJQW3JOhTJAGxZXhm0rzeWQCgsEhf
MFlmK1E/3GHgPD+2DJtT4m4=
=R9UF
-----END PGP SIGNATURE-----