From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79826 Path: news.gmane.org!not-for-mail From: Kan-Ru Chen Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] nnir.el: Fix matching of server type. Date: Mon, 5 Sep 2011 10:00:49 +0800 Message-ID: <1315188049-30953-1-git-send-email-kanru@kanru.info> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1315188154 29181 80.91.229.12 (5 Sep 2011 02:02:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Sep 2011 02:02:34 +0000 (UTC) Cc: Andrew Cohen , Lars Magne Ingebrigtsen , Kan-Ru Chen To: ding@gnus.org Original-X-From: ding-owner+M28120@lists.math.uh.edu Mon Sep 05 04:02:27 2011 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 1R0OW2-0007ew-R4 for ding-account@gmane.org; Mon, 05 Sep 2011 04:02:27 +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 1R0OVU-00041J-TT; Sun, 04 Sep 2011 21:01:52 -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 1R0OVS-000415-54 for ding@lists.math.uh.edu; Sun, 04 Sep 2011 21:01:50 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0OVN-0004zh-GR for ding@lists.math.uh.edu; Sun, 04 Sep 2011 21:01:49 -0500 Original-Received: from mail-yx0-f172.google.com ([209.85.213.172]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1R0OVL-0007KW-QM; Mon, 05 Sep 2011 04:01:43 +0200 Original-Received: by yxj17 with SMTP id 17so3036090yxj.17 for ; Sun, 04 Sep 2011 19:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=cF7y1Q1cNmBtN9wWrMvyQjhrMq1oQRr36gzhweCKYtQ=; b=DMjVrbeV+QPp0NyYXAZhv1eWe/e04PR9h4lfQcHEnOKfwlhjR3lSdh6VbjIBBIVByF lD+PcaP24yNBaekKexvGMw2x18GUsLpPqdWJtksWtmg5qcmG7jKS84uJoI7FsY5rCTHj 9WEM5yPbEJrkmHXLy8ZKpFKWm2FdAdGx5vnNY= Original-Received: by 10.90.213.1 with SMTP id l1mr2289968agg.120.1315188097811; Sun, 04 Sep 2011 19:01:37 -0700 (PDT) Original-Received: from isil.kanru.info (42-72-205-247.dynamic-ip.hinet.net [42.72.205.247]) by mx.google.com with ESMTPS id c8sm7822421and.9.2011.09.04.19.01.21 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Sep 2011 19:01:36 -0700 (PDT) Original-Received: from kanru by isil.kanru.info with local (Exim 4.76) (envelope-from ) id 1R0OUa-00083m-0v; Mon, 05 Sep 2011 10:00:56 +0800 X-Mailer: git-send-email 1.7.5.4 X-Spam-Score: -2.9 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79826 Archived-At: --- lisp/ChangeLog | 7 +++++++ lisp/nnir.el | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d59281b..a230232 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-09-05 Kan-Ru Chen + + * nnir.el (nnir-compose-result): Fix matching of server type. + (nnir-run-swish++): Ditto. + (nnir-run-namazu): Ditto. + (nnir-run-notmuch): Ditto. + 2011-09-04 Lars Magne Ingebrigtsen * gnus.el (gnus-home-directory): Add warning about setting in .gnus.el diff --git a/lisp/nnir.el b/lisp/nnir.el index 17fc3f3..32d93c2 100644 --- a/lisp/nnir.el +++ b/lisp/nnir.el @@ -806,7 +806,7 @@ ready to be added to the list of search results." ;; remove trailing slash and, for nnmaildir, cur/new/tmp (setq dirnam (substring dirnam 0 - (if (string= (gnus-group-server server) "nnmaildir") + (if (string-match "^nnmaildir:" (gnus-group-server server)) -5 -1))) ;; Set group to dirnam without any leading dots or slashes, @@ -816,7 +816,7 @@ ready to be added to the list of search results." "[/\\]" "." t))) (vector (gnus-group-full-name group server) - (if (string= (gnus-group-server server) "nnmaildir") + (if (string-match "^nnmaildir:" (gnus-group-server server)) (nnmaildir-base-name-to-article-number (substring article 0 (string-match ":" article)) group nil) @@ -1073,7 +1073,7 @@ Windows NT 4.0." ;; is sufficient. Note that we can't only use the value of ;; nnml-use-compressed-files because old articles might have been ;; saved with a different value. - (article-pattern (if (string= (gnus-group-server server) "nnmaildir") + (article-pattern (if (string-match "^nnmaildir:" (gnus-group-server server)) ":[0-9]+" "^[0-9]+\\(\\.[a-z0-9]+\\)?$")) score artno dirnam filenam) @@ -1315,7 +1315,7 @@ Tested with Namazu 2.0.6 on a GNU/Linux system." ;; (when group ;; (error "The Namazu backend cannot search specific groups")) (save-excursion - (let ((article-pattern (if (string= (gnus-group-server server) "nnmaildir") + (let ((article-pattern (if (string-match "^nnmaildir:" (gnus-group-server server)) ":[0-9]+" "^[0-9]+$")) artlist @@ -1388,7 +1388,7 @@ actually)." (groupspec (cdr (assq 'group query))) (prefix (nnir-read-server-parm 'nnir-notmuch-remove-prefix server)) artlist - (article-pattern (if (string= (gnus-group-server server) "nnmaildir") + (article-pattern (if (string-match "^nnmaildir:" (gnus-group-server server)) ":[0-9]+" "^[0-9]+$")) artno dirnam filenam) -- 1.7.5.4