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

Re: %t as To or Newsgroup?



> 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.

-- 
 -D.    dgc@xxxxxxxxxxxx    NSIT    University of Chicago
 You chose to end the nonresponsive program, Microsoft Help and Support Center.
 *Please tell Microsoft about this problem.* We have created an error report
 that you can send to help us improve Microsoft Help and Support Center.