5 ;; description: some mailing list support for mew
6 ;; creation date: 1998-11-18
7 ;; author: "Sen Nagata" <sen@eccosys.com>
8 ;; warning: not optimized at all
12 ;; -mew (tested for 1.93)
13 ;; -mew-mailto.el (mew-mailto.el depends on mailto.el)
17 ;; -put this file (mew-mailto.el and mailto.el) in an appropriate
18 ;; directory (so emacs can find it)
23 ;; (add-hook 'mew-init-hook (lambda () (require 'mew-ml)))
25 ;; in your .emacs file.
28 ;; -for key-bindings put (haven't tested for xemacs yet):
31 ;; 'mew-summary-mode-hook
33 ;; (define-key mew-summary-mode-map
34 ;; "ch" 'mew-ml-compose-help-message)
35 ;; (define-key mew-summary-mode-map
36 ;; "cu" 'mew-ml-compose-unsubscribe-message)
37 ;; (define-key mew-summary-mode-map
38 ;; "cs" 'mew-ml-compose-subscribe-message)
39 ;; (define-key mew-summary-mode-map
40 ;; "cp" 'mew-ml-compose-post-message)
41 ;; (define-key mew-summary-mode-map
42 ;; "co" 'mew-ml-compose-owner-message)))
44 ;; in your .emacs file.
47 ;; -for enhancing the menu for summary mode, put:
49 ;; (defvar mew-ml-menu-spec
52 ;; mew-ml-compose-help-message t]
54 ;; mew-ml-compose-unsubscribe-message t]
56 ;; mew-ml-compose-subscribe-message t]
58 ;; mew-ml-compose-post-message t]
60 ;; mew-ml-compose-owner-message t]
64 ;; 'mew-summary-mode-hook
66 ;; (setq mew-summary-mode-menu-spec
67 ;; (nconc mew-summary-mode-menu-spec
69 ;; mew-ml-menu-spec)))
70 ;; ;; got this section from mew-summary.el
72 ;; mew-summary-mode-menu
73 ;; mew-summary-mode-map
74 ;; "Menu used in Summary mode."
75 ;; mew-summary-mode-menu-spec)))
81 ;; this package provides a number of interactive functions
82 ;; (commands) for the user. each of the commands ultimately creates a
83 ;; draft message based on some information. the names of the commands
84 ;; and brief descriptions are:
86 ;; mew-ml-compose-*-message
87 ;; make a draft message from one of the corresponding
88 ;; List-* headers (Unsubscribe, Subscribe, etc.). if no such
89 ;; header is detected, the user is notified via 'message'.
91 ;; note: i don't use xemacs that often so i don't test it as much.
96 ;; -try out the commands mentioned above in 'details'
97 ;; -you can also try the commands via the menu now
101 ;; -see TODO items in code
102 ;; -place the menu and keybinding 'hook' stuff mentioned above into a
103 ;; separate file and suggest that the user 'require'/'load' this via
104 ;; their .emacs file? another possibility is just to set up our own
105 ;; menus...seems kind of ugly though.
106 ;; -keybindings and menu items -> is there a good way to modify the
107 ;; existing menus for mew? (is that a bad idea?)
108 ;; -support some kind of warning message for messages which should be
109 ;; edited (e.g. subscribe messages requiring names). there isn't a
110 ;; standard solution for this yet (for a discussion, see section A.5 of rfc
112 ;; -i've used this code w/ emacs versions >= 20.3
113 ;; -test w/ xemacs -- not at all sure of the menu and keybinding stuff
114 ;; -prepare a test suite...
116 ;; how should we handle the dependecy on mew?
117 ;; doing the following seems to have catastrophic effects on my machine :-(
124 (defconst mew-ml-version "mew-ml.el 0.1")
126 ;; use mew-mailto support -- should be useable for things other than mew too
127 (require 'mew-mailto)
131 ;; 1) i am not clear on whether mew-mailto-compose-message-from-header
134 ;; 2) perhaps i should do the below w/ macros?
136 ;; 3) see 'mew-summary-reply' for a way to deal w/ the case when point
137 ;; is not on a row w/ a message (located after all of the rows
138 ;; representing messages) -> TODO
140 ;; 4) figure out a way to provide similar functionality when point is
141 ;; is in message mode -> TODO
143 (defun mew-ml-compose-help-message ()
145 (if (not (mew-mailto-compose-message-from-header "List-Help"))
147 "There does not appear to be a List-Help: header in this message."))
150 (defun mew-ml-compose-unsubscribe-message ()
152 (if (not (mew-mailto-compose-message-from-header "List-Unsubscribe"))
154 "There does not appear to be a List-Unsubscribe: header in this message."))
157 (defun mew-ml-compose-subscribe-message ()
159 (if (not (mew-mailto-compose-message-from-header "List-Subscribe"))
161 "There does not appear to be a List-Subscribe: header in this message."))
164 (defun mew-ml-compose-post-message ()
166 (if (not (mew-mailto-compose-message-from-header "List-Post"))
168 "There does not appear to be a List-Post: header in this message."))
171 (defun mew-ml-compose-owner-message ()
173 (if (not (mew-mailto-compose-message-from-header "List-Owner"))
175 "There does not appear to be a List-Owner: header in this message."))
178 ;; since this will be used via 'require'...