On 04Dec2015 20:45, Jurriaan <jurriaan_m...@onderneming10.net> wrote:
Is there any way to have the 'l' command (limit) default to include
searching the recipients email addresses in the sent mail folder?
Normally, when I press 'l' and enter a word, that word is searched for
in the email-address of the sender and in the subject, I think.
In the sent-email folder, I'd like to default to the email-address of
the recipient and the subject, since the email-address of the sender is
rather less useful there.
Is there anyway to do that? Optionally searching the entire body is fine
too, of course.
What you want is the $simple_search configuration variable.
If the expression supplied to <limit> or <search> does not look like a valid
pattern expression (~f and so forth) or one of the special words "all",
"tagged" etc, the string is embedded in the value of $simple_search, whose
default is:
~f %s | ~s %s
i.e. search the author and subject as you observed.
You could write a folder-hook to set $simple_search specially when in your
sent-email folder. For your interest, I set it to:
set simple_search="~f %s | ~t %s | ~c %s | ~s %s"
for all folders.
I've tried searching in the documentation, but I've not found what I'm
looking for. Do I need a limit-hook? Do I need a folder-dependent macro?
It is buried in the "Simple Search" section (section 3.2 in mutt 1.5.24) of the
Patterns section. It took me a while to find it just now also.
Regrettably, on reflection, I think it is in the right place. If I were to
suggets a doc improvement it would be to mention, tersely but at the start of
the patterns section, that invalid patterns are treated as simple searches
[link] and are inserted into the value of $simple_search if not one of the
special words.
Cheers,
Cameron Simpson <c...@zip.com.au>