From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/71888 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: Any juicy outstanding Gnus bugs? Date: Sun, 26 Sep 2010 14:57:41 -0400 Message-ID: <87bp7kpc2i.fsf@andy.bu.edu> References: <877hi89wks.fsf@dod.no> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1285527487 30891 80.91.229.12 (26 Sep 2010 18:58:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Sep 2010 18:58:07 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M20261@lists.math.uh.edu Sun Sep 26 20:58:06 2010 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.69) (envelope-from ) id 1OzwQF-0005BG-IL for ding-account@gmane.org; Sun, 26 Sep 2010 20:58:03 +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 1OzwQC-00011d-BN; Sun, 26 Sep 2010 13:58:00 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1OzwQA-00011J-AK for ding@lists.math.uh.edu; Sun, 26 Sep 2010 13:57:58 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OzwQ9-0007TY-1P for ding@lists.math.uh.edu; Sun, 26 Sep 2010 13:57:58 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OzwQ8-0003V8-00 for ; Sun, 26 Sep 2010 20:57:56 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OzwQ7-00059T-71 for ding@gnus.org; Sun, 26 Sep 2010 20:57:55 +0200 Original-Received: from andy.bu.edu ([128.197.41.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Sep 2010 20:57:55 +0200 Original-Received: from cohen by andy.bu.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Sep 2010 20:57:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 93 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: andy.bu.edu User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Yq11kNrd97AHFADkOtzr2B0vN58= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:71888 Archived-At: --=-=-= Content-Type: text/plain >>>>> "Steinar" == Steinar Bang writes: Steinar> My wishlist: [...] Steinar> - I would like "warp-to-group" functionality for nnimap Steinar> nnir search matches (I don't need to find the articles' Steinar> thread which is the present functionality, which doesn't Steinar> work anyway) I just played around with this. The function gnus-summary-refer-thread does nothing unless headers are retrieved in nov format. But its easy enough to hack in something that detects an imap group and finds articles by reference. I don't know anything about threading, so I just find the relevant article list and pass it off to gnus-summary-read-group-1. Works for the 5 minutes I've played with it. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=gnus-sum.el.diff Content-Description: gnus-sum.el --- a/gnus-sum.el 2010-09-26 14:53:35.000000000 -0400 +++ b/gnus-sum.el 2010-09-26 14:55:49.000000000 -0400 @@ -8826,26 +8826,38 @@ (interactive "P") (let ((id (mail-header-id (gnus-summary-article-header))) (limit (if limit (prefix-numeric-value limit) - gnus-refer-thread-limit))) - (unless (eq gnus-fetch-old-headers 'invisible) - (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) - ;; Retrieve the headers and read them in. - (if (eq (if (numberp limit) - (gnus-retrieve-headers - (list (min - (+ (mail-header-number - (gnus-summary-article-header)) - limit) - gnus-newsgroup-end)) - gnus-newsgroup-name (* limit 2)) - ;; gnus-refer-thread-limit is t, i.e. fetch _all_ - ;; headers. - (gnus-retrieve-headers (list gnus-newsgroup-end) - gnus-newsgroup-name limit)) - 'nov) - (gnus-build-all-threads) - (error "Can't fetch thread from back ends that don't support NOV")) - (gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name)) + gnus-refer-thread-limit)) + (subject (mail-header-subject (gnus-summary-article-header))) + (group (if (string-match "-ephemeral" gnus-newsgroup-name) + (replace-match "" nil t gnus-newsgroup-name) + gnus-newsgroup-name))) + (if (string= (car (gnus-group-method group)) "nnimap") + (with-current-buffer (nnimap-buffer) + (let ((result (nnimap-command + "UID SEARCH OR HEADER REFERENCES %S HEADER Message-Id %S" id id))) + (gnus-summary-read-group-1 group t t nil nil + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result))))))))) + (unless (eq gnus-fetch-old-headers 'invisible) + (gnus-message 5 "Fetching headers for %s..." gnus-newsgroup-name) + ;; Retrieve the headers and read them in. + (if (eq (if (numberp limit) + (gnus-retrieve-headers + (list (min + (+ (mail-header-number + (gnus-summary-article-header)) + limit) + gnus-newsgroup-end)) + gnus-newsgroup-name (* limit 2)) + ;; gnus-refer-thread-limit is t, i.e. fetch _all_ + ;; headers. + (gnus-retrieve-headers (list gnus-newsgroup-end) + gnus-newsgroup-name limit)) + 'nov) + (gnus-build-all-threads) + (error "Can't fetch thread from back ends that don't support NOV")) + (gnus-message 5 "Fetching headers for %s...done" gnus-newsgroup-name))) (gnus-summary-limit-include-thread id))) (defun gnus-summary-refer-article (message-id) --=-=-=--