Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Gaute B Strokkenes <gs234@cam.ac.uk>
Subject: Re: gnus-alter-header-function and mail->news gateway.
Date: Fri, 07 Mar 2003 19:10:16 +0000	[thread overview]
Message-ID: <4a3clzc7s7.fsf@kern.srcf.societies.cam.ac.uk> (raw)
In-Reply-To: <m34r6gvuih.fsf@defun.localdomain>

On Fri, 07 Mar 2003, harder@myrealbox.com wrote:
> Gaute B Strokkenes <gs234@cam.ac.uk> writes:
> 
>> I read a mailing list through a news gateway.  Threading does not
>> work very well, since the gateway munges the headers slightly.  For
>> instance, "References:" becomes "X-Originial-References:".  I would
>> like to have Gnus consider this information as well, and it seems
>> that I can do so using gnus-alter-header-function.
> 
> This function won't do the trick -- it can only alter a header
> _value_ not the name of a header.

Bummer.

> Another more serious problem is that Gnus doesn't know the the value
> of 'X-Originial-References' when the threading is done.
> 
> Initially, just the subset of headers included in the overview are
> fetched.  The rest of the headers are only fetched from the server
> when you actually view the article.
> 
> You _can_ tell Gnus to fetch all headers, but this will be _much_
> slower than the normal method.
> 
> Something like this might work:
> 
> (defun my-unmangle-references ()
>   (save-excursion
>     (goto-char (point-min))
>     (when (re-search-forward "^X-Original-References:" nil t)
>       (replace-match "References:"))))
> 
> (add-hook 'gnus-parse-headers-hook 'my-unmangle-references)
> (setq nntp-server-xover nil)

Thanks--this almost works, and doesn't seem to be unbearably slow.
However, it seems (as determined by inserting calls to message in
strategic places) that the function is only ever called once for all
of the headers, and so only one article ever gets its references
fixed.

Also, is there a way to set things up so that the hook is only used
for a particular group, and that xover is used for other groups?

-- 
Gaute Strokkenes                        http://www.srcf.ucam.org/~gs234/
The appreciation of the average visual graphisticator alone is worth
 the whole suaveness and decadence which abounds!!


      reply	other threads:[~2003-03-07 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4aheag40gy.fsf@kern.srcf.societies.cam.ac.uk>
2003-03-07  1:24 ` Jesper Harder
2003-03-07 19:10   ` Gaute B Strokkenes [this message]

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=4a3clzc7s7.fsf@kern.srcf.societies.cam.ac.uk \
    --to=gs234@cam.ac.uk \
    /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).