1 ;;; elmo-vars.el --- User variables for ELMO.
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
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)
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.
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.
33 ;; silence byte compiler
35 (defun-maybe dynamic-link (a))
36 (defun-maybe dynamic-call (a b)))
39 "ELMO, Elisp Library for Message Orchestration."
45 (defgroup elmo-setting nil
46 "ELMO common settings."
51 (defcustom elmo-localnews-folder-path "~/News"
52 "*Local news folder path."
55 (defcustom elmo-maildir-folder-path "~/Maildir"
56 "*Maildir folder path."
59 (defvar elmo-maildir-list '("\\+~/Maildir")
60 "*All Folders that match this list will be treated as Maildir.
61 Each elements are regexp of folder name (This is obsolete).")
63 (defvar elmo-msgdb-file-header-chop-length 2048
64 "*Number of bytes to get header in one reading from file.")
66 (defcustom elmo-msgdb-directory "~/.elmo"
67 "*ELMO Message Database path."
71 (defvar elmo-passwd-alist-file-name "passwd"
72 "*ELMO Password filename.")
73 (defcustom elmo-passwd-life-time nil
74 "*Duration of ELMO Password in seconds. nil means infinity."
75 :type '(choice (const :tag "Infinity" nil)
80 (defvar elmo-warning-threshold 30000
81 "*Display warning when the bytes of message exceeds this value.")
83 (defvar elmo-msg-appended-hook nil
84 "A hook called when message is appended to database.")
85 (defvar elmo-msg-deleted-hook nil
86 "A hook called when message is deleted from database.")
87 (defvar elmo-nntp-post-pre-hook nil
88 "A hook called just before the nntp posting.")
92 (defcustom elmo-imap4-default-mailbox "inbox"
93 "*Default IMAP4 mailbox."
98 (defcustom elmo-imap4-default-server "localhost"
99 "*Default IMAP4 server."
102 :group 'elmo-setting)
104 (defcustom elmo-imap4-default-authenticate-type 'login
105 "*Default Authentication type for IMAP4."
106 :type '(radio (const :tag "encoded password transmission (login)" login)
107 (const :tag "CRAM-MD5 authentication (cram-md5)" cram-md5)
108 (const :tag "DIGEST-MD5 authentication (digest-md5)" digest-md5)
109 (const :tag "plain password transmission (clear)" clear)
110 (const :tag "NTLM authentication (ntlm)" ntlm)
111 (function :tag "Other"))
114 (defcustom elmo-imap4-default-user (or (getenv "USER")
117 "*Default username for IMAP4."
120 :group 'elmo-setting)
122 (defcustom elmo-imap4-default-port 143
123 "*Default Port number of IMAP."
126 :group 'elmo-setting)
128 (defcustom elmo-imap4-default-stream-type nil
129 "*Default stream type for IMAP4.
130 Any symbol value of `elmo-network-stream-type-alist' or
131 `elmo-imap4-stream-type-alist'."
135 (defvar elmo-imap4-stream-type-alist nil
136 "*Stream bindings for IMAP4.
137 This is taken precedence over `elmo-network-stream-type-alist'.")
142 (defcustom elmo-nntp-default-server "localhost"
143 "*Default NNTP server."
146 :group 'elmo-setting)
148 (defcustom elmo-nntp-default-user nil
149 "*Default User of NNTP. nil means no user authentication."
150 :type '(choice (const nil)
153 :group 'elmo-setting)
155 (defcustom elmo-nntp-default-port 119
156 "*Default Port number of NNTP."
159 :group 'elmo-setting)
161 (defcustom elmo-nntp-default-stream-type nil
162 "*Default stream type for NNTP.
163 Any symbol value of `elmo-network-stream-type-alist' or
164 `elmo-nntp-stream-type-alist'."
168 (defvar elmo-nntp-stream-type-alist nil
169 "*Stream bindings for NNTP.
170 This is taken precedence over `elmo-network-stream-type-alist'.")
175 (defcustom elmo-pop3-default-user (or (getenv "USER")
178 "*Default username for POP3."
181 :group 'elmo-setting)
183 (defcustom elmo-pop3-default-server "localhost"
184 "*Default POP3 server."
187 :group 'elmo-setting)
189 (defcustom elmo-pop3-default-authenticate-type 'user
190 "*Default Authentication type for POP3."
191 :type '(radio (const :tag "plain password transmission (user)" user)
192 (const :tag "APOP authentication (apop)" apop)
193 (const :tag "CRAM-MD5 authentication (cram-md5)" cram-md5)
194 (const :tag "DIGEST-MD5 authentication (digest-md5)" digest-md5)
195 (const :tag "NTLM authentication (ntlm)" ntlm)
196 (function :tag "Other"))
199 (defcustom elmo-pop3-default-port 110
200 "*Default POP3 port."
203 :group 'elmo-setting)
205 (defcustom elmo-pop3-default-stream-type nil
206 "*Default stream type for POP3.
207 Any symbol value of `elmo-network-stream-type-alist' or
208 `elmo-pop3-stream-type-alist'."
212 (defvar elmo-pop3-stream-type-alist nil
213 "*Stream bindings for POP3.
214 This is taken precedence over `elmo-network-stream-type-alist'.")
216 (defcustom elmo-lang "ja"
217 "Language for displayed messages."
219 :group 'elmo-setting)
221 (defvar elmo-mime-charset 'iso-2022-jp)
223 (defvar elmo-msgdb-mark-filename "mark"
225 (defvar elmo-msgdb-overview-filename "overview"
226 "Overview database.")
227 (defvar elmo-msgdb-number-filename "number"
228 "Message number <=> Message-ID database.")
229 (defvar elmo-msgdb-location-filename "location"
230 "Message number <=> Actual location symbol.")
231 (defvar elmo-msgdb-seen-filename "seen"
232 "Seen message list for append.")
233 (defvar elmo-msgdb-killed-filename "killed"
234 "Deleted messages... contains elmo-killed-msgs-list.")
235 (defvar elmo-msgdb-validity-filename "validity")
236 (defvar elmo-msgdb-flist-filename "flist"
237 "Folder list cache (for access folder).")
238 (defvar elmo-msgdb-finfo-filename "finfo"
239 "Folder information cache...list of '(filename . '(new unread all)).")
240 (defvar elmo-msgdb-lock-list-filename "lock"
241 "Locked messages...list of message-id.
242 For disconnected operations.")
243 (defvar elmo-msgdb-global-mark-filename "global-mark"
244 "Alist of global mark.")
245 (defvar elmo-lost+found-folder "+lost+found"
247 (defvar elmo-crosspost-alist-filename "crosspost-alist"
248 "Alist of crosspost messages.")
250 (defvar elmo-use-server-diff t
251 "Non-nil forces to get unread message information on server.")
253 (defvar elmo-strict-diff-folder-list nil
254 "List of regexps of folder name which should be checked its diff strictly.")
256 (defcustom elmo-msgdb-extra-fields nil
257 "Extra fields for msgdb."
258 :type '(repeat string)
260 :group 'elmo-setting)
262 (defcustom elmo-enable-disconnected-operation t
263 "*Non-nil enables disconnected operations."
266 :group 'elmo-setting)
268 (defvar elmo-auto-change-plugged 600
269 "*Time to expire change plugged state automatically, as the number of seconds.
270 Don't change plugged state automatically if nil.")
271 (defvar elmo-plugged-condition 'one
272 "*The condition for `elmo-plugged' becomes on.
273 If `all', when all ports are on. If `one', when even one port is on.
274 If `independent', independent port plugged.
275 If function, return value of function.")
277 (defvar elmo-plug-on-servers nil)
279 (defvar elmo-plug-on-exclude-servers
282 (and (string-match "[^.]+" (system-name))
283 (substring (system-name) 0 (match-end 0)))))
285 (defvar elmo-plugged-alist nil)
287 (defvar elmo-dop-flush-confirm t
288 "*Flush disconnected operations queue with confirmation.")
290 (defvar elmo-path-sep "/"
292 (defvar elmo-plugged t)
294 (defvar elmo-no-subject "(No Subject in original.)"
295 "*A string used when no subject field exists.")
296 (defvar elmo-no-from "nobody@nowhere?"
297 "*A string used when no from field exists.")
299 ;; database dynamic linking
300 (defvar elmo-database-dl-module
301 (expand-file-name "database.so" exec-directory))
303 (defvar elmo-database-dl-handle
304 (if (and (fboundp 'dynamic-link)
306 elmo-database-dl-module))
307 (if (fboundp 'open-database)
309 (dynamic-link elmo-database-dl-module))))
311 (if (and elmo-database-dl-handle
312 (integerp elmo-database-dl-handle))
313 (dynamic-call "emacs_database_init" elmo-database-dl-handle))
315 (defvar elmo-use-database (or (featurep 'dbm)
318 (featurep 'berkeley-db)
319 ;; static/dl-database
320 (fboundp 'open-database)))
322 (defvar elmo-date-match t
323 "Date match is available or not.")
325 (defvar elmo-network-stream-type-alist
326 '(("!" ssl ssl open-ssl-stream)
327 ("!!" starttls starttls starttls-open-stream)
328 ("!socks" socks socks socks-open-network-stream))
329 "An alist of (SPEC-STRING SYMBOL FEATURE OPEN-STREAM-FUNCTION).
330 SPEC-STRING is a string for stream-type spec (it must start with '!').
331 SYMBOL is a symbol which indicates the name of the stream type.
332 SYMBOL should be identical in this alist.
333 FEATURE is a symbol of the feature for OPEN-STREAM-FUNCTION.
334 OPEN-STREAM-FUNCTION is a function to open network stream.
335 Arguments for this function are NAME, BUFFER, HOST and SERVICE.")
337 (defvar elmo-folder-info-hashtb nil
338 "Array of folder database information '(max length new unread).")
340 (defvar elmo-crosspost-message-alist nil
341 "List of crosspost message.")
343 (defvar elmo-cache-expire-default-method "size"
344 "Default expiration method.")
346 (defvar elmo-cache-expire-default-size 30000
347 "Cache expiration disk size (Kilo bytes). This must be float value.")
349 (defvar elmo-cache-expire-default-age 50
350 "Cache expiration age (days).")
352 (defvar elmo-cache-directory (expand-file-name "cache" elmo-msgdb-directory)
353 "Directory name for cache storage.")
355 (defvar elmo-pack-number-check-strict t
356 "Pack number strictly.")
358 (defvar elmo-have-link-count
360 ;; OS/2: EMX always returns the link count "1" :-(
361 (or (memq system-type '(OS/2 emx))
362 ;; Meadow seems to have pseudo link count.(suggestion by S.YAMAGUCHI)
363 (and (eq system-type 'windows-nt) (not (featurep 'meadow)))))
364 "Your file system has link count, or not.")
366 (defvar elmo-weekday-name-en '["Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat"])
367 (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"])
368 (defvar elmo-weekday-name-fr '["Dim" "Lun" "Mar" "Mer" "Jeu" "Ven" "Sam"])
369 (defvar elmo-weekday-name-de '["Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam"])
371 (defvar elmo-filename-replace-string-alist
382 (defvar elmo-hash-minimum-size 1023
383 "Minimum size of hash table.")
385 (defvar elmo-hash-maximum-size 4095
386 "Maximum size of hash table.")
388 (defvar elmo-use-decoded-cache (featurep 'xemacs)
389 "Use cache of decoded mime charset string.")
391 (defvar elmo-use-overview-hashtb t
392 "Use hash table of overview.")
394 (defvar elmo-display-progress-threshold 20
395 "*Displaying progress gauge if number of messages are more than this value.")
397 (defvar elmo-inhibit-number-mapping nil
398 "Global switch to inhibit number mapping (e.g. Inhibit UIDL on POP3).")
400 (defvar elmo-display-retrieval-progress-threshold 30000
401 "*Don't display progress if the message size is smaller than this value.")
403 (defvar elmo-inhibit-display-retrieval-progress nil
404 "Global switch to inhibit display progress of each message's retrieval.")
406 (defvar elmo-dop-queue nil
407 "Global variable for storing disconnected operation queues.")
410 (product-provide (provide 'elmo-vars) (require 'elmo-version))
412 ;;; elmo-vars.el ends here