* lsdb.el (lsdb-temp-buffer-show-function): Fix the last change.
[elisp/lsdb.git] / README
1 -*- mode: text -*-
2 .* What's LSDB
3
4 LSDB (The Lovely Sister Database) is a rolodex-like database program
5 for SEMI based MUA.  It's intended to be a lightweight relacement for
6 BBDB (The Insidious Big Brother Database).  Unfortunately, it
7 currently doesn't support the all features of BBDB.
8
9 .* Requirements
10 LSDB works under following environment at least:
11
12   - Emacs 20.7
13   - XEmacs 21.4 or later
14
15 You will also need the following libraries:
16
17   - APEL 10.2 or later
18        ftp://ftp.m17n.org/pub/mule/apel/
19   - FLIM 1.12 or later
20        ftp://ftp.m17n.org/pub/mule/flim/
21
22 .* Installation
23
24 .. (a) run in expanded place
25
26 If you don't want to install other directories, please do only
27 following:
28
29         % make
30
31 You can specify the emacs command name, for example
32
33         % make install EMACS=xemacs
34
35 If `EMACS=...' is omitted, EMACS=emacs is used.
36
37 .. (b) make install
38
39 If you want to install other directories, please do following:
40
41         % make install
42
43 .. (c) install as a XEmacs package
44
45 If you want to install to XEmacs package directory, please do
46 following:
47
48         % make install-package
49
50 .* MUA Specific Installation
51
52 There are the convenient ways to get the LSDB functions insinuate into
53 some particular MUA.  Only Semi-gnus and Wanderlust are currently
54 supported.
55
56 If you use Semi-gnus or its variant, put the following lines into your
57 ~/.gnus and you will get the functions in this package autoloaded.
58
59 (autoload 'lsdb-gnus-insinuate "lsdb")
60 (autoload 'lsdb-gnus-insinuate-message "lsdb")
61 (add-hook 'gnus-startup-hook 'lsdb-gnus-insinuate)
62 (add-hook 'message-setup-hook
63           (lambda ()
64              (define-key message-mode-map "\M-\t" 'lsdb-complete-name)))
65
66 If you use Wanderlust, put the following lines into your ~/.wl:
67 (require 'lsdb)
68 (lsdb-wl-insinuate)
69 (add-hook 'wl-draft-mode-hook
70           (lambda ()
71              (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name)))
72
73 If you use Mew, put the following lines into your ~/.mew:
74 (autoload 'lsdb-mew-insinuate "lsdb")
75 (add-hook 'mew-init-hook 'lsdb-mew-insinuate)
76 (add-hook 'mew-draft-mode-hook
77           (lambda ()
78              (define-key mew-draft-header-map "\M-\t" 'lsdb-complete-name)))
79
80 If you use MU-CITE, put the following lines into your ~/.emacs:
81 (autoload 'lsdb-mu-insinuate "lsdb")
82 (eval-after-load "mu-cite"
83   '(lsdb-mu-insinuate))
84
85 If you want to use x-face-e21 instead of the LSDB's builtin X-Face
86 functions, set lsdb-insert-x-face-function as follows:
87 (setq lsdb-insert-x-face-function
88       (lambda (x-face)
89         (require 'x-face-e21)
90         (insert-image (x-face-create-image x-face :scale-factor 0.5))))
91
92 .* Bug reports
93 If you found bugs, please drop a note to the Lsdb-info Mailing List:
94
95    lsdb-info@lists.sourceforge.jp
96
97 .* File Release
98 Latest version of LSDB can be found at:
99
100    http://sourceforge.jp/projects/lsdb/files/
101
102 .* API
103 The API are quite simple but not written in a way that maximizes
104 flexibility.
105
106 .. Record Management
107 . : Gathering Records
108 .  , lsdb-update-records<f>
109 lsdb-update-records<f> is called from the buffer which contains raw
110 contents of MIME entity.  Once it is called, it returns a list of
111 records which could be gathered from the buffer.
112
113 . : Display Records
114 .  , lsdb-display-record<f>
115 lsdb-display-record<f> takes only one record, pops up a window, and
116 displays the formatted contents of the record within the window.
117 If you want to multiple records such as search results at the same
118 time, use lsdb-display-records<f> instead.
119
120 .. Internal Data Model
121 . : Primary Hash Table
122 lsdb-hash-table is the variable which holds all the records in LSDB.
123 You can operate on this variable in similar fashion to CL's
124 hash-table: lsdb-puthash for puthash, lsdb-gethash to gethash,
125 lsdh-maphash to maphash are available to you.  For example, you can
126 write the following expression to get the record for "Daiki Ueno":
127
128 (lsdb-gethash "Daiki Ueno" lsdb-hash-table)
129
130 =>
131
132 ((last-modified . "2002-04-23")
133  (creation-date . "2002-04-26")
134  (net "ueno@unixuser.org")
135  (mailing-list "emacs-mime-ja")
136  (attribution . "DU")
137  (user-agent "T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 03)"))
138
139 . : Secondary Hash Tables
140 LSDB can also have one or more secondary hash tables.  These hash
141 tables are mainly used to hint lsdb-hash-table to gather additional
142 relationship information between record name and entries.  For
143 example, lsdb-address-cache is a kind of secondary hash table which
144 maintains the mapping of mail addresses to record names.
145
146 The variable lsdb-secondary-hash-tables holds a list where each
147 element is corresponding to the name of global variable such as
148 lsdb-address-cache.  When the primary hash table is loaded or saved,
149 the secondary hash tables will be handled automatically.
150
151 .  , Operate on Secondary Hash Tables
152 You will need to follow the manner of the LSDB hooks.
153
154 .   ; lsdb-lookup-full-name-functions
155 List of functions to pick up the existing full-name of the sender.
156 The sender is passed to each function as the argument.
157
158 .   ; lsdb-update-record-functions
159 List of functions called after a record is modified.
160 The modified record is passed to each function as the argument.
161
162 .* Development
163 .. CVS
164 Development of LSDB uses CVS.  So latest developing version is
165 available at CVS.
166
167 . : cvs login (first time only)
168
169   % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login
170
171   CVS password: [CR] # NULL string
172
173 . : checkout
174
175   % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout lsdb
176
177   If you would like to join CVS based development, please send mail to
178
179   cvs@cvs.m17n.org
180
181 with your account name and your public key for ssh.  cvsroot is
182 :ext:cvs@cvs.m17n.org:/cvs/root.
183
184 If you cannot use ssh, please send UNIX /etc/passwd style crypted
185 password.  you can commit with the cvsroot
186 :pserver:<accountname>@cvs.m17n.org:/cvs/root.
187
188 We hope you will join the open development.
189  
190 .* Local emacs vars.
191 The following `outline-layout' local variable setting:
192   - closes all topics from the first topic to just before the third-to-last,
193   - shows the children of the third to last (config vars)
194   - and the second to last (code section),
195   - and closes the last topic (this local-variables section).
196 Local variables:
197 outline-layout: (0 : -1 -1 0)
198 End: