Re: %t as To or Newsgroup?
On Feb 20 10:55, David Champion wrote:
> > is it possible to redefine the meaning of the %t $index_format specifier
> > so that the "To:" content is printed is available as usual, but if not,
> > to print the content of the "Newsgroup:" header line?
> Not at present.
> > That's what I do, at least. However, if you look into that file in
> > mutt, all the newsgroup postings supposedly have no recipient because
> > the %t from the $index_format prints nothing. There's just no "To"
> > field. AFAICS, there's no way to define to print the "Newsgroup:"
> > content at all. Subsuming this under the %t specifier seems most
> > convenient in this case. It looks like it should be possible to do
> > that in mutt_parse_rfc822_line, shouldn't it?
> The most consistent and flexible approach to this, IMO, would be:
> * add an "if (optional)" clause in the "case 't'" switch of
> hdr_format_str() in hdrline.c, so that mutt can detect whether the
> to: field is empty or null, and
> * either:
> * add a new formatter (say, 'G') to the same function which renders
> the Newsgroup: header -- but realize that there is an NNTP patch
> extant which likely does this already if you're prepared to track
> complex and unsupported patches -- or
> * add a formatter to render arbitrary headers, for which many people
> would thank you
> If you took option 1, you could then use
> %?t?%24.24t&%24.24G? to get the if-else behavior.
The second option looks more interesting. I'll have a look if that's
something I can contribute or if I rather go for the first option.
Cygwin Project Co-Leader