annotate lucid/my-news.el @ 51:f3d3d458dd05

distinguish paul from vnc on paul
author Henry S Thompson <ht@inf.ed.ac.uk>
date Mon, 08 Jan 2024 18:03:13 +0000
parents 0a81352bd7d0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 (load "gnus" nil t)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 ;(require 'spam)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 (require 'cl)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 ;(spam-initialize)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 (setq
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6 gnus-select-method '(nntp "usenet.inf.ed.ac.uk")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 gnus-post-method '(nntp "usenet.inf.ed.ac.uk")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 gnus-nntp-server nil ; override local default
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 (setq gnus-use-scoring nil ; not used yet
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 gnus-summary-gather-subject-limit nil
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13 gnus-thread-sort-functions
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 '(gnus-thread-sort-by-number gnus-thread-sort-by-simpl-subject)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16 gnus-summary-make-false-root 'none
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17 gnus-mime-display-multipart-related-as-mixed t
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
19
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
20 (defsubst gnus-trim-simplify-subject (text)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
21 (if (string-match gnus-simplify-subject-regexp text)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
22 (substring text (match-end 0))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
23 text))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
24
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
25 (defun gnus-thread-sort-by-simpl-subject (h1 h2)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
26 "sort by slightly simplified subject"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
27 ; (message (format "%s:%s %s:%s" (mail-header-number (gnus-thread-header h1))(mail-header-subject (gnus-thread-header h1))(mail-header-number (gnus-thread-header h2))(mail-header-subject (gnus-thread-header h2))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
28 (let ((case-fold-search t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
29 (let ((result
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
30 (string-lessp
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
31 (downcase (gnus-trim-simplify-subject (mail-header-subject
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
32 (gnus-thread-header h1))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
33 (downcase (gnus-trim-simplify-subject (mail-header-subject
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
34 (gnus-thread-header h2)))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
35 ; (message (format " %s\n" result))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
36 result)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
37
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
38
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
39 ;; Database stuff
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
40
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
41
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
42 (defun open-white ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
43 (setq whitelist-db (open-database "/disk/scratch/mail/white" 'berkeley-db)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
44
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
45 (defun save-white ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
46 (close-database whitelist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
47 (open-white))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
48
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
49 (defun open-ad ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
50 (setq adlist-db (open-database "/disk/scratch/mail/ad" 'berkeley-db)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
51
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
52 (defun save-ad ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
53 (close-database adlist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
54 (open-ad))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
55
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
56 (defun open-quaker ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
57 (setq quaker-db (open-database "/disk/scratch/mail/quaker" 'berkeley-db)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
58 (defun save-quaker ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
59 (close-database quaker-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
60 (open-quaker))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
61
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
62 (defvar database-names '(whitelist-db adlist-db quaker-db) "sic")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
63
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
64 (defun db-status (&optional name)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
65 "Check on the whereabouts of a name"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
66 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
67 (let ((addr
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
68 (or name
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
69 (progn
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
70 (gnus-summary-goto-article (gnus-summary-article-number))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
71 (get-canonical-from-addr (get-current-from-components)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
72 res)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
73 (dolist (dbn database-names)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
74 (if (get-database addr (eval dbn))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
75 (setq res (cons dbn res))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
76 (if name
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
77 res
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
78 (message "%s" res))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
79
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
80 (defun add-white (&optional addToBBDB)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
81 (interactive "P")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
82 (gnus-summary-goto-article (gnus-summary-article-number))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
83 (let* ((components (get-current-from-components))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
84 (addr (get-canonical-from-addr components)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
85 (if (new-white addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
86 (save-white))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
87 (if addToBBDB
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
88 (let ((bbdb-no-duplicates-p t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
89 (bbdb-create-internal (car components) nil (cadr components)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
90 nil nil nil)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
91
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
92 (defun add-ad ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
93 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
94 (gnus-summary-goto-article (gnus-summary-article-number))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
95 (let ((addr (get-current-from-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
96 (if (or (not (get-database addr whitelist-db))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
97 (yes-or-no-p "Already white, really convert to ad?"))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
98 (if (new-ad addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
99 (save-ad)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
100
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
101 (defun add-quaker()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
102 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
103 (let ((addr (get-addr-before-point)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
104 (when (new-quaker addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
105 (save-quaker))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
106 (quaker-sig-maybe)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
107
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
108 (defun quaker-sig-if-to-quaker ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
109 (let ((message-options))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
110 (save-excursion (message-options-set-recipient))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
111 (let* ((recipStr (message-options-get 'message-recipients))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
112 (recips (split-string (downcase recipStr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
113 ",[ \f\t\n\r\v]+" t)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
114 (while (and recips
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
115 (not (quaker-sig-if-quaker-1 (car recips))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
116 (setq recips (cdr recips))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
117
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
118 (defun quaker-sig-if-quaker ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
119 (quaker-sig-if-quaker-1 (get-addr-before-point)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
120
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
121 (defun quaker-sig-if-quaker-1 (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
122 (if (get-database addr quaker-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
123 (progn (quaker-sig-maybe)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
124 t)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
125
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
126 (defun quaker-sig-maybe ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
127 (save-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
128 (goto-char (point-max))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
129 (search-backward "\n-- \n")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
130 (when (looking-at "\n-- \n Henry")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
131 (forward-char 5)
3
0a81352bd7d0 catch up
Henry S. Thompson <ht@inf.ed.ac.uk>
parents: 0
diff changeset
132 (kill-entire-line 6)
0
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
133 (insert-file "/afs/inf.ed.ac.uk/user/h/ht/.quaker-sig"))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
134
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
135 (defun kill-white ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
136 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
137 (gnus-summary-goto-article (gnus-summary-article-number))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
138 (let ((addr (downcase (get-current-from-addr))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
139 (rem-white addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
140
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
141 (defun kill-ad ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
142 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
143 (gnus-summary-goto-article (gnus-summary-article-number))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
144 (let ((addr (downcase (get-current-from-addr))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
145 (rem-ad addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
146
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
147 (defun get-from-gnus-addr ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
148 (get-from-addr (gnus-fetch-field "From")))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
149
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
150 (defun get-from-addr (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
151 (get-canonical-from-addr (gnus-extract-address-components addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
152
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
153 (defun get-canonical-from-addr (components)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
154 (downcase (cadr components)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
155
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
156 (defun get-current-from-addr ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
157 (with-current-buffer gnus-article-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
158 (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
159
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
160 (defun get-current-from-components ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
161 (with-current-buffer gnus-article-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
162 (gnus-extract-address-components (gnus-fetch-field "From"))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
163
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
164 (defun get-addr-before-point ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
165 (let ((cur (point)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
166 (save-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
167 (get-from-addr (buffer-substring (+ (search-backward " ") 1) cur)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
168 ))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
169
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
170 (defun blacken-and-delete (group)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
171 ;; mis-named now
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
172 ;; this is part of the expiry processing for xxxSPAM groups, and
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
173 ;; actually whitens the from addresses of #-marked articles
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
174 ;; The return value is crucial (and crucially outside of the scope of the if)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
175 (if (memq number
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
176 (with-current-buffer gnus-summary-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
177 gnus-newsgroup-processable))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
178 (let ((addr (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
179 (new-white addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
180 'delete)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
181
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
182 (defun unwhiten-and-delete (group)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
183 ;; unused except in stale groups -- usable as an expiry
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
184 (if (memq number
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
185 (with-current-buffer gnus-summary-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
186 gnus-newsgroup-processable))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
187 (let ((addr (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
188 (remove-database addr whitelist-db)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
189 'delete)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
190
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
191 (defun known-black (list)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
192 (if (get-database (get-from-gnus-addr) blacklist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
193 list))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
194
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
195 (defun white-spam (list)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
196 (if (or (equal (get-database (get-from-gnus-addr) whitelist-db) "t")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
197 (let ((case-fold-search t)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
198 (subj (gnus-fetch-field "Subject"))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
199 (from (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
200 (or
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
201 (and subj (string-match white-subjects subj))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
202 (and from
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
203 (let ((fromDom (substring from (+ 1 (search "@" from)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
204 (and fromDom (member fromDom white-domains)))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
205 list))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
206
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
207 (defun ad-spam (list)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
208 (if (let ((from (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
209 (or
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
210 (equal (get-database from adlist-db) "t")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
211 (and from
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
212 (let ((fromDom (substring from (+ 1 (search "@" from)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
213 (and fromDom (member fromDom ad-domains))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
214 ))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
215 list))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
216
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
217 (defun bogoNote (group)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
218 (if (memq number
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
219 (with-current-buffer gnus-summary-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
220 gnus-newsgroup-processable))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
221 (let ((addr (get-from-gnus-addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
222 (new-white addr)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
223 (shell-command-on-region (point-min) (point-max)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
224 "/afs/inf.ed.ac.uk/user/h/ht/share/bin/local/makeBogo")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
225 'delete)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
226
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
227 (defun whiten-recip ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
228 ;;; a hook for outgoing mail
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
229 (let* ((recips (message-options-get 'message-recipients))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
230 (res (mapcar (function new-white)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
231 (split-string (downcase recips)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
232 ",[ \f\t\n\r\v]*" t))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
233 (while (and res (not (car res)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
234 (setq res (cdr res)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
235 (if res (save-white))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
236
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
237
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
238 (defun new-white (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
239 (if (get-database addr whitelist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
240 nil
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
241 (put-database addr "t" whitelist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
242 t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
243
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
244 (defun new-ad (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
245 (if (get-database addr adlist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
246 nil
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
247 (put-database addr "t" adlist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
248 t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
249
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
250 (defun rem-ad (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
251 (remove-database addr adlist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
252 (save-ad))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
253
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
254 (defun new-quaker (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
255 (if (get-database addr quaker-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
256 nil
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
257 (put-database addr "t" quaker-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
258 t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
259
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
260 (defun rem-white (addr)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
261 (remove-database (downcase addr) whitelist-db)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
262 (save-white))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
263
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
264 (defun bogoOK (group)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
265 (shell-command-on-region (point-min) (point-max)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
266 "/afs/inf.ed.ac.uk/user/h/ht/share/bin/local/makeNonBogo")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
267 'delete)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
268
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
269 (defun del-dups ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
270 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
271 (gnus-summary-sort-by-subject)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
272 (gnus-summary-clear-mark-forward 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
273 (goto-char (point-min))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
274 (let ((pos))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
275 (while (setq pos (search-forward "] " nil t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
276 (end-of-line)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
277 (let ((subj (buffer-substring pos (point))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
278 (unless (equal subj "")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
279 (let ((target (if (< (length subj) 26)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
280 (concat "] " subj "\n")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
281 (concat "] " (substring subj 0 25))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
282 (done 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
283 (case-fold-search nil))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
284 (while (and (= done 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
285 (search-forward target nil t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
286 (forward-char -3)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
287 (setq done (gnus-summary-mark-as-read-forward 1))))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
288 (gnus-summary-limit-to-unread)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
289 (gnus-summary-sort-by-original))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
290
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
291 (defun mark-and-mark (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
292 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
293 (while (>= n 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
294 (gnus-summary-mark-as-read)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
295 (gnus-summary-mark-as-processable 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
296 (setq n (- n 1))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
297
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
298 (defun split-on-whole-field (field pat list)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
299 (goto-char (point-max))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
300 (let ((hit (assq pat wsp-cache))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
301 rpat)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
302 (if hit
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
303 (setq rpat (cdr hit))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
304 (setq rpat
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
305 (concat "^"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
306 field
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
307 ":\\s-*"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
308 (if (stringp pat)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
309 pat
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
310 (cdr (assq pat
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
311 nnmail-split-abbrev-alist)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
312 "$"))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
313 (setq wsp-cache (cons (cons pat rpat) wsp-cache)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
314 (if (re-search-backward rpat nil t)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
315 list)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
316
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
317 (defun ht-gnus-summary-delete-forward ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
318 "REAL delete for nnmail gnus"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
319 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
320 (gnus-summary-delete-article)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
321 (gnus-summary-next-unread-article))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
322
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
323 ;; run the first time we make a summary window
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
324 (defun gnus-summary-mode-fun1 ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
325 "install ht's mods"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
326 (define-key gnus-summary-mode-map "D" 'ht-gnus-summary-delete-forward)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
327 (define-key gnus-summary-mode-map "~" 'mark-and-mark)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
328 (define-key gnus-summary-mode-map "\M-d" 'gnus-edit-and-move-to-diary)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
329 (define-key gnus-summary-mode-map "\M-e" 'gnus-extract-attachment)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
330 (define-key gnus-summary-mode-map "\M-w" 'add-white)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
331 (define-key gnus-summary-mode-map [(control meta w)] 'copy-region-to-kill)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
332 (define-key gnus-summary-mode-map "\M-h" 'showMPAhtml)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
333 ;(define-key gnus-summary-mode-map [(control meta w)] 'kill-white)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
334 (define-key gnus-summary-mode-map "\M-a" 'add-ad)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
335 (define-key gnus-summary-mode-map "\M-n" 'ht-next-unseen-maybe)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
336 (define-key gnus-summary-mode-map "\M-c" 'ht-catchup-and-next-unseen)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
337 (define-key gnus-summary-mime-map "O" 'ht-article-save-parts)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
338 (define-key gnus-summary-backend-map "M" 'ht-move-to-pers)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
339 (remove-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
340
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
341 (defun message-mode-fun1 ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
342 (define-key message-mode-map [(control meta q)] 'add-quaker)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
343 (remove-hook 'message-mode-hook 'message-mode-fun1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
344
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
345 (defvar ht-gnus-just-read nil)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
346
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
347 (defun ht-catchup-and-next-unseen ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
348 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
349 (when (gnus-summary-catchup nil t nil 'fast)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
350 (gnus-summary-exit)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
351 (previous-line 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
352 (ht-next-with-unseen 1)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
353
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
354 (defun ht-next-unseen-maybe (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
355 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
356 (cond
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
357 ((eq (gnus-summary-next-unread-subject n) n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
358 (gnus-summary-exit)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
359 (previous-line 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
360 (if (ht-next-with-unseen n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
361 (ht-read-group-unseen-only)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
362
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
363 (defun ht-gnus-pers-refresh (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
364 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
365 (let ((gn (concat "nnml+ht:pers-"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
366 (format-time-string "%Y-%m" (current-time)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
367 (gnus-group-get-new-news)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
368 (let ((nn (gnus-number-of-unseen-articles-in-group gn)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
369 (gnus-group-goto-group gn)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
370 (cond
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
371 ((> nn 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
372 (gnus-group-read-group nn))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
373 ((> n 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
374 (let ((gnus-auto-select-subject
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
375 (lambda ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
376 (goto-char (point-max))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
377 (previous-line 1))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
378 (gnus-group-read-group nil t)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
379 (t (goto-char (point-min))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
380 (ht-next-with-unseen 1))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
381 (message "%s" ht-gnus-just-read))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
382 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
383
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
384 (defun no-select ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
385 (if (member gnus-newsgroup-name no-select-groups)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
386 (progn (make-variable-buffer-local 'gnus-auto-select-first)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
387 (setq gnus-auto-select-first nil))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
388
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
389 (defun showMPAhtml ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
390 "Show the text/html parts of an multipart/alternative message using lynx"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
391 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
392 (gnus-summary-select-article)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
393 (with-current-buffer gnus-original-article-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
394 (shell-command-on-region (point-min) (point-max) "/afs/inf.ed.ac.uk/user/h/ht/share/bin/showMPA.sh")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
395 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
396 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
397
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
398
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
399 ;; run the first time we make a group window
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
400 (defun gnus-group-mode-fun1 ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
401 "install ht's mods"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
402 (require 'gnus-msg)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
403 (define-key gnus-group-mode-map "\M-\C-g" 'ht-gnus-pers-refresh)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
404 (define-key gnus-group-mode-map "\M-n" 'ht-next-with-unseen)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
405 (define-key gnus-group-mode-map "\M-p" 'ht-previous-with-unseen)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
406 (define-key gnus-group-mode-map "\M- " 'ht-read-group-unseen-only)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
407 (define-key gnus-send-bounce-map "R" 'resend-to-schemadev)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
408 (define-key gnus-send-bounce-map "x" 'flush-all-nogoods)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
409 (remove-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
410
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
411 (defun flush-all-nogoods ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
412 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
413 (while (re-search-forward
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
414 "] \\(\\(Returned\\|\\([Uu]n\\|[Nn]on-?\\)deliver\\(able\\|ed\\)\\)\\( [Mm]ail\\|:?\\)\\|DELIVERY FAILURE\\|Delivery \\(Notification: Delivery has failed\\|Status Notification .\\(Failure\\|Delay\\).\\)\\|failure \\(notice\\|delivery\\)\\)"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
415 nil t)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
416 (gnus-summary-mark-as-read)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
417 (end-of-line)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
418
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
419 (defun gnus-user-format-function-t (header)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
420 "display the to field (for archive messages)"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
421 (let ((n (mail-header-number header)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
422 (with-current-buffer nntp-server-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
423 (save-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
424 (save-restriction
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
425 (let ((inhibit-point-motion-hooks t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
426 (goto-char (point-min))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
427 (let ((beg (search-forward (format " %d Article retrieved." n)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
428 (end (search-forward "\n.\n")))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
429 (narrow-to-region beg end)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
430 (goto-char beg)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
431 (message-fetch-field "To"))))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
432
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
433 (defun gnus-extract-attachment ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
434 "extract attachments from a multi-part mime message"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
435 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
436 (let ((sm gnus-show-mime))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
437 (if sm
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
438 (progn (setq gnus-show-mime nil)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
439 (gnus-summary-select-article t 'force))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
440 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
441 (gnus-summary-show-all-headers)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
442 (with-current-buffer gnus-article-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
443 (save-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
444 (save-restriction
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
445 (mime/viewer-mode)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
446 (delete-other-windows)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
447 (let ((pt 0))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
448 (while (progn
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
449 (mime-viewer/next-content)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
450 (and
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
451 (equal "*Preview-*Article**" (buffer-name (current-buffer)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
452 (not (= pt (point)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
453 (setq pt (point))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
454 (if (looking-at "^\\[[0-9]* \\([^ ]+ \\)+<")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
455 (mime-viewer/extract-content)))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
456 (kill-buffer "*Preview-*Article**")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
457 (setq gnus-show-mime sm)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
458 ))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
459
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
460 ;;; Why???
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
461 (make-variable-buffer-local 'gnus-extra-headers)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
462 (make-variable-buffer-local 'nnmail-extra-headers)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
463
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
464
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
465 (defun resend-to-schemadev ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
466 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
467 (message "forwarding to xmlschema-dev")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
468 (gnus-summary-resend-message "xmlschema-dev@w3.org" 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
469 (gnus-summary-next-unread-article))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
470
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
471 (defun brutal-resend ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
472 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
473 (message "editing for resend. . .")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
474 (unless (eq (gnus-summary-article-number)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
475 gnus-current-article)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
476 (gnus-summary-select-article t))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
477 (gnus-summary-toggle-header 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
478 (with-current-buffer gnus-article-buffer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
479 (toggle-read-only)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
480 (gnus-article-date-original)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
481 (goto-char (point-min))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
482 (replace-regexp "^\\(X-Diagnostic\\|X-Envelope-To\\|X-Original-To\\|Delivered-To\\):.*\n" "")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
483 (goto-char (point-min))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
484 (gnus-summary-edit-article-done
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
485 (or (mail-header-references gnus-current-headers) "")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
486 (gnus-group-read-only-p) gnus-summary-buffer nil))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
487 (call-interactively (function gnus-summary-resend-message))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
488 (gnus-summary-next-unread-article))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
489
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
490 ; (unless (fboundp 'builtin-coding-system-p)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
491 ; (fset 'builtin-coding-system-p (symbol-function 'coding-system-p))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
492 ; (defun coding-system-p (obj)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
493 ; (cond
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
494 ; ((builtin-coding-system-p obj) t)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
495 ; ((memq obj '(utf-8 gb2312 koi8-r iso-8859-1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
496 ; (message (format "Coding system: %s" obj))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
497 ; t))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
498
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
499 ;;; dangerous hack to improve display of names and subjects in mail/news
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
500 (if nil (progn
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
501 (require 'mm-util)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
502 (defun mm-decode-coding-string (str cs)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
503 (if (and str (eq cs 'utf-8))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
504 (if (or (string-match "Â" str)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
505 (string-match "Ã" str))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
506 (let* ((r 0) ; read pointer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
507 (w 0) ; write pointer
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
508 (l (length str)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
509 (while (< r l)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
510 (let* ((c (aref str r))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
511 (i (char-int c)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
512 (cond ((= i 194)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
513 (aset str w (aref str (+ r 1)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
514 (setq r (+ r 2)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
515 ((= i 195)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
516 (aset str w
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
517 (int-char
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
518 (+ 64
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
519 (char-int (aref str (+ r 1))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
520 (setq r (+ r 2)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
521 (t
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
522 (aset str w c)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
523 (setq r (+ r 1)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
524 (setq w (+ w 1)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
525 (substring str 0 w))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
526 str)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
527 str))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
528
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
529 (defun mm-sort-coding-systems-predicate (a b)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
530 ;; from mm-util, abort if no priorities
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
531 (or (not mm-coding-system-priorities)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
532 (let ((priorities
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
533 (mapcar (lambda (cs)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
534 ;; Note: invalid entries are dropped silently
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
535 (and (setq cs (mm-coding-system-p cs))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
536 (coding-system-base cs)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
537 mm-coding-system-priorities)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
538 (and (setq a (mm-coding-system-p a))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
539 (if (setq b (mm-coding-system-p b))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
540 (> (length (memq (coding-system-base a) priorities))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
541 (length (memq (coding-system-base b) priorities)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
542 t)))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
543
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
544 (require 'browse-url)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
545
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
546 ;;; This version collects extra lines if you use right-button
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
547 ;;; to click on a URL
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
548 (defun browse-url (url &rest args)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
549 "Ask a WWW browser to load URL.
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
550 Prompts for a URL, defaulting to the URL at or before point. Variable
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
551 `browse-url-browser-function' says which browser to use."
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
552 (interactive (browse-url-interactive-arg "URL: "))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
553 (unless (interactive-p)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
554 (setq args (or args (list browse-url-new-window-flag))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
555 (if (and (boundp 'event)(= 3 (event-button event)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
556 (let ((thisLine url))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
557 (while (and (progn (forward-char (length thisLine))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
558 (eolp))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
559 (progn (forward-line 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
560 (beginning-of-line)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
561 (not (looking-at "\\s-"))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
562 (looking-at "\\S-*")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
563 (setq thisLine (buffer-substring (match-beginning 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
564 (match-end 0)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
565 (setq url (concat url thisLine)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
566 (if (functionp browse-url-browser-function)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
567 (apply browse-url-browser-function url args)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
568 ;; The `function' can be an alist; look down it for first match
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
569 ;; and apply the function (which might be a lambda).
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
570 (catch 'done
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
571 (dolist (bf browse-url-browser-function)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
572 (when (string-match (car bf) url)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
573 (apply (cdr bf) url args)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
574 (throw 'done t)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
575 (error "No browse-url-browser-function matching URL %s"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
576 url))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
577
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
578 (defun gnus-user-format-function-H (dummy)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
579 (format "%c"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
580 (cond ((eq gnus-tmp-summary-live ?*)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
581 ?*)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
582 ((> (gnus-number-of-unseen-articles-in-group gnus-tmp-group) 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
583 ?.)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
584 (t ? ))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
585
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
586 (defun ht-next-with-unseen (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
587 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
588 (let* ((gvl (mapcar (function string-to-number)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
589 (split-string gnus-version-number "\\.")))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
590 (pattern (if (or (> (car gvl) 5)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
591 (and (eq (car gvl) 5)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
592 (or (> (cadr gvl) 10)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
593 (and (eq (cadr gvl) 10)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
594 (> (caddr gvl) 7)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
595 "\\."
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
596 ":\\.")))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
597 (if (looking-at pattern)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
598 (if (< n 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
599 (backward-char 1)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
600 (forward-char 1)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
601 (let ((missing 0)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
602 (winning (looking-at pattern)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
603 (while (and (zerop missing)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
604 (not winning))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
605 (setq missing (gnus-group-next-unread-group n))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
606 (setq winning (looking-at pattern)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
607 winning)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
608
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
609 (defun ht-read-group-unseen-only ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
610 (interactive)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
611 (gnus-group-read-group
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
612 (gnus-number-of-unseen-articles-in-group (gnus-group-group-name))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
613
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
614 (defun ht-previous-with-unseen (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
615 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
616 (ht-next-with-unseen (- n)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
617
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
618 (defun ht-gnus-note-save-to-group ()
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
619 (let ((g (caar group-art)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
620 (if (not (member g ht-gnus-just-read))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
621 (setq ht-gnus-just-read (cons g ht-gnus-just-read)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
622
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
623 (defvar ht-stash-directory "/disk/scratch/mail/stash/")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
624
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
625 (defun ht-save-part (handle n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
626 (let ((sup-type (mm-handle-media-supertype handle))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
627 (sub-type (mm-handle-media-subtype handle)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
628 (message (format "%s %s/%s" n sup-type sub-type))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
629 (cond ((and (equal sup-type "multipart")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
630 (or (equal sub-type "alternative")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
631 (equal sub-type "related")))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
632 (let ((alts (cddr handle))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
633 (j 0))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
634 (while alts
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
635 (let* ((alt (pop alts))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
636 (handle-type (mm-handle-type alt)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
637 (let* ((sub (mm-handle-media-subtype alt))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
638 (ext (cdr
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
639 (assoc sub '(("calendar" . "vcs")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
640 ("v-calendar" . "vcs"))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
641 (setq j (+ j 1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
642 (if (not (or (mail-content-type-get
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
643 (mm-handle-disposition alt) 'filename)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
644 (mail-content-type-get
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
645 handle-type 'name)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
646 (nconc
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
647 handle-type
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
648 (list (cons 'name (format "%s.%s.%s"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
649 n j (or ext sub))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
650 (ht-save-part alt (format "%s.%s" n j)))))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
651 ((and (equal sup-type "text")(not
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
652 (member sub-type '("html"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
653 "v-calendar"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
654 "calendar"))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
655 (message "Skipping text part: %s" (mm-handle-disposition handle)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
656 (t
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
657 (mm-save-part handle)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
658
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
659 (defun ht-move-to-pers (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
660 (interactive "p")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
661 (gnus-summary-move-article n
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
662 (concat
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
663 "nnml+ht:pers-"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
664 (format-time-string "%Y-%m" (current-time)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
665
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
666 (defun ht-article-save-parts (n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
667 "Save non t/p MIME parts starting at N, which is the numerical prefix."
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
668 (interactive "p2")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
669 (let ((window (get-buffer-window gnus-article-buffer 'visible))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
670 frame)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
671 (when window
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
672 ;; It is necessary to select the article window so that
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
673 ;; `gnus-article-goto-part' may really move the point.
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
674 (setq frame (selected-frame))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
675 (gnus-select-frame-set-input-focus (window-frame window))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
676 (unwind-protect
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
677 (save-window-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
678 (select-window window)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
679 (let ((len (length gnus-article-mime-handle-alist)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
680 (setq mm-default-directory ht-stash-directory)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
681 (while (<= n len)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
682 (gnus-article-goto-part n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
683 (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
684 (ht-save-part handle n))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
685 (setq n (+ n 1))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
686 )))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
687 (gnus-select-frame-set-input-focus frame))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
688 )
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
689
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
690
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
691 (defun gnus-article-part-wrapper (n function)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
692 (let ((window (get-buffer-window gnus-article-buffer 'visible))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
693 frame)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
694 (when window
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
695 ;; It is necessary to select the article window so that
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
696 ;; `gnus-article-goto-part' may really move the point.
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
697 (setq frame (selected-frame))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
698 (gnus-select-frame-set-input-focus (window-frame window))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
699 (unwind-protect
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
700 (save-window-excursion
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
701 (select-window window)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
702 (when (> n (length gnus-article-mime-handle-alist))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
703 (error "No such part"))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
704 (gnus-article-goto-part n)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
705 (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
706 (funcall function handle)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
707 (gnus-select-frame-set-input-focus frame)))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
708
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
709 (defun mhstore-me (dir)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
710 (interactive (list (read-directory-name "Save parts to " "/tmp" "/tmp" t)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
711 (let ((art (gnus-summary-article-number)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
712 (let* ((grp-parts (split-string gnus-newsgroup-name ":"))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
713 (meth (car grp-parts))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
714 (grp (cadr grp-parts)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
715 (if (string= meth "nnml+ht")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
716 (let ((doit
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
717 (format "cd %s && mhstore -f /disk/scratch/mail/Mail/%s/%s -auto"
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
718 dir grp art)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
719 (message doit)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
720 (shell-command doit))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
721 ))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
722
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
723 (defun my-message-send-and-exit (&optional arg)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
724 (interactive "P")
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
725 (let ((message-required-mail-headers
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
726 (if arg
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
727 (mapcar
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
728 (lambda(x)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
729 (if(and(consp x)(eq(cdr x)'In-Reply-To))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
730 (cons 'optional 'xyzzy)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
731 x))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
732 message-required-mail-headers)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
733 message-required-mail-headers)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
734 (orig-message-send-and-exit)))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
735
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
736 (require 'message)
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
737 (if (not (fboundp 'orig-message-send-and-exit))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
738 (progn
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
739 (fset 'orig-message-send-and-exit (symbol-function 'message-send-and-exit))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
740 (fset 'message-send-and-exit (symbol-function 'my-message-send-and-exit))))
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
741
107d592c5f4a DICE versions, used by pers/common, recursive, I think/hope
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
742 (provide 'my-news)