From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73793 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: large nnir changes Date: Mon, 01 Nov 2010 19:23:32 -0400 Message-ID: <87bp684oi3.fsf@andy.bu.edu> References: <87hbg3srl8.fsf@andy.bu.edu> <87mxpvo9r6.fsf@andy.bu.edu> <87bp6avxlq.fsf@andy.bu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1288653864 24733 80.91.229.12 (1 Nov 2010 23:24:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 1 Nov 2010 23:24:24 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22162@lists.math.uh.edu Tue Nov 02 00:24:20 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 1PD3jf-0001jP-VV for ding-account@gmane.org; Tue, 02 Nov 2010 00:24:20 +0100 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 1PD3jG-0002zw-Fo; Mon, 01 Nov 2010 18:23:54 -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 1PD3jE-0002ze-DO for ding@lists.math.uh.edu; Mon, 01 Nov 2010 18:23:52 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PD3j9-0008Rm-Bh for ding@lists.math.uh.edu; Mon, 01 Nov 2010 18:23:51 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PD3j7-000389-00 for ; Tue, 02 Nov 2010 00:23:45 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PD3j6-0001UB-CX for ding@gnus.org; Tue, 02 Nov 2010 00:23:44 +0100 Original-Received: from rain.gmane.org ([80.91.229.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Nov 2010 00:23:44 +0100 Original-Received: from cohen by rain.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Nov 2010 00:23:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 120 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:j58a9UNgnstTwTKkUChSFmHfVxY= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73793 Archived-At: --=-=-= Content-Type: text/plain I've fixed several bugs, and added the ability to search all the groups under the topic on the current line. I'll be adding the ability to move articles shortly, but I wanted to keep that patch separate in case something is seriously wrong with it. Andy --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=changes.diff Content-Description: nnir changes diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04e4321..f2e9273 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-11-01 Andrew Cohen + + * nnir.el (nnir-run-gmane): inhibit demon. return nil if no messages. + (nnir-read-parms): don't modify query. + (nnir-run-query): add ability to search topic on current line. + (nnir-get-active): clean up. + 2010-11-01 Lars Magne Ingebrigtsen * gnus-cite.el (gnus-article-foldable-buffer): Protect against diff --git a/lisp/nnir.el b/lisp/nnir.el index bfe4df8..52cce76 100644 --- a/lisp/nnir.el +++ b/lisp/nnir.el @@ -1407,6 +1407,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (format "author:%s" (cdr (assq 'author query))) "")) (search (format "%s %s %s" qstring groupspec authorspec)) + (gnus-inhibit-demon t) artlist) (require 'mm-url) (with-current-buffer nntp-server-buffer @@ -1441,14 +1442,15 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (function (lambda (x y) (> (nnir-artitem-rsv x) (nnir-artitem-rsv y))))))) - (message "Can't search non-gmane nntp groups"))) + (message "Can't search non-gmane nntp groups") + nil)) ;;; Util Code: (defun nnir-read-parms (query nnir-search-engine) "Reads additional search parameters according to `nnir-engines'." (let ((parmspec (caddr (assoc nnir-search-engine nnir-engines)))) - (nconc query + (append query (mapcar 'nnir-read-parm parmspec)))) (defun nnir-read-parm (parmspec) @@ -1472,7 +1474,11 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." (with-current-buffer gnus-server-buffer (list (list (gnus-server-server-name)))) (nnir-sort-groups-by-server - (or gnus-group-marked (list (gnus-group-group-name))))))) + (or gnus-group-marked + (if (gnus-group-group-name) + (list (gnus-group-group-name)) + (cdr (assoc (gnus-group-topic-name) + gnus-topic-alist)))))))) (apply 'vconcat (mapcar (lambda (x) (let* ((server (car x)) @@ -1582,32 +1588,15 @@ artitem (counting from 1)." (goto-char (point-min)) (unless (string= gnus-ignored-newsgroups "") (delete-matching-lines gnus-ignored-newsgroups)) - ;; We treat NNTP as a special case to avoid problems with - ;; garbage group names like `"foo' that appear in some badly - ;; managed active files. -jh. - (if (eq (car method) 'nntp) - (while (not (eobp)) - (ignore-errors - (push (cons - (mm-string-as-unibyte - (buffer-substring - (point) - (progn - (skip-chars-forward "^ \t") - (point)))) - (let ((last (read cur))) - (cons (read cur) last))) - groups)) - (forward-line)) - (while (not (eobp)) - (ignore-errors - (push (mm-string-as-unibyte - (let ((p (point))) - (skip-chars-forward "^ \t\\\\") - (setq name (buffer-substring (+ p 1) (- (point) 1))) - (gnus-group-full-name name method))) - groups)) - (forward-line))))) + (while (not (eobp)) + (ignore-errors + (push (mm-string-as-unibyte + (let ((p (point))) + (skip-chars-forward "^ \t\\\\") + (setq name (buffer-substring (+ p 1) (- (point) 1))) + (gnus-group-full-name name method))) + groups)) + (forward-line)))) groups)) ;; The end. --=-=-=--