folder instead of nmz folder.
(elmo-nmz-default-index-path): Added obsolete variable setting.
(elmo-nmz-index-alias-alist): Ditto.
(elmo-nmz-use-drive-letter): Ditto.
* elmo-search.el (elmo-search-register-engine): New function.
* elmo-nmz.el: Removed.
* WL-ELS (ELMO-MODULES): Removed elmo-nmz.
+2005-09-17 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * WL-ELS (ELMO-MODULES): Removed elmo-nmz.
+
2005-09-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* WL-ELS (ELMO-MODULES): Added elmo-search.
Wanderlust NEWS -- User-visible changes in Wanderlust.
+* Changes in 2.16.0 from 2.14.x
+
+** A folder type `namazu' is abolished. New folder type `search' is added instead.
+
* Changes in 2.14.1 from 2.14.0
Version 2.14.1 is a bug fix version of 2.14.0.
Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
+* 2.14.x \e$B$+$i\e(B 2.16.0 \e$B$X$NJQ99E@\e(B
+
+** namazu \e$B%U%)%k%@$O5!G=$r3HD%$7$?\e(B search \e$B%U%)%k%@$KCV$-49$($i$l$^$7$?!#\e(B
+ namazu \e$B0J30$N30It%W%m%0%i%`$r;H$C$?8!:w$,=PMh$k$h$&$K$J$j$^$7$?!#%G\e(B
+ \e$B%U%)%k%H$G$O!"\e(Bgrep \e$B$G$N8!:w$,%5%]!<%H$5$l$F$$$^$9!#\e(B
+
* 2.14.0 \e$B$+$i\e(B 2.14.1 \e$B$X$NJQ99E@\e(B
2.14.1 \e$B$O!"\e(B2.14.0 \e$B$N%P%0=$@5HG$G$9!#\e(B
elmo-multi elmo-access elmo-filter
elmo-archive elmo-pipe elmo-cache
elmo-internal elmo-flag elmo-sendlog elmo-null
- elmo-dop elmo-nmz elmo-search elmo-file elmo-split
+ elmo-dop elmo-search elmo-file elmo-split
elmo-spam elsp-bogofilter elsp-sa elsp-bsfilter elsp-spamoracle
modb modb-entity modb-legacy modb-standard
))
\e$B%5%]!<%H$7$F$$$l$P!"$I$s$J%U%)%k%@$G$bMxMQ$G$-$^$9!#\e(B
\e$B%P!<%8%g%s\e(B @value{VERSION} \e$B8=:_!"MQ0U$5$l$F$$$k%U%)%k%@$O!"\e(BIMAP, NNTP,
-LocalDir(MH), Maildir, News Spool, Archive, POP, Shimbun, Namazu, Multi,
+LocalDir(MH), Maildir, News Spool, Archive, POP, Shimbun, Search, Multi,
Filter, Pipe, File, Access, Internal \e$B$N\e(B 15 \e$B<oN`$G$9!#\e(B
@menu
* Archive Folder:: @samp{$} -- \e$B%"!<%+%$%V%U%)%k%@\e(B
* POP Folder:: @samp{&} -- POP \e$B%U%)%k%@\e(B
* Shimbun Folder:: @samp{@@} -- \e$B?7J9%U%)%k%@\e(B
-* Namazu Folder:: @samp{[} -- Namazu \e$B%U%)%k%@\e(B
+* Search Folder:: @samp{[} -- \e$B8!:w%U%)%k%@\e(B
* Multi Folder:: @samp{*} -- \e$B%^%k%A%U%)%k%@\e(B
* Filter Folder:: @samp{/} -- \e$B%U%#%k%?%U%)%k%@\e(B
* Pipe Folder:: @samp{|} -- \e$B%Q%$%W%U%)%k%@\e(B
\e$B$9$kI,MW$,$"$j$^$9!#\e(B)
-@node Shimbun Folder, Namazu Folder, POP Folder, Folders
+@node Shimbun Folder, Search Folder, POP Folder, Folders
@section \e$B?7J9%U%)%k%@\e(B
@cindex @samp{@@}
@cindex Shimbun Folder
'("^@@airs\\." "^@@namazu\\."))
@end example
-\e$B%5%^%j$NI=<($r99?7$9$k$K$O!"%U%'%C%A$7$?8e$K\e(B @kbd{s rescan} \e$B$,I,MW$G$9!#\e(B
+\e$B%5%^%j$NI=<($O!"<+F0E*$K99?7$5$l$^$9!#\e(B
@end table
-@node Namazu Folder, Multi Folder, Shimbun Folder, Folders
-@section Namazu \e$B%U%)%k%@\e(B
-@cindex Namazu Folder
+@node Search Folder, namazu, Shimbun Folder, Folders
+@section \e$B8!:w%U%)%k%@\e(B
+@cindex Search Folder
@cindex @samp{[}
-@cindex Folder, Namazu
+@cindex Folder, Search
@cindex Folder, Text Search
-@pindex Namazu
-@pindex nmz
-namazu (@uref{http://www.namazu.org/}) \e$B$rMQ$$$F!"8!:w<0$K%^%C%A$7$?\e(B
-\e$B%a%C%;!<%8$r=8$a$?2>A[E*$J%U%)%k%@$r9=@.$7$^$9!#\e(B
+
+\e$B30It%W%m%0%i%`$rMQ$$$F!"8!:w<0$K%^%C%A$7$?%a%C%;!<%8$r=8$a$?2>A[E*$J%U%)\e(B
+\e$B%k%@$r9=@.$7$^$9!#\e(B
\e$B=q<0\e(B:
@example
@group
-@samp{[} @var{namazu \e$B8!:w<0\e(B} @samp{]} [ @var{\e$B%$%s%G%C%/%9$N%Q%9!J@dBP%Q%9!K\e(B} ]
+@samp{[} @var{\e$B8!:w<0\e(B} @samp{]} [ @var{\e$B8!:wBP>]\e(B} [ @samp{!} @var{\e$B8!:wJ}<0\e(B} ] ]
@end group
@end example
-\e$B%$%s%G%C%/%9$N%Q%9$N%G%U%)%k%HCM$O\e(B @code{elmo-nmz-default-index-path} \e$B$G;XDj$G$-$^$9!#\e(B
+\e$B8!:w<0$H8!:wBP>]$N;XDjJ}K!$O!"8!:wJ}<0$K$h$C$F0[$J$j$^$9!#\e(B
+
+@subsection \e$BBP1~$7$F$$$k8!:wJ}<0\e(B
+
+\e$B%G%U%)%k%H$G$O!"0J2<$N8!:wJ}<0$KBP1~$7$F$$$^$9!#8!:wJ}<0$r>JN,$7$?>l9g$O!"\e(B
+@code{elmo-search-default-engine} \e$B$G;XDj$5$l$?8!:wJ}<0$,;HMQ$5$l$^$9!#\e(B
+
+@menu
+* namazu:: namazu
+* grep:: grep
+@end menu
+
+
+@node namazu, grep, Search Folder, Folders
+@section namazu
+@pindex namazu
+
+namazu (@uref{http://www.namazu.org/}) \e$B$r;H$C$F!"%$%s%G%C%/%9$KEPO?$5$l$?\e(B
+\e$BJ8=q$r8!:w$7$^$9!#\e(B
+
+\e$B8!:w<0$O!"\e(Bnamazu \e$B$N8!:w<0$G$9!#>\$7$/$O!"\e(Bnamazu \e$B$KIUB0$NJ8=q$r;2>H$7$F2<\e(B
+\e$B$5$$!#\e(B
+
+\e$B8!:wBP>]$K$O!";HMQ$9$k%$%s%G%C%/%9$r;XDj$7$^$9!#%$%s%G%C%/%9$N$"$k%G%#%l\e(B
+\e$B%/%H%j$N%Q%9$r$=$N$^$^;XDj$9$k$+!"0J2<$N@bL@$K$"$kJLL>$r;XDj$9$k;v$,=PMh\e(B
+\e$B$^$9!#%$%s%G%C%/%9$r>JN,$7$?>l9g$O!"\e(B
+@code{elmo-search-namazu-default-index-path} \e$B$G;XDj$5$l$?CM$,;HMQ$5$l$^$9!#\e(B
\e$BNc\e(B:
\e$B%$%s%G%C%/%9$K$O%(%$%j%"%9L>\e(B(\e$BJLL>\e(B)\e$B$rDj5A$G$-$^$9!#\e(B
@example
-(setq elmo-nmz-index-alias-alist
+(setq elmo-search-namazu-index-alias-alist
'(("cache" . "~/.elmo/cache")
("docs" . "~/documents")))
@end example
@subsubsection \e$BJ#?t%$%s%G%C%/%9$N;XDj\e(B
-@code{elmo-nmz-default-index-path}, @code{elmo-nmz-index-alias-alist} \e$B$N\e(B
-\e$BCM$H$7$F%$%s%G%C%/%9$N%j%9%H$r;XDj$9$k$3$H$b2DG=$G$9!#\e(B
-\e$B%j%9%H$r;XDj$9$k$H!"J#?t$N%$%s%G%C%/%9$rBP>]$H$7$?8!:w$H$J$j$^$9!#\e(B
+@code{elmo-search-namazu-default-index-path},
+@code{elmo-search-namazu-index-alias-alist} \e$B$NCM$H$7$F%$%s%G%C%/%9$N%j%9\e(B
+\e$B%H$r;XDj$9$k$3$H$b2DG=$G$9!#%j%9%H$r;XDj$9$k$H!"J#?t$N%$%s%G%C%/%9$rBP>]\e(B
+\e$B$H$7$?8!:w$H$J$j$^$9!#\e(B
\e$BNc$($P!"\e(B
@example
-(setq elmo-nmz-index-alias-alist
+(setq elmo-search-namazu-index-alias-alist
'(("all" . ("~/.elmo/cache" "~/documents"))
("cache" . "~/.elmo/cache")))
@end example
[wanderlust]all
@end example
-\e$B$HF~NO$9$l$P!"\e(B@file{~/.elmo/cache} \e$B$H\e(B @file{~/documents} \e$B$N%$%s%G%C%/%9$rBP>]$H$7$F!"%-!<%o!<%I\e(B @samp{wanderlust} \e$B$G8!:w$r9T$$$^$9!#\e(B
+\e$B$HF~NO$9$l$P!"\e(B@file{~/.elmo/cache} \e$B$H\e(B @file{~/documents} \e$B$N%$%s%G%C%/%9$r\e(B
+\e$BBP>]$H$7$F!"%-!<%o!<%I\e(B @samp{wanderlust} \e$B$G8!:w$r9T$$$^$9!#\e(B
+
+@node grep, Multi Folder, namazu, Folders
+@section grep
+@pindex grep
+
+grep \e$B$r;H$C$F!"8!:wBP>]$G;XDj$5$l$?%G%#%l%/%H%j$K$"$k%U%!%$%k$r8!:w$7$^$9!#\e(B
+
+\e$B8!:w<0$K$O!"\e(Bgrep \e$B$N@55,I=8=$r;XDj$7$^$9!#8!:wBP>]$H$9$k%G%#%l%/%H%j$r>JN,\e(B
+\e$B$9$k;v$O=PMh$^$;$s!#\e(B
+
+\e$BNc\e(B:
+
+@example
+@group
+[wanderlust]~/Mail/inbox!grep
+ -> \e$B%G%#%l%/%H%j\e(B "~/Mail/inbox" \e$B$+$i\e(B
+ "wanderlust" \e$B$K%^%C%A$9$k$b$N$rC5$9\e(B
+
+["[sr]emi"]~/Mail/semi!grep
+ -> \e$B8!:w<0$,\e(B @samp{]} \e$B$r4^$`@55,I=8=$G$"$k>l9g$O!"\e(B
+ @samp{"} \e$B$G0O$`I,MW$,$"$j$^$9\e(B
+@end group
+@end example
-@node Multi Folder, Filter Folder, Namazu Folder, Folders
+@node Multi Folder, Filter Folder, grep, Folders
@section \e$B%^%k%A%U%)%k%@\e(B
@cindex @samp{*}
@cindex Multi Folder
As of version @value{VERSION}, 15 types of folders are predefined. These
are IMAP, NNTP, LocalDir(MH), Maildir, News Spool, Archive, POP,
-Shimbun, Namazu, Multi, Filter, Pipe, File, Access and Internal folder
+Shimbun, Search, Multi, Filter, Pipe, File, Access and Internal folder
types.
@menu
* Archive Folder:: @samp{$} -- Archive folder
* POP Folder:: @samp{&} -- POP folder
* Shimbun Folder:: @samp{@@} -- Shimbun Folder
-* Namazu Folder:: @samp{[} -- Namazu Folder
+* Search Folder:: @samp{[} -- Search Folder
* Multi Folder:: @samp{*} -- Multi folder
* Filter Folder:: @samp{/} -- Filter folder
* Pipe Folder:: @samp{|} -- Pipe folder
folder name.
-@node Shimbun Folder, Namazu Folder, POP Folder, Folders
+@node Shimbun Folder, Search Folder, POP Folder, Folders
@section Shimbun Folder
@cindex @samp{@@}
@cindex Shimbun Folder
'("^@@airs\\." "^@@namazu\\."))
@end example
-@kbd{s rescan} is needed after fetching to update summary view.
+Update summary view automatically after fetching.
@end table
-@node Namazu Folder, Multi Folder, Shimbun Folder, Folders
-@section Namazu Folder
+@node Search Folder, namazu, Shimbun Folder, Folders
+@section Search Folder
@cindex @samp{[}
-@cindex Namazu Folder
-@cindex Folder, Namazu
+@cindex Search Folder
+@cindex Folder, Search
@cindex Folder, Text Search
-@pindex Namazu
-@pindex nmz
-A folder to access messages found in namazu-index with some condition.
-It uses namazu (@uref{http://www.namazu.org/}) for search.
+
+A folder to access messages found by an external program with some
+condition.
Format:
@example
@group
-@samp{[} @var{search condition} @samp{]} [ @var{absolute path of namazu index} ]
+@samp{[} @var{search condition} @samp{]} [ @var{search target} [ @samp{!} @var{search engine} ] ]
@end group
@end example
-Default value of the path of namazu index can be assigned by @code{elmo-nmz-default-index-path}.
+The format of the @var{search condition} and @var{search target} depend
+on the @var{search engine}.
+
+@subsection Supported search engines
+
+Supported search engines are following ones. Default search engine can
+be assigned by @code{elmo-search-default-engine}.
+
+@menu
+* namazu:: namazu
+* grep:: grep
+@end menu
+
+
+@node namazu, grep, Search Folder, Folders
+@section namazu
+@pindex namazu
+
+The messages registered in the namazu-index is found by using namazu
+(@uref{http://www.namazu.org/}).
+
+@var{search condition} is a query of namazu. Please refer to the
+document of the attached to namazu for details.
+
+@var{search target} is a namazu-index used for search. The directory
+with the index or the alias that explain in the following can be
+specified. Default value of the path of namazu index can be assigned by
+@code{elmo-search-namazu-default-index-path}.
Example:
Example:
@example
-(setq elmo-nmz-index-alias-alist
+(setq elmo-search-namazu-index-alias-alist
'(("cache" . "~/.elmo/cache")
("docs" . "~/documents")))
@end example
@subsubsection Multiple indices
-You can specify a list for @code{elmo-nmz-default-index-path} and
-@code{elmo-nmz-index-alias-alist}.
+You can specify a list for @code{elmo-search-namazu-default-index-path} and
+@code{elmo-search-namazu-index-alias-alist}.
When list is specified, all index contained in the list is used as the
namazu indices.
Example:
@example
-(setq elmo-nmz-index-alias-alist
+(setq elmo-search-namazu-index-alias-alist
'(("all" . ("~/.elmo/cache" "~/documents"))
("cache" . "~/.elmo/cache")))
@end example
to execute a namazu search with keyword @samp{wanderlust} using indices in the
directory @file{~/.elmo/cache} and @file{~/documents}.
-@node Multi Folder, Filter Folder, Namazu Folder, Folders
+@node grep, Multi Folder, namazu, Folders
+@section grep
+@pindex grep
+
+The files that exists in the directory specified with the @var{search
+target} are found by using grep.
+
+@var{search condition} is a regular expression of grep. The directory
+as @var{search target} cannot be omitted.
+
+Example:
+
+@example
+@group
+[wanderlust]~/Mail/inbox!grep
+ -> search messages matched with "wanderlust"
+ from the directory "~/Mail/inbox"
+
+["[sr]emi"]~/Mail/semi!grep
+ -> If @samp{]} is included in regular expression,
+ @var{search condition} should be enclosed with @samp{"}.
+@end group
+@end example
+
+
+@node Multi Folder, Filter Folder, grep, Folders
@section Multi Folder
@cindex @samp{*}
@cindex Multi Folder
2005-09-17 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * elmo.el (toplevel): `[' is redefined as the prefix of the search
+ folder instead of nmz folder.
+ (elmo-nmz-default-index-path): Added obsolete variable setting.
+ (elmo-nmz-index-alias-alist): Ditto.
+ (elmo-nmz-use-drive-letter): Ditto.
+
+ * elmo-search.el (elmo-search-register-engine): New function.
+
+ * elmo-nmz.el: Removed.
+
* elmo-version.el (elmo-version): Up to 2.15.2.
2005-09-10 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+++ /dev/null
-;;; elmo-nmz.el --- Namazu interface for ELMO.
-
-;; Copyright (C) 2000 Yuuichi Teranishi <teranisi@gohome.org>
-
-;; Author: Yuuichi Teranishi <teranisi@gohome.org>
-;; Keywords: mail, net news
-
-;; This file is part of ELMO (Elisp Library for Message Orchestration).
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-;;
-
-;;; Commentary:
-;;
-
-;;; Code:
-;;
-(eval-when-compile (require 'cl))
-
-(require 'elmo)
-(require 'elmo-map)
-(require 'mime-edit)
-
-(defcustom elmo-nmz-default-index-path "~/Mail"
- "*Default index path for namazu.
-If the value is a list, all elements are used as index paths for namazu."
- :type 'directory
- :group 'elmo)
-
-(defcustom elmo-nmz-prog "namazu"
- "*Program name of namazu."
- :type 'string
- :group 'elmo)
-
-(defcustom elmo-nmz-charset 'iso-2022-jp
- "*Charset for namazu argument."
- :type 'symbol
- :group 'elmo)
-
-(defcustom elmo-nmz-args '("--all" "--list" "--late")
- "*Argument list for namazu to list matched files."
- :type '(repeat string)
- :group 'elmo)
-
-(defcustom elmo-nmz-index-alias-alist nil
- "*Alist of ALIAS and INDEX-PATH."
- :type '(repeat (cons (string :tag "Alias Name")
- (choice (directory :tag "Index Path")
- (repeat (directory :tag "Index Path")))))
- :group 'elmo)
-
-(defvar elmo-nmz-use-drive-letter (if (memq system-type
- '(OS/2 emx windows-nt)) t nil)
- "*If non-nil, do a drive letter conversion (e.g. /a|/ => a:/).")
-
-;;; "namazu search"
-(eval-and-compile
- (luna-define-class elmo-nmz-folder
- (elmo-map-folder) (pattern index-path))
- (luna-define-internal-accessors 'elmo-nmz-folder))
-
-(luna-define-method elmo-folder-initialize ((folder
- elmo-nmz-folder)
- name)
- (when (> (length name) 0)
- (with-temp-buffer
- (insert "[" name)
- (goto-char (point-min))
- (forward-sexp)
- (elmo-nmz-folder-set-pattern-internal folder
- (buffer-substring
- (+ 1 (point-min))
- (- (point) 1)))
- (let ((index (buffer-substring (point) (point-max))))
- (elmo-nmz-folder-set-index-path-internal
- folder
- (cond ((cdr (assoc index elmo-nmz-index-alias-alist)))
- ((eq (length index) 0)
- elmo-nmz-default-index-path)
- (t
- index))))))
- folder)
-
-(luna-define-method elmo-folder-expand-msgdb-path ((folder
- elmo-nmz-folder))
- (expand-file-name
- (elmo-replace-string-as-filename
- (elmo-folder-name-internal folder))
- (expand-file-name "nmz" elmo-msgdb-directory)))
-
-(defun elmo-nmz-msgdb-create-entity (msgdb folder number)
- "Create msgdb entity for the message in the FOLDER with NUMBER."
- (let ((location (expand-file-name (elmo-map-message-location folder number)))
- entity uid)
- (setq entity (elmo-msgdb-create-message-entity-from-file
- (elmo-msgdb-message-entity-handler msgdb) number location))
- (unless (or (elmo-message-entity-field entity 'to)
- (elmo-message-entity-field entity 'cc)
- (not (string= (elmo-message-entity-field entity 'subject)
- elmo-no-subject)))
- (elmo-message-entity-set-field entity 'subject location)
- (setq uid (nth 2 (file-attributes location)))
- (elmo-message-entity-set-field entity 'from
- (concat
- (user-full-name uid)
- " <"(user-login-name uid) "@"
- (system-name) ">")))
- entity))
-
-(luna-define-method elmo-folder-msgdb-create ((folder elmo-nmz-folder)
- numlist flag-table)
- (let ((new-msgdb (elmo-make-msgdb))
- entity mark i percent num)
- (setq num (length numlist))
- (setq i 0)
- (message "Creating msgdb...")
- (while numlist
- (setq entity
- (elmo-nmz-msgdb-create-entity
- new-msgdb folder (car numlist)))
- (when entity
- (elmo-msgdb-append-entity new-msgdb entity '(new unread)))
- (when (> num elmo-display-progress-threshold)
- (setq i (1+ i))
- (setq percent (/ (* i 100) num))
- (elmo-display-progress
- 'elmo-folder-msgdb-create "Creating msgdb..."
- percent))
- (setq numlist (cdr numlist)))
- (message "Creating msgdb...done")
- new-msgdb))
-
-(luna-define-method elmo-folder-message-file-p ((folder elmo-nmz-folder))
- t)
-
-(luna-define-method elmo-message-file-name ((folder elmo-nmz-folder)
- number)
- (elmo-map-message-location folder number))
-
-(luna-define-method elmo-folder-message-make-temp-file-p
- ((folder elmo-nmz-folder))
- t)
-
-(luna-define-method elmo-folder-diff ((folder elmo-nmz-folder))
- (cons nil nil))
-
-(luna-define-method elmo-folder-message-make-temp-files ((folder
- elmo-nmz-folder)
- numbers
- &optional
- start-number)
- (let ((temp-dir (elmo-folder-make-temporary-directory folder))
- (cur-number (if start-number 0)))
- (dolist (number numbers)
- (elmo-copy-file
- (elmo-message-file-name folder number)
- (expand-file-name
- (int-to-string (if start-number (incf cur-number) number))
- temp-dir)))
- temp-dir))
-
-(luna-define-method elmo-map-message-fetch ((folder elmo-nmz-folder)
- location strategy
- &optional section unseen)
- (when (file-exists-p location)
- (prog1
- (insert-file-contents-as-binary (expand-file-name location))
- (unless (or (std11-field-body "To")
- (std11-field-body "Cc")
- (std11-field-body "Subject"))
- (let (charset guess uid)
- (erase-buffer)
- (set-buffer-multibyte t)
- (insert-file-contents (expand-file-name location))
- (setq charset (detect-mime-charset-region (point-min)
- (point-max)))
- (goto-char (point-min))
- (setq guess (mime-find-file-type location))
- (setq uid (nth 2 (file-attributes location)))
- (insert "From: " (concat (user-full-name uid)
- " <"(user-login-name uid) "@"
- (system-name) ">") "\n")
- (insert "Subject: " location "\n")
- (insert "Content-Type: "
- (concat (nth 0 guess) "/" (nth 1 guess))
- "; charset=" (upcase (symbol-name charset))
- "\nMIME-Version: 1.0\n\n")
- (encode-mime-charset-region (point-min) (point-max) charset)
- (set-buffer-multibyte nil))))))
-
-(luna-define-method elmo-map-folder-list-message-locations
- ((folder elmo-nmz-folder))
- (let (bol locations)
- (with-temp-buffer
- (apply 'call-process elmo-nmz-prog nil t t
- (append elmo-nmz-args
- (list
- (encode-mime-charset-string
- (elmo-nmz-folder-pattern-internal folder)
- elmo-nmz-charset))
- (if (listp (elmo-nmz-folder-index-path-internal folder))
- (mapcar
- 'expand-file-name
- (elmo-nmz-folder-index-path-internal folder))
- (list
- (expand-file-name
- (elmo-nmz-folder-index-path-internal folder))))))
- (goto-char (point-min))
- (while (not (eobp))
- (beginning-of-line)
- ;; convert url to file path.
- (when (looking-at "^file://")
- (replace-match ""))
- (when (and elmo-nmz-use-drive-letter
- (looking-at "^/\\([A-Za-z]\\)|/"))
- (replace-match "\\1:/")
- (beginning-of-line))
- (setq bol (point))
- (end-of-line)
- (setq locations (cons (buffer-substring bol (point)) locations))
- (forward-line 1))
- (nreverse locations))))
-
-(luna-define-method elmo-folder-exists-p ((folder elmo-nmz-folder))
- (elmo-nmz-folder-pattern-internal folder))
-
-(luna-define-method elmo-folder-have-subfolder-p ((folder elmo-nmz-folder))
- (null (elmo-nmz-folder-pattern-internal folder)))
-
-(luna-define-method elmo-folder-list-subfolders ((folder elmo-nmz-folder)
- &optional one-level)
- (mapcar (lambda (name) (elmo-recover-string-from-filename name))
- (directory-files (expand-file-name "nmz" elmo-msgdb-directory)
- nil
- (concat
- "^"
- (regexp-quote
- (elmo-folder-prefix-internal folder))))))
-
-(require 'product)
-(product-provide (provide 'elmo-nmz) (require 'elmo-version))
-
-;;; elmo-nmz.el ends here
:param param
(cdr spec))))
+(defun elmo-search-register-engine (name class &rest properties)
+ (let ((cell (assq name elmo-search-engine-alist))
+ (spec (cons class properties)))
+ (if cell
+ (setcdr cell spec)
+ (setq elmo-search-engine-alist
+ (cons (cons name spec) elmo-search-engine-alist)))))
;; ELMO search folder
(eval-and-compile
(mapcar 'expand-file-name index)
(expand-file-name index))))
+
;; grep
(defun elmo-search-grep-target (engine)
(let ((dirname (expand-file-name (elmo-search-engine-param-internal engine)))
(elmo-define-folder ?| 'pipe)
(elmo-define-folder ?. 'maildir)
(elmo-define-folder ?' 'internal)
-(elmo-define-folder ?\[ 'nmz)
+(elmo-define-folder ?\[ 'search)
(elmo-define-folder ?@ 'shimbun)
;;; Obsolete variables.
'elmo-msgdb-directory)
(elmo-define-obsolete-variable 'elmo-global-flag-list
'elmo-global-flags)
+(elmo-define-obsolete-variable 'elmo-nmz-default-index-path
+ 'elmo-search-namazu-default-index-path)
+(elmo-define-obsolete-variable 'elmo-nmz-index-alias-alist
+ 'elmo-search-namazu-index-alias-alist)
+(elmo-define-obsolete-variable 'elmo-nmz-use-drive-letter
+ 'elmo-search-use-drive-letter)
+
;; Obsolete functions.
;; 2001-12-11: *-dir -> *-directory