Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: nljlistbox2@gmail.com (N. Jackson)
To: info-gnus-english@gnu.org
Subject: Trouble with extra headers
Date: Sat, 08 Feb 2014 17:30:48 -0400	[thread overview]
Message-ID: <87sirts35j.fsf@moondust.localdomain> (raw)

I'm trying to use gnus-extra-headers and I don't seem to quite have the
trick of it.

I have a header "Delivered-To" on my local IMAP server which identifies
which mail server a message was retrieved from. I want eventually to use
the value of this header in Gnus select methods to chose my "From"
header and outbound smtp server for replies.

As an initial test, I wanted to try limiting my Group Summary buffer
using the value of this header, and I wanted to try displaying the value
of it in my summary line.

I added

    (setq gnus-extra-headers '(To Newsgroups Delivered-To))

to my .gnus.el file. (Eventually I would have this in the group
parameters for my local IMAP server, but it seemed simplest to add it
globally at first.)

Then, in my Summary buffer I try to use the /x command to limit by an
extra header. This prompts me for the header to limit by:

    Limit extra header (default To):

and I can choose "Delivered-To" using tab completion, so clearly the
change to gnus-extra-headers "took" at some level. (Previously
"Delivered-To" wasn't accepted here.) But then at the subsequent prompt

   Limit to header Delivered-To (regexp):

whatever I enter seems to result in no matches. For example if I simply
enter the leter "a", the response is "Found no matches for
"a"". Although I would think this should match for example at least all
my accounts on gmail as "gmail" has an "a" in it.

I checked the headers of a few emails in the group by opening them and
using C-u g to show all headers, and the "Delivered-To" header is there
and contains nothing unexpected. For example, here is one:

    Delivered-To: nljlistbox2@gmail.com

I thought I might have a regular expression problem, but when I do the
same thing with the "To" header, I get my Summary buffer "limited" as
expected.

What could I be missing?

I also tried to add the value of the Delivered-To header to my summary
line. I changed

    (setq gnus-summary-line-format "%U%R%z%I%(%[%4L:%&user-date;
    %-23,23f%]%) %s\n")

to

    (setq gnus-summary-line-format "%U%R%z%I%(%[%4L:%&user-date;%~(form
    (gnus-extra-header 'Delivered-To))@ %-23,23f%]%) %s\n")

but it makes no difference (or possibly adds a space or two).

Does this suggest that Gnus is not reading/saving the values of the
"Delivered-To" header when it retrieves the headers for my mail, and
only retrieves the value when I open the mail?

             reply	other threads:[~2014-02-08 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 21:30 N. Jackson [this message]
2014-03-05 13:32 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sirts35j.fsf@moondust.localdomain \
    --to=nljlistbox2@gmail.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).