From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13951 Path: news.gmane.org!not-for-mail From: Mark Triggs Newsgroups: gmane.emacs.gnus.user Subject: Re: A small patch for nnir.el Date: Sat, 20 Mar 2010 09:09:29 +1100 Message-ID: <87d3z0klpi.fsf@dishevelled.net> References: <87eijitjnp.fsf@dishevelled.net> <87mxy45cw0.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1273157228 31511 80.91.229.12 (6 May 2010 14:47:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 6 May 2010 14:47:08 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Thu May 06 16:47:04 2010 connect(): No such file or directory Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OA2Lm-0000Iq-UP for gegu-info-gnus-english@m.gmane.org; Thu, 06 May 2010 16:46:55 +0200 Original-Received: from localhost ([127.0.0.1]:45964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA21P-0001ej-7A for gegu-info-gnus-english@m.gmane.org; Thu, 06 May 2010 10:25:51 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 19 Mar 2010 17:09:33 -0500 Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus v5.13 Cancel-Lock: sha1:8ze2QJZ/8eIaBDcpG5ZG6nv19MU= Original-Lines: 107 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-Qtv9wgRo4zJpJT55bd/O6C6+dm4kc9yMN/6Lud/sxPt6ynVvzZm9h8OiQvBCnBpJstYItHLN9m2PE5k!miLDjrNXPJAHJYKvNwr7dR+1nqAoD/kVbRfdedlUd6PIj696kK+MZQ== Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: usenet.stanford.edu gnu.emacs.gnus:84152 X-Mailman-Approved-At: Wed, 05 May 2010 21:10:53 -0400 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13951 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Ted Zlatanov writes: > On Thu, 18 Mar 2010 14:04:26 +1100 Mark Triggs wrote: > > MT> I'm writing here because I'm a bit unsure who I should offer my (tiny) > MT> nnir.el patch to. The ding list seems to have fallen to the spammers, > MT> and Kai Großjohann said that, although my patch looked sensible, he's no > MT> longer the primary maintainer of nnir.el. > > Send it to the ding list or post here. I'll take a look. > > You need to have signed papers if your patch is non-trivial. Thanks Ted. I've attached my patch, which must be at least close to trivial--it looks bigger than it really is because wrapping the old code in an "unless" has changed the indentation. I've signed FSF copyright papers before, but never for Gnus (I think my last one was against ERC). I'm happy to sign and submit whatever wants signing and submitting, though. Many thanks, Mark -- Mark Triggs --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nnir.patch --- /home/mst/media/mark/src/cvs/emacs/lisp/gnus/nnir.el 2010-03-12 08:45:24.000000000 +1100 +++ nnir.el 2010-03-12 11:34:07.000000000 +1100 @@ -358,6 +358,14 @@ (defvar nnir-imap-search-argument-history () "The history for querying search options in nnir") +(defvar nnir-get-article-nov-function nil + "If non-nil, a function that will be passed each search result. This +should return a message's headers in NOV format. + +If this variable is nil, or if the provided function returns nil for a search +result, `gnus-retrieve-headers' will be called instead.") + + ;;; Developer Extension Variable: (defvar nnir-engines @@ -779,25 +787,29 @@ (nnir-possibly-change-server server) (let ((gnus-override-method (gnus-server-to-method server))) - (case (setq foo (gnus-retrieve-headers (list artno) artfullgroup nil)) - (nov - (goto-char (point-min)) - (setq novitem (nnheader-parse-nov)) - (unless novitem - (pop-to-buffer nntp-server-buffer) - (error - "nnheader-parse-nov returned nil for article %s in group %s" - artno artfullgroup))) - (headers - (goto-char (point-min)) - (setq novitem (nnheader-parse-head)) - (unless novitem - (pop-to-buffer nntp-server-buffer) - (error - "nnheader-parse-head returned nil for article %s in group %s" - artno artfullgroup))) - (t (error "Unknown header type %s while requesting article %s of group %s" - foo artno artfullgroup)))) + (setq novitem (and nnir-get-article-nov-function + (funcall nnir-get-article-nov-function + artitem))) + (unless novitem + (case (setq foo (gnus-retrieve-headers (list artno) artfullgroup nil)) + (nov + (goto-char (point-min)) + (setq novitem (nnheader-parse-nov)) + (unless novitem + (pop-to-buffer nntp-server-buffer) + (error + "nnheader-parse-nov returned nil for article %s in group %s" + artno artfullgroup))) + (headers + (goto-char (point-min)) + (setq novitem (nnheader-parse-head)) + (unless novitem + (pop-to-buffer nntp-server-buffer) + (error + "nnheader-parse-head returned nil for article %s in group %s" + artno artfullgroup))) + (t (error "Unknown header type %s while requesting article %s of group %s" + foo artno artfullgroup))))) ;; replace article number in original group with article number ;; in nnir group (mail-header-set-number novitem art) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ info-gnus-english mailing list info-gnus-english@gnu.org http://lists.gnu.org/mailman/listinfo/info-gnus-english --=-=-=--