From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: [RFC] Gnus generalized search, part II Date: Wed, 26 Apr 2017 16:18:04 +0800 Organization: Boston University Message-ID: <87zif3fupv.fsf@hanan> References: <87zif930mt.fsf@ericabrahamsen.net> <87shkx5z17.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493194754 2073 195.159.176.226 (26 Apr 2017 08:19:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2017 08:19:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: ding@gnus.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 10:19:09 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3IAH-0000Oa-1M for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2017 10:19:09 +0200 Original-Received: from localhost ([::1]:53500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3IAM-00049S-LH for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2017 04:19:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3I9U-000496-PL for emacs-devel@gnu.org; Wed, 26 Apr 2017 04:18:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3I9R-0000mc-Kd for emacs-devel@gnu.org; Wed, 26 Apr 2017 04:18:20 -0400 Original-Received: from [195.159.176.226] (port=54118 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3I9R-0000lW-DO for emacs-devel@gnu.org; Wed, 26 Apr 2017 04:18:17 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d3I9J-0007W2-6t for emacs-devel@gnu.org; Wed, 26 Apr 2017 10:18:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:oeFInwvMS7P41s1isA68ubDGvCQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214297 gmane.emacs.gnus.general:87489 Archived-At: I found a few minutes to try the generalized search but couldn't get the file to load :( I suspect just some simple typos, but I haven't had the time to track them down (and they all seem to be in search backends that aren't functional anyway). I made some a (random) guess about what changes to make and got things to load, but I haven't tried running any functions yet:) Eric, did I make the right changes? --- nnir_search.el~ 2017-04-22 17:03:10.509173535 +0800 +++ nnir_search.el 2017-04-26 16:13:25.806384881 +0800 @@ -1064,7 +1064,7 @@ (eieio-oset-default 'gnus-search-swish-e 'prefix nnir-swish-e-remove-prefix) -(eieio-oset-default 'gnus-search-swish-e 'config-file +(eieio-oset-default 'gnus-search-swish-e 'index-files nnir-swish-e-index-files) (eieio-oset-default 'gnus-search-swish-e 'switches @@ -1499,7 +1499,7 @@ -(cl-defmethod nnir-search-transform-expression ((engine gnus-engine-swish++) +(cl-defmethod nnir-search-transform-expression ((engine gnus-search-swish++) (expr (head near))) (format "%s near %s" (nnir-search-transform-expression engine (nth 1 expr)) @@ -1946,20 +1946,20 @@ (forward-line 1))) (apply #'vector (nreverse (delete-dups artlist))))) -(cl-defmethod nnir-search-transform-expression ((_e gnus-engine-gmane) +(cl-defmethod nnir-search-transform-expression ((_e gnus-search-gmane) (_expr (head near))) nil) ;; Can Gmane handle OR or NOT keywords? -(cl-defmethod nnir-search-transform-expression ((_e gnus-engine-gmane) +(cl-defmethod nnir-search-transform-expression ((_e gnus-search-gmane) (_expr (head or))) nil) -(cl-defmethod nnir-search-transform-expression ((_e gnus-engine-gmane) +(cl-defmethod nnir-search-transform-expression ((_e gnus-search-gmane) (_expr (head not))) nil) -(cl-defmethod nnir-search-transform-expression ((_e gnus-engine-gmane) +(cl-defmethod nnir-search-transform-expression ((_e gnus-search-gmane) (expr list)) "The only keyword value gmane can handle is author, ie from." (when (memq (car expr) '(from sender author))