From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2181 Path: news.gmane.org!not-for-mail From: Gaute B Strokkenes Newsgroups: gmane.emacs.gnus.user Subject: Re: gnus-alter-header-function and mail->news gateway. Date: Fri, 07 Mar 2003 19:10:16 +0000 Organization: The Church of Emacs Message-ID: <4a3clzc7s7.fsf@kern.srcf.societies.cam.ac.uk> References: <4aheag40gy.fsf@kern.srcf.societies.cam.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138668708 14226 80.91.229.2 (31 Jan 2006 00:51:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:51:48 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:30:18 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-koe1.dfn.de!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: student.cusu.cam.ac.uk Mail-Copies-To: never X-Face: /o2;eGh9msH~a<|xh/*d@XD)bmdD]25b/b8 On Fri, 07 Mar 2003, harder@myrealbox.com wrote: > Gaute B Strokkenes 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!!