<<< Date Index >>>     <<< Thread Index >>>

Re: searching in "sent"



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, December  4 at 11:07 PM, quoth Pau Amaro-Seoane:
> / is a wonderful tool to search for keywords in the "inbox" BUT not 
> in sent... because mutt adds automatically a "To" in the field, 
> which seems to spoil the search:
>
>  24   F Dec 03 To Stas         (  13) tomorrow
>  25   F Dec 03 To Guste        (   3) Re: nos vamos
>  26   F Dec 03 To Stas         (   8) Re: tomorrow
>  27   F Dec 03 To Guste        (  36) Re: nos vamos
>  28   F Dec 03 To Stas         (  24) Re: tomorrow
>
> Is there a way to get rid of that "To" in the 5th column?

Generally speaking, no, there isn't. However, that's not what is 
breaking your search (trust me). Mutt does not search the text that is 
displayed; it searches the underlying details of the messages.

Searching in any index (sent, inbox, whatever) relies on the value of 
$default_hook, which defaults to "~f %s !~P | (~P ~C %s)". All mutt 
searches rely on simple patterns, and default_hook is a good example 
of what can be done with simple patterns. What happens is that the 
string you're searching for gets substituted into $default_hook in 
place of the %s markers. Thus, if you searched for "foo", that's 
equivalent to searching for "~f foo !~P | (~P ~C foo)". Translated 
into English, that means: "search for messages originating from foo 
but not from me (as defined by the alternates command) OR messages 
from me that are addressed to or CC'd to foo".

If you're having trouble searching in your sent folder, then my guess 
is that you haven't sufficiently informed mutt of your email addresses 
(using alternates).

Personally, I frequently prefer a $default_hook setting of:

     set default_hook="(~f %s !~P) | (~P ~C %s) | ~s %s"

~Kyle
- -- 
Once a government is committed to the principle of silencing the voice 
of opposition, it has only one way to go, and that is down the path of 
increasingly repressive measures, until it becomes a source of terror 
to all its citizens and creates a country where everyone lives in 
fear.
                                                        -- Harry Truman
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFHVdcQBkIOoMqOI14RAhn/AKD4mAFUsWmUZrsT2u1hEML07zpD8wCgn9Uk
KFq28YWuc6esumuZ1hujNAs=
=xRnZ
-----END PGP SIGNATURE-----