On 2000.07.21, in <[EMAIL PROTECTED]>,
"George Klinich III" <[EMAIL PROTECTED]> wrote:
> Hmm... I don't see the %y format documented in the manual, what is it
> suppose to do?
It's documented, but present only in the 1.3.x series.
muttrc(5):
%y `x-label:' field, if present
%Y `x-label' field, if present, and (1) not at part
of a thread tree, (2) at the top of a thread, or
(3) `x-label' is different from preceding
message's `x-label'.
manual:
The ``X-Label:'' header field can be used to further identify mailing
lists or list subject matter (or just to annotate messages
individually). The ``$index_format'' variable's ``%y'' and ``%Y''
escapes can be used to expand ``X-Label:'' fields in the index, and
Mutt's pattern-matcher can match regular expressions to ``X-Label:''
fields with the `` y'' selector. ``X-Label:'' is not a standard
message header field, but it can easily be inserted by procmail and
other mail filtering agents.
The original patch for 1.1.12 still applied on 1.2, last time I
checked. See:
http://home.uchicago.edu/~dgc/mutt/mutt-1.1.12.dgc.xlabel.2
Or, for the director's cut (not present in any release version):
http://home.uchicago.edu/~dgc/mutt/mutt-1.1.12.dgc.xlabel.3
For the 1.3 version of the unreleased extensions:
http://home.uchicago.edu/~dgc/mutt/mutt-1.3.dgc.xlabel.3
On 2000.07.21, in <[EMAIL PROTECTED]>,
"David T-G" <[EMAIL PROTECTED]> wrote:
> % On Fri, Jul 21, 2000 at 01:44:44AM +0000, George Klinich III wrote:
> % > based on what is in the header? For example, if the From: matches a certain
> % > pattern, I'd like to see the the From field in the index line replaced by
> % > another header field.
> %
> % What about abusing the x-label: field with procmail and using %y in the
> % index format?
>
> Oooh; that's clever. I may have to get to work on that. Who wants to
> beat me to it?
Suppose you want messages from [EMAIL PROTECTED] to show the
Reply-To: header in place of the From: header. Suppose further that
your $index_format is the default:
index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"
You would write a procmail rule to steal the Reply-To: header, and copy
it to X-Label:
:0
* ^From:.*[EMAIL PROTECTED]
{
replyto=`formail -zx reply-to:`
:0 f
| formail -I "X-Label: ${replyto}"
}
In .muttrc, you would set your index_format as:
set index_format="%4C %Z %{%b %d} %?y?%-15.15y&%-15.15L? (%4l) %s"
This says: if there is an X-Label: field, display it in 15 spaces;
otherwise, display the usual sender information.
All this said, I'm not sure this is the best solution, because it
basically appropriates X-Label: for this sole purpose. Now, you could
additionally force these messages into another delivery folder and use
a folder-hook to set $index_format to solve that problem, but it's
somewhat the hack. But at the moment, I don't have a better suggestion.
Caveat usor! I haven't tested any of this, beyond using %y every day
for my own purposes.
--
-D. [EMAIL PROTECTED] NSIT University of Chicago