summaryrefslogtreecommitdiffstats
path: root/wl
blob: 49a001f37ded27f1f34cfc0c782b0060c141ea93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
(setq frame-title-format '("" "Wanderlust"))

(setq elmo-imap4-default-server "mail.universe-factory.net"
      elmo-imap4-default-user "mschiffer@universe-factory.net"
      elmo-imap4-default-authenticate-type 'clear
      elmo-imap4-default-port '143
      elmo-imap4-default-stream-type 'starttls

      ;;for non ascii-characters in folder-names
      elmo-imap4-use-modified-utf7 t)

(setq wl-smtp-connection-type 'starttls
      wl-smtp-posting-port 587
      wl-smtp-authenticate-type "plain"
      wl-smtp-posting-user "mschiffer@universe-factory.net"
      wl-smtp-posting-server "mail.universe-factory.net"
      wl-local-domain "universe-factory.net"
      wl-message-id-domain "chaos.universe-factory.net")

(setq wl-from "Matthias Schiffer <mschiffer@universe-factory.net>"
      wl-default-folder "%INBOX"
      wl-default-spec "%")

(setq wl-summary-always-sticky-folder-list t
      wl-summary-width 150
      wl-summary-persistent-mark-priority-list '(killed
						 flag
						 new
						 unread
						 answered
						 forwarded))

(setq elmo-folder-update-threshold nil)

(defadvice wl-summary-mode (after wl-summary-mode-nobidi)
  (setq bidi-display-reordering nil))
(ad-activate 'wl-summary-mode)

;; (defun wl-summary-update-persistent-mark (number)
;;   (wl-summary-rescan-message number)
;;   t)

;; (defun wl-summary-persistent-mark-invalid-p () t)

;; (defun extended-persistent-mark ()
;;   (let ((flags (elmo-message-status-flags wl-status))
;; 	(cached (elmo-message-status-cached-p wl-status)))
;;     (concat
;;      (cond ((memq 'killed flags) "X")
;; 	   ((memq 'flag flags) "$")
;; 	   ((memq 'new flags) "N")
;; 	   ((memq 'unread flags) "u")
;; 	   (t " "))
;;      (if (memq 'answered flags) wl-summary-answered-cached-mark " ")
;;      (if (memq 'forwarded flags) "f" " "))))
(defun extended-persistent-mark () (or wl-persistent-mark " "))
;;(defun extended-persistent-mark () " ")

(add-to-list 'wl-summary-line-format-spec-alist '(?X (extended-persistent-mark)))
(setq wl-summary-line-format "%n%T%X %Y/%M/%D (%W) %h:%m %t%[%25(%c %f%) %] %s")

(defadvice wl-message-buffer-display (before wl-message-buffer-display-unread)
  (setq unread t))
(ad-activate 'wl-message-buffer-display)


(defadvice elmo-folder-unset-flag (before elmo-folder-unset-flag-nounread (folder numbers flag
										  &optional is-local))
  (when (eq flag 'unread) (setq flag 'new)))

(defadvice wl-summary-redisplay-internal (around wl-summary-redisplay-internal-unread)
  (unwind-protect
      (progn
	(ad-activate 'elmo-folder-unset-flag)
	ad-do-it)
    (ad-deactivate 'elmo-folder-unset-flag)))
(ad-activate 'wl-summary-redisplay-internal)