From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67436 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.gnus.general Subject: Re: Comments in References Date: Wed, 24 Sep 2008 20:49:22 +0200 Organization: Linux Private Site Message-ID: References: <87hc85qy0z.fsf@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1222282219 5028 80.91.229.12 (24 Sep 2008 18:50:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 18:50:19 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15887@lists.math.uh.edu Wed Sep 24 20:51:16 2008 connect(): Connection refused Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1KiZS5-0001uO-6v for ding-account@gmane.org; Wed, 24 Sep 2008 20:51:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1KiZQl-0003ae-SB; Wed, 24 Sep 2008 13:49:43 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KiZQk-0003aM-DT for ding@lists.math.uh.edu; Wed, 24 Sep 2008 13:49:42 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KiZQg-0004My-VU for ding@lists.math.uh.edu; Wed, 24 Sep 2008 13:49:42 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KiZQl-0006NG-00 for ; Wed, 24 Sep 2008 20:49:43 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KiZQc-0003rQ-9h for ding@gnus.org; Wed, 24 Sep 2008 18:49:35 +0000 Original-Received: from dsl01.83.171.153.113.ip-pool.nefkom.net ([83.171.153.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Sep 2008 18:49:34 +0000 Original-Received: from schwab by dsl01.83.171.153.113.ip-pool.nefkom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Sep 2008 18:49:34 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dsl01.83.171.153.113.ip-pool.nefkom.net X-Yow: I'm CONTROLLED by the CIA!! EVERYONE is controlled by the CIA!! User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:RgjEbO7T4Z6VKjVBwMTP1v4qQLk= X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67436 Archived-At: Reiner Steib writes: > On Wed, Sep 24 2008, Andreas Schwab wrote: > >> Should gnus-parent-id strip comments, or is this the duty of its >> callers? > > According to it's doc string, I'd say `gnus-parent-id' should strip > it: > > ,----[ f gnus-parent-id RET ] > | gnus-parent-id is a Lisp function in `gnus-util.el'. > | (gnus-parent-id REFERENCES &optional N) > | > | Return the last Message-ID in REFERENCES. > | If N, return the Nth ancestor instead. > `---- What about this then? I've tested it with gmane.linux.kernel.wireless.general, the false orphans are now correctly threaded. Andreas. 2008-09-24 Andreas Schwab * gnus-util.el (gnus-split-references): Strip comments. (gnus-parent-id): Likewise. Index: gnus-util.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-util.el,v retrieving revision 7.84 diff -u -a -p -r7.84 gnus-util.el --- gnus-util.el 27 Jul 2008 00:26:58 -0000 7.84 +++ gnus-util.el 24 Sep 2008 18:45:22 -0000 @@ -625,7 +625,7 @@ ARGS are passed to `message'." (defun gnus-split-references (references) "Return a list of Message-IDs in REFERENCES." (let ((beg 0) - (references (or references "")) + (references (mail-header-remove-comments (or references ""))) ids) (while (string-match "<[^<]+[^< \t]" references beg) (push (substring references (match-beginning 0) (setq beg (match-end 0))) @@ -652,8 +652,9 @@ If N, return the Nth ancestor instead." (while (nthcdr n ids) (setq ids (cdr ids))) (car ids)) - (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references) - (match-string 1 references))))) + (let ((references (mail-header-remove-comments references))) + (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references) + (match-string 1 references)))))) (defun gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."