annotate mail-extras.el @ 52:f3ab63e5c39f

add auto-year to mmhcc, quaker
author Henry S Thompson <ht@inf.ed.ac.uk>
date Mon, 08 Jan 2024 18:57:11 +0000
parents b09e8120dc53
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 ;; Last edited: Fri Nov 2 10:26:24 1990
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 ;; extra widgets for rmail and rmailsum
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 ;; Copyright (C) 1990 Henry S. Thompson
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 ;; This file is part of GNU Emacs.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 ;; GNU Emacs is distributed in the hope that it will be useful,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 ;; but WITHOUT ANY WARRANTY. No author or distributor
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 ;; accepts responsibility to anyone for the consequences of using it
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10 ;; or for whether it serves any particular purpose or works at all,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 ;; unless he says so in writing. Refer to the GNU Emacs General Public
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 ;; License for full details.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 ;; Everyone is granted permission to copy, modify and redistribute
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 ;; GNU Emacs, but only under the conditions described in the
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16 ;; GNU Emacs General Public License. A copy of this license is
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17 ;; supposed to have been given to you along with GNU Emacs so you
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18 ;; can know your rights and responsibilities. It should be in a
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
19 ;; file named COPYING. Among other things, the copyright notice
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
20 ;; and this notice must be preserved on all copies.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
21
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
22 (require 'rmail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
23 (require 'sendmail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
24
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
26 ;; mods and fixes for reading mail ;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
28
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
29 (defvar ht-last-file (expand-file-name "~/XMAIL")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
30 "default for moving mail to")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
31 (make-variable-buffer-local 'ht-last-file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
32
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
33 (defvar rmht-always-recompress t
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
34 "If non-nil, when saving into compressed babyl file,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
35 always recompress and save immediately")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
36
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
37 (defvar rmht-allow-autosave t
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
38 "if non-nil, leaves autosave alone for compressed babyl files,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
39 otherwise turns it off")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
40
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
41 (add-hook 'rmail-mode-hook 'rmail-mode-fun1)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
42 (add-hook 'rmail-mode-hook 'rmail-mode-fun2)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
43
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
44 ;; run the first time in to RMAIL
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
45 (defun rmail-mode-fun1 ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
46 "add ht's mods to RMAIL"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
47 (define-key rmail-mode-map "R" 'reply-w/o-cc)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
48 (define-key rmail-mode-map "M" 'rmht-output)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
49 (define-key rmail-mode-map "H" 'print-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
50 (define-key rmail-mode-map "W" 'edit-and-move-to-diary)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
51 (define-key rmail-mode-map "D" 'update-default-diary)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
52 (define-key rmail-mode-map "F" 're-post-failed-mail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
53 (define-key rmail-mode-map "B" 'ht-write-body-to-file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
54 (define-key rmail-mode-map "E" 'extract-attachment)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
55 ;; fix the doc string
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
56 (repl-comment 'rmail-mode
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
57 "Rmail Mode is used by \\[rmail] for editing Rmail files.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
58 All normal editing commands are turned off.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
59 Instead, these commands are available (additions from ht's mail-extras.el
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
60 indicated by *:
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
61
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
62 . Move point to front of this message (same as \\[beginning-of-buffer]).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
63 SPC Scroll to next screen of this message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
64 DEL Scroll to previous screen of this message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
65 n Move to Next non-deleted message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
66 p Move to Previous non-deleted message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
67 M-n Move to Next message whether deleted or not.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
68 M-p Move to Previous message whether deleted or not.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
69 > Move to the last message in Rmail file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
70 j Jump to message specified by numeric position in file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
71 M-s Search for string and show message it is found in.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
72 d Delete this message, move to next nondeleted.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
73 C-d Delete this message, move to previous nondeleted.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
74 u Undelete message. Tries current message, then earlier messages
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
75 till a deleted message is found.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
76 e Expunge deleted messages.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
77 s Expunge and save the file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
78 q Quit Rmail: expunge, save, then switch to another buffer.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
79 C-x C-s Save without expunging.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
80 g Move new mail from system spool directory or mbox into this file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
81 m Mail a message (same as \\[mail-other-window]).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
82 c Continue composing outgoing message started before.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
83 r Reply to this message. Like m but initializes some fields.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
84 R * Like r, but reply to originator only.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
85 f Forward this message to another user.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
86 F * like f, but assumes message is \"failed mail\" for re-sending
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
87 o Output this message to an Rmail file (append it).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
88 C-o Output this message to a Unix-format mail file (append it).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
89 M * Output this message to a file,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
90 in format determined by extension (babyl for RMAIL/msg for Unix).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
91 B * Write the body of the message to a file, leaving a pointer
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
92 H * Print the message (same as \\<global-map>\\[print-buffer]).\\<rmail-mode-map>
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
93 i Input Rmail file. Run Rmail on that file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
94 a Add label to message. It will be displayed in the mode line.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
95 k Kill label. Remove a label from current message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
96 C-M-n Move to Next message with specified label
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
97 (label defaults to last one specified).
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
98 Standard labels: filed, unseen, answered, forwarded, deleted.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
99 Any other label is present only if you add it with `a'.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
100 C-M-p Move to Previous message with specified label
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
101 h, C-M-h Show headers buffer, with a one line summary of each message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
102 l, C-M-l Like h only just messages with particular label(s) are summarized.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
103 C-M-r Like h only just messages with particular recipient(s) are summarized.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
104 t Toggle header, show Rmail header if unformatted or vice versa.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
105 w Edit the current message. C-c C-c to return to Rmail.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
106 W * Edit the subject field. C-c C-c to move the message to the Diary.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
107 D * Update the Diary.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
108
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
109 Messages for the diary (see also \\[describe-mode] in rmail-summary mode
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
110 or \\[describe-function] rmail-summary-mode) should have a subject field
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
111 which begins with the date and optional time of the event described therein.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
112 These must be in the form
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
113 d m y t
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
114 where d is one or two digits for the day,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
115 m is either the full month name or the first three letters thereof,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
116 y is two digits for the year,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
117 and t, if present, is 4 digits for the time,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
118 thus for example
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
119 31 Jun 91 1530
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
120 ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
121 (remove-hook 'rmail-mode-hook 'rmail-mode-fun1))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
122
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
123 (defun rmail-mode-fun2 ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
124 "always run in RMAIL mode"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
125 (setq case-fold-search t))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
126
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
127 (defun reply-w/o-cc ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
128 "Reply as r, but without sending to other recipients"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
129 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
130 (rmail-reply t))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
131
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
132 (defun rmht-output (&optional file-name gnus)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
133 "Move to a file, determining format by extension (babyl/msg)"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
134 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
135 (if (not file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
136 (setq file-name (car (get-move-file-name))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
137 (if (string-match "\\.g?[zZ]$" file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
138 (let ((clean-file-name (substring file-name 0 (match-beginning 0)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
139 there)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
140 (if (setq there (get-file-buffer clean-file-name))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
141 nil
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
142 (save-window-excursion (rmail clean-file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
143 (setq there
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
144 (get-file-buffer clean-file-name))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
145 (rmht-output clean-file-name gnus)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
146 (if rmht-always-recompress
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
147 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
148 (set-buffer there)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
149 (save-buffer))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
150 (if (not rmht-allow-autosave)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
151 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
152 (set-buffer there)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
153 (auto-save-mode -1)))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
154 (setq file-name (expand-file-name file-name))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
155 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
156 (if (string-match "\\.babyl$" file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
157 (if gnus
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
158 (gnus-output-to-rmail file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
159 (rmail-output-to-rmail-file file-name 1))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
160 (if (string-match "\\.msg$" file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
161 (if (or (get-file-buffer file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
162 (file-exists-p file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
163 (yes-or-no-p
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
164 (concat "\"" file-name "\" does not exist, create it? ")))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
165 (rmail-output file-name 1)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
166 (error "Output file does not exist"))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
167 (error "not a valid mail file: %s" file-name))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
168 (setq ht-last-file file-name)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
169 (if (not gnus) (ht-rmail-delete-forward))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
170
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
171 (defun get-move-file-name ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
172 "get a file name for moving a message to"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
173 (list (read-file-name
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
174 (concat "Output message to file: (default "
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
175 (file-name-nondirectory ht-last-file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
176 ") ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
177 (file-name-directory ht-last-file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
178 ht-last-file)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
179
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
180 (defun re-post-failed-mail ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
181 "try to salvage the original from failed mail and prepare to resend it"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
182 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
183 (rmail-forward nil)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
184 (let ((top (point))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
185 subjp textp)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
186 (re-search-forward "^Subject: ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
187 (kill-line nil)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
188 (setq subjp (point))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
189 (re-search-forward "^From: ") ; the bouncer
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
190 (re-search-forward "^From: ") ; should be us
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
191 (re-search-forward "^Subject: ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
192 (kill-line nil)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
193 (save-excursion (goto-char subjp)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
194 (yank))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
195 (beginning-of-line 3)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
196 (setq textp (point))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
197 (goto-char top)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
198 (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
199 (beginning-of-line 2)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
200 (delete-region (point) textp)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
201 (goto-char top)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
202
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
203 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
204 ;; mods and fixes for mail summaries ;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
205 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
206
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
207 (add-hook 'rmail-summary-mode-hook 'rmail-summary-mode-fun1)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
208
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
209 ;; run the first time we make a summary window
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
210 (defun rmail-summary-mode-fun1 ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
211 "install ht's mods"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
212 (define-key rmail-summary-mode-map "r" 'rms-reply-w-cc)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
213 (define-key rmail-summary-mode-map "R" 'rms-reply-w/o-cc)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
214 (define-key rmail-summary-mode-map "s" 'diary-save)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
215 (define-key rmail-summary-mode-map "m" 'rms-move)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
216 (define-key rmail-summary-mode-map "d" 'rms-delete)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
217 (define-key rmail-summary-mode-map "h" 'rms-hardcopy)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
218 (define-key rmail-summary-mode-map " " 'ht-rmailsum-scroll-msg-up)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
219 (define-key rmail-summary-mode-map "\177" 'ht-rmailsum-scroll-msg-down)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
220 ;; fix the doc string
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
221 (repl-comment 'rmail-summary-mode
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
222 "Major mode in effect in Rmail summary buffer.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
223 A subset of the Rmail mode commands are supported in this mode.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
224 As commands are issued in the summary buffer the corresponding
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
225 mail message is displayed in the rmail buffer.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
226 Modifications from ht's mail-extras.el indicated with *:
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
227
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
228 n Move to next undeleted message, or arg messages.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
229 p Move to previous undeleted message, or arg messages.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
230 C-n Move to next, or forward arg messages.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
231 C-p Move to previous, or previous arg messages.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
232 j Jump to the message at the cursor location.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
233 d Delete the message at the cursor location and move to next message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
234 u Undelete this or previous deleted message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
235 q Quit Rmail.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
236 x Exit and kill the summary window.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
237 space * If cursor is on line of current message,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
238 scroll message window forward. Otherwise, jump to indicated message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
239 delete * same as space, but scrolls backward.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
240 r * Same as r in rmail window. Reply to current message.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
241 R * Same as R in rmail window. Reply to current message, originator only.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
242 s * Update and save the rmail file, and re-summarise. Re-sorts if Diary.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
243 m * Same as M in rmail window. Moves message to file.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
244 h * Same as H in rmail window. Prints message on line printer.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
245
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
246 Entering this mode calls value of hook variable rmail-summary-mode-hook.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
247
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
248 If the file summarised is called by the name given in ht-diary-file-name,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
249 which defaults to diary.babyl,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
250 then the summary will be called *Diary*, sorted in date order and
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
251 formated in a special way.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
252
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
253 Messages in the diary should have a subject field
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
254 which begins with the date and optional time of the event described therein.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
255 These must be in the form
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
256 d m y t
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
257 where d is one or two digits for the day,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
258 m is either the full month name or the first three letters thereof,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
259 y is two digits for the year,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
260 and t, if present, is 4 digits for the time,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
261 thus for example
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
262 Subject: 31 Jun 91 1530 Hades freezing ceremony followed by champagne reception
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
263 ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
264 (remove-hook 'rmail-summary-mode-hook 'rmail-summary-mode-fun1))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
265
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
266 (defun rmht-sum-reply (sender-only)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
267 "reply to current message"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
268 (rmail-summary-goto-msg)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
269 (pop-to-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
270 (rmail-reply sender-only)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
271 (switch-to-buffer rmail-summary-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
272 (switch-to-buffer "*mail*")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
273 )
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
274
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
275 (defun rms-reply-w-cc ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
276 "Do r in RMAIL - reply to everybody"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
277 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
278 (rmht-sum-reply nil))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
279
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
280 (defun rms-reply-w/o-cc ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
281 "Do R in RMAIL - reply to sender only"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
282 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
283 (rmht-sum-reply t))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
284
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
285 (defun rms-save ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
286 "expunge deleted messages, save RMAIL file and re-display headers"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
287 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
288 (pop-to-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
289 (rmail-expunge-and-save)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
290 (rmail-summary))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
291
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
292 (defun rms-delete ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
293 "delete current and move down to next in summary buffer"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
294 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
295 (rmail-summary-goto-msg)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
296 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
297 (rmail-summary-delete-forward nil))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
298 (rms-del))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
299
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
300 (defun rms-move ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
301 "Move to a file, mode determined by file extension (babyl/msg)"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
302 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
303 (rmail-summary-goto-msg)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
304 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
305 (set-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
306 (rmht-output))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
307 (rms-del))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
308
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
309 (defun rms-del ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
310 "mark current summary line as deleted and move down"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
311 (let ((buffer-read-only nil))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
312 (skip-chars-forward " ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
313 (skip-chars-forward "[0-9]")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
314 (delete-char 1)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
315 (insert "D"))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
316 (forward-line 1))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
317
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
318 (defun rms-hardcopy ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
319 "hardcopy the current message"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
320 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
321 (pop-to-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
322 (print-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
323 (pop-to-buffer rmail-summary-buffer))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
324
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
325
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
326 ;; fix interpretation of SPACE and DEL in summary windows to
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
327 ;; 1) scroll the right window regardless of how many panes are up;
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
328 ;; 2) go to the message associated with the current line if not already there,
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
329 ;; a la gnus, for instance
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
330
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
331 (defun ht-rmailsum-normalise ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
332 "if not already showing message named on current line, go to it & return t"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
333 (beginning-of-line)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
334 (let ((current-msg-num (cdr (assoc 'rmail-current-message
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
335 (buffer-local-variables
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
336 (or rmail-buffer
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
337 (error
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
338 "not in a summary buffer"))))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
339 (line-message-num (string-to-int
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
340 (buffer-substring
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
341 (point)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
342 (min (point-max)(+ 5 (point)))))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
343 (if (= current-msg-num line-message-num)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
344 nil
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
345 (rmail-summary-goto-msg line-message-num)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
346 t)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
347
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
348 (defun ht-rmailsum-scroll-msg-up (&optional dist)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
349 "goto other message or scroll current message forward"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
350 (interactive "P")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
351 (if (ht-rmailsum-normalise)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
352 nil
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
353 (pop-to-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
354 (scroll-up dist)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
355 (pop-to-buffer rmail-summary-buffer)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
356
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
357 (defun ht-rmailsum-scroll-msg-down (&optional dist)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
358 "goto other message or scroll current message backward"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
359 (interactive "P")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
360 (if (ht-rmailsum-normalise)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
361 nil
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
362 (pop-to-buffer rmail-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
363 (scroll-down dist)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
364 (pop-to-buffer rmail-summary-buffer)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
365
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
366 (autoload 'edit-and-move-to-diary "diary")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
367 (autoload 'update-diary "diary")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
368 (autoload 'diary-save "diary")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
369
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
370 ;;; I _think_ (almost?) everything above here is diary-related, so belongs
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
371 ;;; in diary.el.
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
372
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
373 ;; unfortunately, gnus mucks about with the buffers before calling
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
374 ;; mail, so we have to intervene to make the about-to-mail-hook work right
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
375
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
376 (defun ht-Subject-mode-fun ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
377 "fix the map to save window state"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
378 ; (define-key gnus-summary-mode-map "r" 'ht-Subject-mail-reply)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
379 ; (define-key gnus-summary-mode-map "R" 'ht-Subject-mail-reply-with-original)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
380 ; (define-key gnus-summary-mode-map "m" 'ht-Subject-mail-other-window)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
381 (define-key gnus-summary-save-map "M" 'ht-Subject-move)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
382 (remove-hook 'gnus-summary-mode-hook 'ht-Subject-mode-fun))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
383
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
384 (add-hook 'gnus-summary-mode-hook 'ht-Subject-mode-fun)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
385
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
386 (defun ht-Subject-mail-reply (yank)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
387 "Runs about-to-mail-hook, then calls gnus-summary-mail-reply"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
388 (interactive "P")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
389 (require 'sendmail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
390 (run-hooks 'about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
391 (let (about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
392 (gnus-summary-reply yank)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
393
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
394 (defun ht-Subject-mail-reply-with-original ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
395 "Runs about-to-mail-hook, then calls gnus-summary-mail-reply-with-original"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
396 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
397 (require 'sendmail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
398 (run-hooks 'about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
399 (let (about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
400 (gnus-summary-reply-with-original)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
401
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
402 (defun ht-Subject-mail-other-window ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
403 "Runs about-to-mail-hook, then calls gnus-summary-mail-other-window"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
404 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
405 (require 'sendmail)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
406 (run-hooks 'about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
407 (let (about-to-mail-hook)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
408 (gnus-summary-mail-other-window)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
409
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
410 (defun ht-Subject-move ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
411 "Move article to a file, mode determined by file extension (babyl/msg)"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
412 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
413 (gnus-summary-select-article)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
414 (save-excursion
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
415 (set-buffer gnus-article-buffer)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
416 (rmht-output nil t)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
417
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
418
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
419 (defun ht-write-body-to-file (file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
420 "Write the body of the message to a file and replace it with a pointer"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
421 (interactive "FFile to save in: ")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
422 (goto-char (point-min))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
423 (or (search-forward "\n\n" nil t)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
424 (error "Can't find text"))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
425 (write-region (point)(point-max) file)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
426 (rmail-edit-current-message)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
427 (delete-region (point)(point-max))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
428 (insert "\n>> " file "\n")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
429 (rmail-cease-edit)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
430 (rmht-output))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
431
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
432 (defun extract-attachment ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
433 "extract attachments from a multi-part mime message"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
434 (interactive)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
435 (rmail-toggle-header)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
436 (mime/viewer-mode)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
437 (let ((pt 0))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
438 (while (progn
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
439 (mime-viewer/next-content)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
440 (and
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
441 (equal "*Preview-RMAIL*" (buffer-name (current-buffer)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
442 (not (= pt (point)))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
443 (setq pt (point))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
444 (if (looking-at "^\\[[0-9]* [^ ]+ <")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
445 (mime-viewer/extract-content))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
446 (if (not (equal "*Preview-RMAIL*" (buffer-name (current-buffer))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
447 ;; we fell off the end
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
448 (rmail-previous-undeleted-message 1))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
449 (kill-buffer "*Preview-RMAIL*")
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
450 )
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
451
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
452 ;(load-library "mailcrypt") ; provides "mc-setversion"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
453 ;(mc-setversion "gpg") ; for PGP 2.6 (default); also "5.0" and "gpg"
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
454 ;(autoload 'mc-install-write-mode "mailcrypt" nil t)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
455 ;(autoload 'mc-install-read-mode "mailcrypt" nil t)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
456 ;(add-hook 'mail-mode-hook 'mc-install-write-mode)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
457 ;(add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
458 ;(add-hook 'message-mode-hook 'mc-install-write-mode)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
459 ;(add-hook 'news-reply-mode-hook 'mc-install-write-mode)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
460 ;(setq mc-passwd-timeout 6000)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
461 ;;; Key server at Cambridge University (Cambridge, England)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
462 ;(setq mc-pgp-fetch-methods '(mc-pgp-fetch-from-keyrings
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
463 ; mc-pgp-fetch-from-http))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
464 ;(require 'pgg)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
465 ;(add-hook 'message-send-hook 'my-sign-message)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
466 (setq hack-yn-map (copy-keymap query-replace-map))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
467 (define-key hack-yn-map 'return 'act)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
468
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
469 (defun my-sign-message ()
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
470 (goto-char (point-min))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
471 (unless
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
472 (or
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
473 (re-search-forward "<#\\(part\\|mml\\) " nil t)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
474 ; signing attachments doesn't seem
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
475 ; to work well
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
476 (search-forward "\n-- \nHenry S. Thompson, Central Edinburgh LM" nil t)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
477 ; Don't sign Quaker mail
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
478 )
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
479 (let* ((headers (mail-header-extract-no-properties))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
480 (cc (mail-header 'cc))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
481 (to (mail-header 'to)))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
482 (if (and to
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
483 (not (string-match "htcalendar[@]markup\.co\.uk" to))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
484 (not (string-match "^ht$" to))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
485 (or
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
486 (string-match "w3.org" to)
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
487 (and cc (string-match "w3.org" cc))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
488 (let ((query-replace-map hack-yn-map))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
489 (y-or-n-p "Sign message? "))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
490 (mml-secure-message-sign-pgp)))))
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
491
b09e8120dc53 copied in from lucid, moved use-text-not-html support to my-news,
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
492 (provide 'mail-extras)