* elmo-mark.el (elmo-message-fetch-with-cache-process): Fixed typo.
[elisp/wanderlust.git] / elmo / elmo-vars.el
1 ;;; elmo-vars.el -- User variables for ELMO.
2
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
4
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
7
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
9
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14 ;;
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ;; GNU General Public License for more details.
19 ;;
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24 ;;
25
26 ;;; Commentary:
27 ;; 
28
29 ;;; Code:
30 ;; 
31 (require 'poe)
32
33 ;; silence byte compiler
34 (eval-when-compile
35   (defun-maybe dynamic-link (a))
36   (defun-maybe dynamic-call (a b)))
37
38 (defgroup elmo nil
39   "ELMO, Elisp Library for Message Orchestration."
40   :tag "ELMO"
41   :group 'news
42   :group 'mail)
43
44 ;; Local
45 (defvar elmo-localnews-folder-path "~/News"
46   "*Local news folder path.")
47 (defvar elmo-maildir-folder-path "~/Maildir"
48   "*Maildir folder path.")
49 (defvar elmo-maildir-list '("\\+~/Maildir")
50   "*All Folders that match this list will be treated as Maildir.
51 Each elements are regexp of folder name (This is obsolete).")
52
53 (defvar elmo-msgdb-file-header-chop-length 2048
54   "*Number of bytes to get header in one reading from file.")
55
56 (defvar elmo-msgdb-dir "~/.elmo"
57   "*ELMO Message Database path.")
58 (defvar elmo-passwd-alist-file-name "passwd"
59   "*ELMO Password filename.")
60 (defvar elmo-passwd-life-time nil
61   "*Duration of ELMO Password in seconds.  nil means infinity.")
62
63 (defvar elmo-warning-threshold 30000
64   "*Display warning when the bytes of message exceeds this value.")
65
66 (defvar elmo-msg-appended-hook nil
67   "A hook called when message is appended to database.")
68 (defvar elmo-msg-deleted-hook nil
69   "A hook called when message is deleted from database.")
70 (defvar elmo-nntp-post-pre-hook nil
71   "A hook called just before the nntp posting.")
72 (defvar elmo-lang "ja"
73   "Language for displayed messages.")
74
75 (defvar elmo-mime-charset 'iso-2022-jp)
76
77 (defvar elmo-msgdb-mark-filename "mark"
78   "Mark database.")
79 (defvar elmo-msgdb-overview-filename "overview"
80   "Overview database.")
81 (defvar elmo-msgdb-number-filename "number"
82   "Message number <=> Message-ID database.")
83 (defvar elmo-msgdb-location-filename "location"
84   "Message number <=> Actual location symbol.")
85 (defvar elmo-msgdb-seen-filename "seen"
86   "Seen message list for append.")
87 (defvar elmo-msgdb-killed-filename "killed"
88   "Deleted messages... contains elmo-killed-msgs-list.")
89 (defvar elmo-msgdb-validity-filename "validity")
90 (defvar elmo-msgdb-flist-filename "flist"
91   "Folder list cache (for access folder).")
92 (defvar elmo-msgdb-finfo-filename "finfo"
93   "Folder information cache...list of '(filename . '(new unread all)).")
94 (defvar elmo-msgdb-lock-list-filename "lock"
95   "Locked messages...list of message-id.
96 For disconnected operations.")
97 (defvar elmo-msgdb-global-mark-filename "global-mark"
98   "Alist of global mark.")
99 (defvar elmo-lost+found-folder "+lost+found"
100   "Lost and found.")
101 (defvar elmo-crosspost-alist-filename "crosspost-alist"
102   "Alist of crosspost messages.")
103
104 (defvar elmo-use-server-diff t
105   "Non-nil forces to get unread message information on server.")
106
107 (defvar elmo-strict-diff-folder-list nil
108   "List of regexps of folder name which should be checked its diff strictly.")
109
110 (defvar elmo-msgdb-extra-fields nil
111   "Extra fields for msgdb.")
112
113 (defvar elmo-enable-disconnected-operation t
114   "*Enable disconnected operations.")
115
116 (defvar elmo-auto-change-plugged 600
117   "*Time to expire change plugged state automatically, as the number of seconds.
118 Don't change plugged state automatically if nil.")
119 (defvar elmo-plugged-condition 'one
120   "*The condition for `elmo-plugged' becomes on.
121 If `all', when all ports are on.  If `one', when even one port is on.
122 If `independent', independent port plugged.
123 If function, return value of function.")
124
125 (defvar elmo-plug-on-servers nil)
126
127 (defvar elmo-plug-on-exclude-servers
128   (list "localhost"
129         (system-name)
130         (and (string-match "[^.]+" (system-name))
131              (substring (system-name) 0 (match-end 0)))))
132
133 (defvar elmo-plugged-alist nil)
134
135 (defvar elmo-dop-flush-confirm t
136   "*Flush disconnected operations queue with confirmation.")
137
138 (defvar elmo-path-sep "/"
139   "*Path separator.")
140 (defvar elmo-plugged t)
141 (defvar elmo-use-semi nil)
142
143 (defvar elmo-no-subject "(No Subject in original.)"
144   "*A string used when no subject field exists.")
145 (defvar elmo-no-from "nobody@nowhere?"
146   "*A string used when no from field exists.")
147
148 ;; database dynamic linking
149 (defvar elmo-database-dl-module
150   (expand-file-name "database.so" exec-directory))
151
152 (defvar elmo-database-dl-handle
153   (if (and (fboundp 'dynamic-link)
154            (file-exists-p
155             elmo-database-dl-module))
156       (if (fboundp 'open-database)
157           t ;;
158         (dynamic-link elmo-database-dl-module))))
159
160 (if (and elmo-database-dl-handle
161          (integerp elmo-database-dl-handle))
162     (dynamic-call "emacs_database_init" elmo-database-dl-handle))
163
164 (defvar elmo-use-database (or (featurep 'dbm)
165                               (featurep 'gnudbm)
166                               (featurep 'berkdb)
167                               (featurep 'berkeley-db)
168                               ;; static/dl-database
169                               (fboundp 'open-database)))
170
171 (defvar elmo-date-match (not (boundp 'nemacs-version))
172   "Date match is available or not.")
173
174 (defvar elmo-network-stream-type-alist
175   '(("!"      ssl       ssl      open-ssl-stream)
176     ("!!"     starttls  starttls starttls-open-stream)
177     ("!socks" socks     socks    socks-open-network-stream))
178   "An alist of (SPEC-STRING SYMBOL FEATURE OPEN-STREAM-FUNCTION).
179 SPEC-STRING is a string for stream-type spec (it must start with '!').
180 SYMBOL is a symbol which indicates the name of the stream type.
181 SYMBOL should be identical in this alist.
182 FEATURE is a symbol of the feature for OPEN-STREAM-FUNCTION.
183 OPEN-STREAM-FUNCTION is a function to open network stream.
184 Arguments for this function are NAME, BUFFER, HOST and SERVICE.")
185
186 (defvar elmo-folder-info-hashtb nil
187   "Array of folder database information '(max length new unread).")
188
189 (defvar elmo-crosspost-message-alist nil
190   "List of crosspost message.")
191
192 (defvar elmo-cache-expire-default-method "size"
193   "Default expiration method.")
194
195 (defvar elmo-cache-expire-default-size 30000
196   "Cache expiration disk size (Kilo bytes).  This must be float value.")
197
198 (defvar elmo-cache-expire-default-age 50
199   "Cache expiration age (days).")
200
201 (defvar elmo-cache-dirname "cache"
202   "Directory name for cache storage.")
203
204 (defvar elmo-pack-number-check-strict t
205   "Pack number strictly.")
206
207 (defvar elmo-have-link-count
208   (not
209    ;; OS/2: EMX always returns the link count "1" :-(
210    (or (memq system-type '(OS/2 emx))
211        ;; Meadow seems to have pseudo link count.(suggestion by S.YAMAGUCHI)
212        (and (eq system-type 'windows-nt) (not (featurep 'meadow)))))
213   "Your file system has link count, or not.")
214
215 (defvar elmo-weekday-name-en '["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"])
216 (defvar elmo-weekday-name-ja '["\e$BF|\e(B" "\e$B7n\e(B" "\e$B2P\e(B" "\e$B?e\e(B" "\e$BLZ\e(B" "\e$B6b\e(B" "\e$BEZ\e(B"])
217 (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
218 (defvar elmo-weekday-name-de '["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"])
219
220 (defvar elmo-filename-replace-string-alist
221   '((":"  . " c")
222     ("*"  . " a")
223     ("?"  . " q")
224     ("<"  . " l")
225     (">"  . " g")
226     ("\"" . " d")
227     ("|"  . " p")
228     ("/"  . " s")
229     ("\\" . " b")))
230
231 (defvar elmo-hash-minimum-size 1023
232   "Minimum size of hash table.")
233
234 (defvar elmo-hash-maximum-size 4095
235   "Maximum size of hash table.")
236
237 (defvar elmo-use-decoded-cache (featurep 'xemacs)
238   "Use cache of decoded mime charset string.")
239
240 (defvar elmo-use-overview-hashtb t
241   "Use hash table of overview.")
242
243 (defvar elmo-display-progress-threshold 20
244   "*Displaying progress gauge if number of messages are more than this value.")
245
246 (defvar elmo-inhibit-number-mapping nil
247   "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
248
249 (defvar elmo-dop-queue nil
250   "Global variable for storing disconnected operation queues.")
251
252 (require 'product)
253 (product-provide (provide 'elmo-vars) (require 'elmo-version))
254
255 ;;; elmo-vars.el ends here