From: tsuchiya Date: Fri, 1 Aug 2003 05:02:35 +0000 (+0000) Subject: (gnus-namazu/search): Small modified to reduce its spending time. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5e69f31ba41531b0f2c4d51d26abdd63f8c730a7;p=elisp%2Fgnus.git- (gnus-namazu/search): Small modified to reduce its spending time. --- diff --git a/ChangeLog b/ChangeLog index f2c9a23..ab4fe6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-01 TSUCHIYA Masatoshi + + * lisp/gnus-namazu.el (gnus-namazu/search): Small modified to + reduce its spending time. + 2003-07-30 TSUCHIYA Masatoshi * gnus-namazu.el (gnus-namazu/group-prefixed-name): Removed. diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index 6341d6e..ee43a56 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -359,13 +359,17 @@ options make any sense in this context." (error "Namazu finished abnormally: %d" exit-status))) (gnus-namazu/normalize-results) (goto-char (point-min)) - (let (articles group file) + (let (articles group) (while (not (eobp)) - (setq file (buffer-substring-no-properties (point) (gnus-point-at-eol)) - group (file-name-directory file) - file (file-name-nondirectory file)) - (and (not (string-match "[^0-9]" file)) - (setq group + (setq group (buffer-substring-no-properties + (point) + (progn + (end-of-line) + ;; NOTE: Only numeric characters are permitted + ;; as file names of articles. + (skip-chars-backward "0-9") + (point)))) + (and (setq group (symbol-value (intern-soft (if gnus-namazu-case-sensitive-filesystem group @@ -373,7 +377,11 @@ options make any sense in this context." (cdr gnus-namazu/directory-table)))) (or (not groups) (member group groups)) - (push (gnus-namazu/make-article group (string-to-number file)) + (push (gnus-namazu/make-article + group + (string-to-number + (buffer-substring-no-properties (point) + (gnus-point-at-eol)))) articles)) (forward-line 1)) (nreverse articles))))