* [PATCH] nnir.el: Fix matching of server type.
@ 2011-09-05 2:00 Kan-Ru Chen
2011-09-05 2:12 ` Andrew Cohen
2011-09-05 20:38 ` Andreas Schwab
0 siblings, 2 replies; 4+ messages in thread
From: Kan-Ru Chen @ 2011-09-05 2:00 UTC (permalink / raw)
To: ding; +Cc: Andrew Cohen, Lars Magne Ingebrigtsen, Kan-Ru Chen
---
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nnir.el: Fix matching of server type.
2011-09-05 2:00 [PATCH] nnir.el: Fix matching of server type Kan-Ru Chen
@ 2011-09-05 2:12 ` Andrew Cohen
2011-09-05 20:38 ` Andreas Schwab
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cohen @ 2011-09-05 2:12 UTC (permalink / raw)
To: Kan-Ru Chen; +Cc: ding, Lars Magne Ingebrigtsen
>>>>> "Kan-Ru" == Kan-Ru Chen <kanru@kanru.info> writes:
Kan-Ru> --- lisp/ChangeLog | 7 +++++++ lisp/nnir.el | 10 +++++-----
Kan-Ru> 2 files changed, 12 insertions(+), 5 deletions(-)
Thank you, I'll push these shortly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nnir.el: Fix matching of server type.
2011-09-05 2:00 [PATCH] nnir.el: Fix matching of server type Kan-Ru Chen
2011-09-05 2:12 ` Andrew Cohen
@ 2011-09-05 20:38 ` Andreas Schwab
2011-09-10 20:18 ` Lars Magne Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2011-09-05 20:38 UTC (permalink / raw)
To: Kan-Ru Chen; +Cc: ding, Andrew Cohen, Lars Magne Ingebrigtsen
Kan-Ru Chen <kanru@kanru.info> writes:
> + (if (string-match "^nnmaildir:" (gnus-group-server server))
"\\`nnmaildir:"
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nnir.el: Fix matching of server type.
2011-09-05 20:38 ` Andreas Schwab
@ 2011-09-10 20:18 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-10 20:18 UTC (permalink / raw)
To: ding
Andreas Schwab <schwab@linux-m68k.org> writes:
> Kan-Ru Chen <kanru@kanru.info> writes:
>
>> + (if (string-match "^nnmaildir:" (gnus-group-server server))
>
> "\\`nnmaildir:"
>
> Andreas.
Gnus group names are guaranteed not to have any newlines in them, so I
don't think it matters...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-10 20:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 2:00 [PATCH] nnir.el: Fix matching of server type Kan-Ru Chen
2011-09-05 2:12 ` Andrew Cohen
2011-09-05 20:38 ` Andreas Schwab
2011-09-10 20:18 ` Lars Magne Ingebrigtsen
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).