* lsdb.el (lsdb-save-file): Reduce the actual size of the hash table
[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 .* Installation
10
11 .. (a) run in expanded place
12
13 If you don't want to install other directories, please do only
14 following:
15
16         % make
17
18 You can specify the emacs command name, for example
19
20         % make install EMACS=xemacs
21
22 If `EMACS=...' is omitted, EMACS=emacs is used.
23
24 .. (b) make install
25
26 If you want to install other directories, please do following:
27
28         % make install
29
30 .. (c) install as a XEmacs package
31
32 If you want to install to XEmacs package directory, please do
33 following:
34
35         % make install-package
36
37 .* MUA Specific Installation
38
39 There are the convenient ways to get the LSDB functions insinuate into
40 some particular MUA.  Only Semi-gnus and Wanderlust are currently
41 supported.
42
43 If you use Semi-gnus or its variant, put the following lines into your
44 ~/.gnus and you will get the functions in this package autoloaded.
45
46 (autoload 'lsdb-gnus-insinuate "lsdb")
47 (autoload 'lsdb-gnus-insinuate-message "lsdb")
48 (add-hook 'gnus-startup-hook 'lsdb-gnus-insinuate)
49 (add-hook 'message-setup-hook
50           (lambda ()
51              (define-key message-mode-map "\M-\t" 'lsdb-complete-name)))
52
53 If you use Wanderlust, put the following lines into your ~/.wl:
54 (require 'lsdb)
55 (lsdb-wl-insinuate)
56 (add-hook 'wl-draft-mode-hook
57           (lambda ()
58              (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name)))
59
60 If you use Mew, put the following lines into your ~/.mew:
61 (autoload 'lsdb-mew-insinuate "lsdb")
62 (add-hook 'mew-init-hook 'lsdb-mew-insinuate)
63 (add-hook 'mew-draft-mode-hook
64           (lambda ()
65              (define-key mew-draft-header-map "\M-\t" 'lsdb-complete-name)))
66
67 If you use MU-CITE, put the following lines into your ~/.emacs:
68 (autoload 'lsdb-mu-insinuate "lsdb")
69 (eval-after-load "mu-cite"
70   '(lsdb-mu-insinuate))
71
72 If you want to use x-face-e21 instead of the LSDB's builtin X-Face
73 functions, set lsdb-insert-x-face-function as follows:
74 (setq lsdb-insert-x-face-function
75       (lambda (x-face)
76         (require 'x-face-e21)
77         (insert-image (x-face-create-image x-face :scale-factor 0.5))))
78
79 .* Bug reports
80 If you found bugs, please drop a note to the EMACS-MIME Mailing List:
81
82         emacs-mime-en@m17n.org  (English)
83         emacs-mime-ja@m17n.org  (Japanese)
84
85 .* API
86 The API are quite simple but not written in a way that maximizes
87 flexibility.
88
89 .. Gathering Records
90 . : lsdb-update-records<f>
91 lsdb-update-records<f> is called from the buffer which contains raw
92 contents of MIME entity.  Once it is called, it returns a list of
93 records which could be gathered from the buffer.
94
95 .. Display Records
96 . : lsdb-display-record<f>
97 lsdb-display-record<f> takes only one record, pops up a window, and
98 displays the formatted contents of the record within the window.
99 If you want to multiple records such as search results at the same
100 time, use lsdb-display-records<f> instead.
101
102 .. Internal Data Model
103 . : lsdb-hash-table
104 lsdb-hash-table is the variable which holds all the records in LSDB.
105 You can operate on this variable in similar fashion to CL's
106 hash-table: lsdb-puthash for puthash, lsdb-gethash to gethash,
107 lsdh-maphash to maphash are available to you.  For example, you can
108 write the following expression to get the record for "Daiki Ueno":
109
110 (lsdb-gethash "Daiki Ueno" lsdb-hash-table)
111
112 =>
113
114 ((last-modified . "2002-04-23")
115  (creation-date . "2002-04-26")
116  (net "ueno@unixuser.org")
117  (mailing-list "emacs-mime-ja")
118  (attribution . "DU")
119  (user-agent "T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 03)"))
120
121 .* Local emacs vars.
122 The following `outline-layout' local variable setting:
123   - closes all topics from the first topic to just before the third-to-last,
124   - shows the children of the third to last (config vars)
125   - and the second to last (code section),
126   - and closes the last topic (this local-variables section).
127 Local variables:
128 outline-layout: (0 : -1 -1 0)
129 End: