From: Kan-Ru Chen <kanru@kanru.info>
To: ding@gnus.org
Cc: Andrew Cohen <cohen@andy.bu.edu>,
Lars Magne Ingebrigtsen <larsi@gnus.org>,
Kan-Ru Chen <kanru@kanru.info>
Subject: [PATCH] nnir.el: Fix matching of server type.
Date: Mon, 5 Sep 2011 10:00:49 +0800 [thread overview]
Message-ID: <1315188049-30953-1-git-send-email-kanru@kanru.info> (raw)
---
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 <kanru@kanru.info>
+
+ * 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 <larsi@gnus.org>
* 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
next reply other threads:[~2011-09-05 2:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 2:00 Kan-Ru Chen [this message]
2011-09-05 2:12 ` Andrew Cohen
2011-09-05 20:38 ` Andreas Schwab
2011-09-10 20:18 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315188049-30953-1-git-send-email-kanru@kanru.info \
--to=kanru@kanru.info \
--cc=cohen@andy.bu.edu \
--cc=ding@gnus.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).