Mercurial > emacs
annotate lisp/mail/rmailsum.el @ 71405:330971fc5282
*** empty log message ***
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 20 Jun 2006 19:30:22 +0000 |
parents | ecd9a20a44b0 |
children | e3694f1cb928 a802c5505156 |
rev | line source |
---|---|
2233
fb0ed5a1d0f3
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2232
diff
changeset
|
1 ;;; rmailsum.el --- make summary buffers for the mail reader |
2232
4f9d60f7de9d
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2164
diff
changeset
|
2 |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2003, |
68648
067115a6e738
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
68399
diff
changeset
|
4 ;; 2004, 2005, 2006 Free Software Foundation, Inc. |
845 | 5 |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
6 ;; Maintainer: FSF |
814
38b2499cb3e9
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
807
diff
changeset
|
7 ;; Keywords: mail |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
8 |
130 | 9 ;; This file is part of GNU Emacs. |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
807
4f28bd14272c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
658
diff
changeset
|
13 ;; the Free Software Foundation; either version 2, or (at your option) |
130 | 14 ;; any later version. |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
14169 | 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
130 | 25 |
2232
4f9d60f7de9d
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2164
diff
changeset
|
26 ;;; Commentary: |
4f9d60f7de9d
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2164
diff
changeset
|
27 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
28 ;; Extended by Bob Weiner of Motorola |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
29 ;; Provided all commands from rmail-mode in rmail-summary-mode and made key |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
30 ;; bindings in both modes wholly compatible. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
31 |
2232
4f9d60f7de9d
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2164
diff
changeset
|
32 ;;; Code: |
4f9d60f7de9d
Add standard library headers.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2164
diff
changeset
|
33 |
65206
f2358a6ec49b
(msgnum): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64929
diff
changeset
|
34 (defvar msgnum) |
f2358a6ec49b
(msgnum): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents:
64929
diff
changeset
|
35 |
12911 | 36 ;; For rmail-select-summary |
37 (require 'rmail) | |
38 | |
14940
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
39 ;;;###autoload |
17631 | 40 (defcustom rmail-summary-scroll-between-messages t |
41 "*Non-nil means Rmail summary scroll commands move between messages." | |
42 :type 'boolean | |
43 :group 'rmail-summary) | |
14940
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
44 |
16388
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
45 ;;;###autoload |
17631 | 46 (defcustom rmail-summary-line-count-flag t |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
47 "*Non-nil means Rmail summary should show the number of lines in each message." |
17631 | 48 :type 'boolean |
49 :group 'rmail-summary) | |
16388
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
50 |
9379
138d99e53e94
(rmail-summary-font-lock-keywords): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9352
diff
changeset
|
51 (defvar rmail-summary-font-lock-keywords |
40155
c97b4697abed
(rmail-summary-font-lock-keywords): Fix the
Eli Zaretskii <eliz@gnu.org>
parents:
39567
diff
changeset
|
52 '(("^.....D.*" . font-lock-string-face) ; Deleted. |
c97b4697abed
(rmail-summary-font-lock-keywords): Fix the
Eli Zaretskii <eliz@gnu.org>
parents:
39567
diff
changeset
|
53 ("^.....-.*" . font-lock-type-face) ; Unread. |
9379
138d99e53e94
(rmail-summary-font-lock-keywords): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9352
diff
changeset
|
54 ;; Neither of the below will be highlighted if either of the above are: |
40155
c97b4697abed
(rmail-summary-font-lock-keywords): Fix the
Eli Zaretskii <eliz@gnu.org>
parents:
39567
diff
changeset
|
55 ("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date. |
52683
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
56 ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. |
9379
138d99e53e94
(rmail-summary-font-lock-keywords): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9352
diff
changeset
|
57 "Additional expressions to highlight in Rmail Summary mode.") |
138d99e53e94
(rmail-summary-font-lock-keywords): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
9352
diff
changeset
|
58 |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
59 (defvar rmail-summary-redo |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
60 "(FUNCTION . ARGS) to regenerate this Rmail summary buffer.") |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
61 |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
62 (defvar rmail-summary-overlay nil) |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
63 (put 'rmail-summary-overlay 'permanent-local t) |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
64 |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
65 (defvar rmail-summary-mode-map nil) |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
66 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
67 ;; Entry points for making a summary buffer. |
130 | 68 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
69 ;; Regenerate the contents of the summary |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
70 ;; using the same selection criterion as last time. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
71 ;; M-x revert-buffer in a summary buffer calls this function. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
72 (defun rmail-update-summary (&rest ignore) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
73 (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) |
130 | 74 |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
75 ;;;###autoload |
130 | 76 (defun rmail-summary () |
77 "Display a summary of all messages, one line per message." | |
78 (interactive) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
79 (rmail-new-summary "All" '(rmail-summary) nil)) |
130 | 80 |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
81 ;;;###autoload |
130 | 82 (defun rmail-summary-by-labels (labels) |
83 "Display a summary of all messages with one or more LABELS. | |
84 LABELS should be a string containing the desired labels, separated by commas." | |
85 (interactive "sLabels to summarize by: ") | |
86 (if (string= labels "") | |
87 (setq labels (or rmail-last-multi-labels | |
88 (error "No label specified")))) | |
89 (setq rmail-last-multi-labels labels) | |
90 (rmail-new-summary (concat "labels " labels) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
91 (list 'rmail-summary-by-labels labels) |
130 | 92 'rmail-message-labels-p |
93 (concat ", \\(" (mail-comma-list-regexp labels) "\\),"))) | |
94 | |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
95 ;;;###autoload |
130 | 96 (defun rmail-summary-by-recipients (recipients &optional primary-only) |
97 "Display a summary of all messages with the given RECIPIENTS. | |
98 Normally checks the To, From and Cc fields of headers; | |
99 but if PRIMARY-ONLY is non-nil (prefix arg given), | |
100 only look in the To and From fields. | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
101 RECIPIENTS is a string of regexps separated by commas." |
130 | 102 (interactive "sRecipients to summarize by: \nP") |
103 (rmail-new-summary | |
104 (concat "recipients " recipients) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
105 (list 'rmail-summary-by-recipients recipients primary-only) |
130 | 106 'rmail-message-recipients-p |
107 (mail-comma-list-regexp recipients) primary-only)) | |
108 | |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
109 ;;;###autoload |
130 | 110 (defun rmail-summary-by-regexp (regexp) |
111 "Display a summary of all messages according to regexp REGEXP. | |
112 If the regular expression is found in the header of the message | |
113 \(including in the date and other lines, as well as the subject line), | |
114 Emacs will list the header line in the RMAIL-summary." | |
115 (interactive "sRegexp to summarize by: ") | |
116 (if (string= regexp "") | |
117 (setq regexp (or rmail-last-regexp | |
38412
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
37955
diff
changeset
|
118 (error "No regexp specified")))) |
130 | 119 (setq rmail-last-regexp regexp) |
120 (rmail-new-summary (concat "regexp " regexp) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
121 (list 'rmail-summary-by-regexp regexp) |
130 | 122 'rmail-message-regexp-p |
123 regexp)) | |
124 | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
125 ;; rmail-summary-by-topic |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
126 ;; 1989 R.A. Schnitzler |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
127 |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
128 ;;;###autoload |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
129 (defun rmail-summary-by-topic (subject &optional whole-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
130 "Display a summary of all messages with the given SUBJECT. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
131 Normally checks the Subject field of headers; |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
132 but if WHOLE-MESSAGE is non-nil (prefix arg given), |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
133 look in the whole message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
134 SUBJECT is a string of regexps separated by commas." |
68090
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
135 (interactive |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
136 (let* ((subject (with-current-buffer rmail-buffer |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
137 (rmail-current-subject))) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
138 (subject-re (with-current-buffer rmail-buffer |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
139 (rmail-current-subject-regexp))) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
140 (prompt (concat "Topics to summarize by (regexp" |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
141 (if subject ", default current subject" "") |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
142 "): "))) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
143 (list (read-string prompt nil nil subject) current-prefix-arg))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
144 (rmail-new-summary |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
145 (concat "about " subject) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
146 (list 'rmail-summary-by-topic subject whole-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
147 'rmail-message-subject-p |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
148 (mail-comma-list-regexp subject) whole-message)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
149 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
150 (defun rmail-message-subject-p (msg subject &optional whole-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
151 (save-restriction |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
152 (goto-char (rmail-msgbeg msg)) |
23612
61519017b94a
(rmail-message-subject-p):
Richard M. Stallman <rms@gnu.org>
parents:
23221
diff
changeset
|
153 (search-forward "\n*** EOOH ***\n" (rmail-msgend msg) 'move) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
154 (narrow-to-region |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
155 (point) |
3349
31390246a7a2
(rmail-message-subject-p): Fix typo in string constant.
Richard M. Stallman <rms@gnu.org>
parents:
3198
diff
changeset
|
156 (progn (search-forward (if whole-message "\^_" "\n\n")) (point))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
157 (goto-char (point-min)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
158 (if whole-message (re-search-forward subject nil t) |
37955
e1400bd914f0
(rmail-message-subject-p): Don't call
Gerd Moellmann <gerd@gnu.org>
parents:
37614
diff
changeset
|
159 (string-match subject (let ((subj (mail-fetch-field "Subject"))) |
e1400bd914f0
(rmail-message-subject-p): Don't call
Gerd Moellmann <gerd@gnu.org>
parents:
37614
diff
changeset
|
160 (if subj |
e1400bd914f0
(rmail-message-subject-p): Don't call
Gerd Moellmann <gerd@gnu.org>
parents:
37614
diff
changeset
|
161 (funcall rmail-summary-line-decoder subj) |
e1400bd914f0
(rmail-message-subject-p): Don't call
Gerd Moellmann <gerd@gnu.org>
parents:
37614
diff
changeset
|
162 "")))))) |
3443
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
163 |
16344
ec0f59ba6768
(rmail-summary-by-senders, rmail-summary): Add autoload.
Richard M. Stallman <rms@gnu.org>
parents:
16242
diff
changeset
|
164 ;;;###autoload |
3443
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
165 (defun rmail-summary-by-senders (senders) |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
166 "Display a summary of all messages with the given SENDERS. |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
167 SENDERS is a string of names separated by commas." |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
168 (interactive "sSenders to summarize by: ") |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
169 (rmail-new-summary |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
170 (concat "senders " senders) |
5507
0a6c0e720ece
(rmail-summary-by-senders):
Richard M. Stallman <rms@gnu.org>
parents:
5370
diff
changeset
|
171 (list 'rmail-summary-by-senders senders) |
3443
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
172 'rmail-message-senders-p |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
173 (mail-comma-list-regexp senders))) |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
174 |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
175 (defun rmail-message-senders-p (msg senders) |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
176 (save-restriction |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
177 (goto-char (rmail-msgbeg msg)) |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
178 (search-forward "\n*** EOOH ***\n") |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
179 (narrow-to-region (point) (progn (search-forward "\n\n") (point))) |
7a15b35366f8
(rmail-summary-by-senders): New function.
Richard M. Stallman <rms@gnu.org>
parents:
3349
diff
changeset
|
180 (string-match senders (or (mail-fetch-field "From") "")))) |
130 | 181 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
182 ;; General making of a summary buffer. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
183 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
184 (defvar rmail-summary-symbol-number 0) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
185 |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
186 (defvar rmail-new-summary-line-count) |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
187 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
188 (defun rmail-new-summary (description redo-form function &rest args) |
130 | 189 "Create a summary of selected messages. |
190 DESCRIPTION makes part of the mode line of the summary buffer. | |
191 For each message, FUNCTION is applied to the message number and ARGS... | |
192 and if the result is non-nil, that message is included. | |
193 nil for FUNCTION means all messages." | |
194 (message "Computing summary lines...") | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
195 (let (sumbuf mesg was-in-summary) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
196 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
197 ;; Go to the Rmail buffer. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
198 (if (eq major-mode 'rmail-summary-mode) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
199 (setq was-in-summary t)) |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
200 (set-buffer rmail-buffer) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
201 ;; Find its summary buffer, or make one. |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
202 (setq sumbuf |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
203 (if (and rmail-summary-buffer |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
204 (buffer-name rmail-summary-buffer)) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
205 rmail-summary-buffer |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
206 (generate-new-buffer (concat (buffer-name) "-summary")))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
207 (setq mesg rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
208 ;; Filter the messages; make or get their summary lines. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
209 (let ((summary-msgs ()) |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
210 (rmail-new-summary-line-count 0)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
211 (let ((msgnum 1) |
6762
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
212 (buffer-read-only nil) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
213 (old-min (point-min-marker)) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
214 (old-max (point-max-marker))) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
215 ;; Can't use save-restriction here; that doesn't work if we |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
216 ;; plan to modify text outside the original restriction. |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
217 (save-excursion |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
218 (widen) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
219 (goto-char (point-min)) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
220 (while (>= rmail-total-messages msgnum) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
221 (if (or (null function) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
222 (apply function (cons msgnum args))) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
223 (setq summary-msgs |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
224 (cons (cons msgnum (rmail-make-summary-line msgnum)) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
225 summary-msgs))) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
226 (setq msgnum (1+ msgnum))) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
227 (setq summary-msgs (nreverse summary-msgs))) |
f77de1e2b48b
(rmail-new-summary): Avoid unsafe save-restriction.
Karl Heuer <kwzh@gnu.org>
parents:
6726
diff
changeset
|
228 (narrow-to-region old-min old-max)) |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
229 ;; Temporarily, while summary buffer is unfinished, |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
230 ;; we "don't have" a summary. |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
231 (setq rmail-summary-buffer nil) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
232 (if rmail-enable-mime |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
233 (with-current-buffer rmail-view-buffer |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
234 (setq rmail-summary-buffer nil))) |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
235 (save-excursion |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
236 (let ((rbuf (current-buffer)) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
237 (vbuf rmail-view-buffer) |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
238 (total rmail-total-messages)) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
239 (set-buffer sumbuf) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
240 ;; Set up the summary buffer's contents. |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
241 (let ((buffer-read-only nil)) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
242 (erase-buffer) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
243 (while summary-msgs |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
244 (princ (cdr (car summary-msgs)) sumbuf) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
245 (setq summary-msgs (cdr summary-msgs))) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
246 (goto-char (point-min))) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
247 ;; Set up the rest of its state and local variables. |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
248 (setq buffer-read-only t) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
249 (rmail-summary-mode) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
250 (make-local-variable 'minor-mode-alist) |
15409
feee0ea235db
(rmail-new-summary): Fix typo; (concat ": " description) should be eval'ed.
Richard M. Stallman <rms@gnu.org>
parents:
14940
diff
changeset
|
251 (setq minor-mode-alist (list (list t (concat ": " description)))) |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
252 (setq rmail-buffer rbuf |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
253 rmail-view-buffer vbuf |
3198
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
254 rmail-summary-redo redo-form |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
255 rmail-total-messages total)))) |
18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
Richard M. Stallman <rms@gnu.org>
parents:
3100
diff
changeset
|
256 (setq rmail-summary-buffer sumbuf)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
257 ;; Now display the summary buffer and go to the right place in it. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
258 (or was-in-summary |
12911 | 259 (progn |
260 (if (and (one-window-p) | |
261 pop-up-windows (not pop-up-frames)) | |
262 ;; If there is just one window, put the summary on the top. | |
263 (progn | |
264 (split-window (selected-window) rmail-summary-window-size) | |
265 (select-window (next-window (frame-first-window))) | |
266 (pop-to-buffer sumbuf) | |
267 ;; If pop-to-buffer did not use that window, delete that | |
268 ;; window. (This can happen if it uses another frame.) | |
269 (if (not (eq sumbuf (window-buffer (frame-first-window)))) | |
270 (delete-other-windows))) | |
271 (pop-to-buffer sumbuf)) | |
272 (set-buffer rmail-buffer) | |
273 ;; This is how rmail makes the summary buffer reappear. | |
274 ;; We do this here to make the window the proper size. | |
275 (rmail-select-summary nil) | |
276 (set-buffer rmail-summary-buffer))) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
277 (rmail-summary-goto-msg mesg t t) |
12877
e5a2fab50a4b
(rmail-new-summary): Enable the Input/output menu.
Richard M. Stallman <rms@gnu.org>
parents:
12033
diff
changeset
|
278 (rmail-summary-construct-io-menu) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
279 (message "Computing summary lines...done"))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
280 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
281 ;; Low levels of generating a summary. |
130 | 282 |
283 (defun rmail-make-summary-line (msg) | |
284 (let ((line (or (aref rmail-summary-vector (1- msg)) | |
285 (progn | |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
286 (setq rmail-new-summary-line-count |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
287 (1+ rmail-new-summary-line-count)) |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
288 (if (zerop (% rmail-new-summary-line-count 10)) |
130 | 289 (message "Computing summary lines...%d" |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
290 rmail-new-summary-line-count)) |
130 | 291 (rmail-make-summary-line-1 msg))))) |
292 ;; Fix up the part of the summary that says "deleted" or "unseen". | |
39567 | 293 (aset line 5 |
130 | 294 (if (rmail-message-deleted-p msg) ?\D |
295 (if (= ?0 (char-after (+ 3 (rmail-msgbeg msg)))) | |
296 ?\- ?\ ))) | |
297 line)) | |
298 | |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
299 ;;;###autoload |
17631 | 300 (defcustom rmail-summary-line-decoder (function identity) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
301 "*Function to decode summary-line. |
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
302 |
17631 | 303 By default, `identity' is set." |
304 :type 'function | |
305 :group 'rmail-summary) | |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
306 |
130 | 307 (defun rmail-make-summary-line-1 (msg) |
308 (goto-char (rmail-msgbeg msg)) | |
309 (let* ((lim (save-excursion (forward-line 2) (point))) | |
310 pos | |
311 (labels | |
312 (progn | |
313 (forward-char 3) | |
314 (concat | |
315 ; (if (save-excursion (re-search-forward ",answered," lim t)) | |
316 ; "*" "") | |
317 ; (if (save-excursion (re-search-forward ",filed," lim t)) | |
318 ; "!" "") | |
319 (if (progn (search-forward ",,") (eolp)) | |
320 "" | |
321 (concat "{" | |
322 (buffer-substring (point) | |
52683
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
323 (progn (end-of-line) |
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
324 (backward-char) |
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
325 (if (looking-at ",") |
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
326 (point) |
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
327 (1+ (point))))) |
6b76116caa09
(rmail-make-summary-line-1): Change comma after last label to a space.
Richard M. Stallman <rms@gnu.org>
parents:
52401
diff
changeset
|
328 " } "))))) |
130 | 329 (line |
330 (progn | |
331 (forward-line 1) | |
332 (if (looking-at "Summary-line: ") | |
333 (progn | |
334 (goto-char (match-end 0)) | |
68399
38032f41ea5b
(rmail-make-summary-line-1): Don't set global binding of `line'.
Richard M. Stallman <rms@gnu.org>
parents:
68090
diff
changeset
|
335 (buffer-substring (point) |
38032f41ea5b
(rmail-make-summary-line-1): Don't set global binding of `line'.
Richard M. Stallman <rms@gnu.org>
parents:
68090
diff
changeset
|
336 (progn (forward-line 1) (point)))))))) |
130 | 337 ;; Obsolete status lines lacking a # should be flushed. |
338 (and line | |
339 (not (string-match "#" line)) | |
340 (progn | |
341 (delete-region (point) | |
342 (progn (forward-line -1) (point))) | |
343 (setq line nil))) | |
344 ;; If we didn't get a valid status line from the message, | |
345 ;; make a new one and put it in the message. | |
346 (or line | |
347 (let* ((case-fold-search t) | |
348 (next (rmail-msgend msg)) | |
349 (beg (if (progn (goto-char (rmail-msgbeg msg)) | |
350 (search-forward "\n*** EOOH ***\n" next t)) | |
351 (point) | |
352 (forward-line 1) | |
353 (point))) | |
354 (end (progn (search-forward "\n\n" nil t) (point)))) | |
355 (save-restriction | |
356 (narrow-to-region beg end) | |
357 (goto-char beg) | |
358 (setq line (rmail-make-basic-summary-line))) | |
359 (goto-char (rmail-msgbeg msg)) | |
360 (forward-line 2) | |
361 (insert "Summary-line: " line))) | |
362 (setq pos (string-match "#" line)) | |
363 (aset rmail-summary-vector (1- msg) | |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
364 (funcall rmail-summary-line-decoder |
39567 | 365 (concat (format "%5d " msg) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
366 (substring line 0 pos) |
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
367 labels |
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
368 (substring line (1+ pos))))) |
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
369 )) |
130 | 370 |
28487
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
371 ;;;###autoload |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
372 (defcustom rmail-user-mail-address-regexp nil |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
373 "*Regexp matching user mail addresses. |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
374 If non-nil, this variable is used to identify the correspondent |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
375 when receiving new mail. If it matches the address of the sender, |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
376 the recipient is taken as correspondent of a mail. |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
377 If nil \(default value\), your `user-login-name' and `user-mail-address' |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
378 are used to exclude yourself as correspondent. |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
379 |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
380 Usually you don't have to set this variable, except if you collect mails |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
381 sent by you under different user names. |
46130
d38c5a87f842
(rmail-user-mail-address-regexp): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
43481
diff
changeset
|
382 Then it should be a regexp matching your mail addresses. |
28487
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
383 |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
384 Setting this variable has an effect only before reading a mail." |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
385 :type '(choice (const :tag "None" nil) regexp) |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
386 :group 'rmail-retrieve |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
387 :version "21.1") |
653e53467c66
(rmail-user-mail-address-regexp): New option.
Gerd Moellmann <gerd@gnu.org>
parents:
28180
diff
changeset
|
388 |
130 | 389 (defun rmail-make-basic-summary-line () |
390 (goto-char (point-min)) | |
391 (concat (save-excursion | |
392 (if (not (re-search-forward "^Date:" nil t)) | |
393 " " | |
394 (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)" | |
395 (save-excursion (end-of-line) (point)) t) | |
396 (format "%2d-%3s" | |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
397 (string-to-number (buffer-substring |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
398 (match-beginning 2) |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
399 (match-end 2))) |
130 | 400 (buffer-substring |
401 (match-beginning 4) (match-end 4)))) | |
402 ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)" | |
403 (save-excursion (end-of-line) (point)) t) | |
404 (format "%2d-%3s" | |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
405 (string-to-number (buffer-substring |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
406 (match-beginning 4) |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
407 (match-end 4))) |
130 | 408 (buffer-substring |
409 (match-beginning 2) (match-end 2)))) | |
15582
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
410 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)" |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
411 (save-excursion (end-of-line) (point)) t) |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
412 (format "%2s%2s%2s" |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
413 (buffer-substring |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
414 (match-beginning 2) (match-end 2)) |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
415 (buffer-substring |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
416 (match-beginning 3) (match-end 3)) |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
417 (buffer-substring |
2066a7282df9
(rmail-make-basic-summary-line): Accept ISO 8601 dates as well.
Miles Bader <miles@gnu.org>
parents:
15509
diff
changeset
|
418 (match-beginning 4) (match-end 4)))) |
130 | 419 (t "??????")))) |
420 " " | |
421 (save-excursion | |
50502
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
422 (let* ((from (and (re-search-forward "^From:[ \t]*" nil t) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
423 (mail-strip-quoted-names |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
424 (buffer-substring |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
425 (1- (point)) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
426 ;; Get all the lines of the From field |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
427 ;; so that we get a whole comment if there is one, |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
428 ;; so that mail-strip-quoted-names can discard it. |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
429 (let ((opoint (point))) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
430 (while (progn (forward-line 1) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
431 (looking-at "[ \t]"))) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
432 ;; Back up over newline, then trailing spaces or tabs |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
433 (forward-char -1) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
434 (skip-chars-backward " \t") |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
435 (point)))))) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
436 len mch lo) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
437 (if (or (null from) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
438 (string-match |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
439 (or rmail-user-mail-address-regexp |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
440 (concat "^\\(" |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
441 (regexp-quote (user-login-name)) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
442 "\\($\\|@\\)\\|" |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
443 (regexp-quote |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
444 ;; Don't lose if run from init file |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
445 ;; where user-mail-address is not |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
446 ;; set yet. |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
447 (or user-mail-address |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
448 (concat (user-login-name) "@" |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
449 (or mail-host-address |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
450 (system-name))))) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
451 "\\>\\)")) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
452 from)) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
453 ;; No From field, or it's this user. |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
454 (save-excursion |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
455 (goto-char (point-min)) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
456 (if (not (re-search-forward "^To:[ \t]*" nil t)) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
457 nil |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
458 (setq from |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
459 (concat "to: " |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
460 (mail-strip-quoted-names |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
461 (buffer-substring |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
462 (point) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
463 (progn (end-of-line) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
464 (skip-chars-backward " \t") |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
465 (point))))))))) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
466 (if (null from) |
c94093d2e642
(rmail-make-basic-summary-line): If there's
Richard M. Stallman <rms@gnu.org>
parents:
49637
diff
changeset
|
467 " " |
130 | 468 (setq len (length from)) |
469 (setq mch (string-match "[@%]" from)) | |
470 (format "%25s" | |
471 (if (or (not mch) (<= len 25)) | |
472 (substring from (max 0 (- len 25))) | |
473 (substring from | |
7368
5e3d372d6016
(rmail-make-basic-summary-line): Show 14 chars before @ and 11 after.
Richard M. Stallman <rms@gnu.org>
parents:
7298
diff
changeset
|
474 (setq lo (cond ((< (- mch 14) 0) 0) |
5e3d372d6016
(rmail-make-basic-summary-line): Show 14 chars before @ and 11 after.
Richard M. Stallman <rms@gnu.org>
parents:
7298
diff
changeset
|
475 ((< len (+ mch 11)) |
130 | 476 (- len 25)) |
7368
5e3d372d6016
(rmail-make-basic-summary-line): Show 14 chars before @ and 11 after.
Richard M. Stallman <rms@gnu.org>
parents:
7298
diff
changeset
|
477 (t (- mch 14)))) |
130 | 478 (min len (+ lo 25)))))))) |
16389
30e3d4ddca44
(rmail-summary-line-count-flag): Renamed from rmail-summary-line-count-p.
Richard M. Stallman <rms@gnu.org>
parents:
16388
diff
changeset
|
479 (if rmail-summary-line-count-flag |
16388
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
480 (save-excursion |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
481 (save-restriction |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
482 (widen) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
483 (let ((beg (rmail-msgbeg msgnum)) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
484 (end (rmail-msgend msgnum)) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
485 lines) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
486 (save-excursion |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
487 (goto-char beg) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
488 ;; Count only lines in the reformatted header, |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
489 ;; if we have reformatted it. |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
490 (search-forward "\n*** EOOH ***\n" end t) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
491 (setq lines (count-lines (point) end))) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
492 (format (cond |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
493 ((<= lines 9) " [%d]") |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
494 ((<= lines 99) " [%d]") |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
495 ((<= lines 999) " [%3d]") |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
496 (t "[%d]")) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
497 lines)))) |
9f29d4bcdc98
(rmail-summary-line-count-p): New variable.
Richard M. Stallman <rms@gnu.org>
parents:
16344
diff
changeset
|
498 " ") |
14681
27bbf45f3393
(rmail-make-basic-summary-line): Fix previous change.
Erik Naggum <erik@naggum.no>
parents:
14675
diff
changeset
|
499 " #" ;The # is part of the format. |
130 | 500 (if (re-search-forward "^Subject:" nil t) |
501 (progn (skip-chars-forward " \t") | |
502 (buffer-substring (point) | |
503 (progn (end-of-line) | |
504 (point)))) | |
505 (re-search-forward "[\n][\n]+" nil t) | |
506 (buffer-substring (point) (progn (end-of-line) (point)))) | |
507 "\n")) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
508 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
509 ;; Simple motion in a summary buffer. |
130 | 510 |
511 (defun rmail-summary-next-all (&optional number) | |
512 (interactive "p") | |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
513 (forward-line (if number number 1)) |
9540
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
514 ;; It doesn't look nice to move forward past the last message line. |
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
515 (and (eobp) (> number 0) |
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
516 (forward-line -1)) |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
517 (display-buffer rmail-buffer)) |
130 | 518 |
519 (defun rmail-summary-previous-all (&optional number) | |
520 (interactive "p") | |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
521 (forward-line (- (if number number 1))) |
9540
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
522 ;; It doesn't look nice to move forward past the last message line. |
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
523 (and (eobp) (< number 0) |
cde03222210e
(rmail-summary-previous-all)
Richard M. Stallman <rms@gnu.org>
parents:
9482
diff
changeset
|
524 (forward-line -1)) |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
525 (display-buffer rmail-buffer)) |
130 | 526 |
527 (defun rmail-summary-next-msg (&optional number) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
528 "Display next non-deleted msg from rmail file. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
529 With optional prefix argument NUMBER, moves forward this number of non-deleted |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
530 messages, or backward if NUMBER is negative." |
130 | 531 (interactive "p") |
532 (forward-line 0) | |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
533 (and (> number 0) (end-of-line)) |
130 | 534 (let ((count (if (< number 0) (- number) number)) |
535 (search (if (> number 0) 're-search-forward 're-search-backward)) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
536 (non-del-msg-found nil)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
537 (while (and (> count 0) (setq non-del-msg-found |
69403
ecd9a20a44b0
(rmail-summary-next-msg): Skip deleted messages, where "D" is the
Eli Zaretskii <eliz@gnu.org>
parents:
68648
diff
changeset
|
538 (or (funcall search "^.....[^D]" nil t) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
539 non-del-msg-found))) |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
540 (setq count (1- count)))) |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
541 (beginning-of-line) |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
542 (display-buffer rmail-view-buffer)) |
130 | 543 |
544 (defun rmail-summary-previous-msg (&optional number) | |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
545 "Display previous non-deleted msg from rmail file. |
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
546 With optional prefix argument NUMBER, moves backward this number of |
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
547 non-deleted messages." |
130 | 548 (interactive "p") |
549 (rmail-summary-next-msg (- (if number number 1)))) | |
550 | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
551 (defun rmail-summary-next-labeled-message (n labels) |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
552 "Show next message with LABELS. Defaults to last labels used. |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
553 With prefix argument N moves forward N messages with these labels." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
554 (interactive "p\nsMove to next msg with labels: ") |
15658
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
555 (let (msg) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
556 (save-excursion |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
557 (set-buffer rmail-buffer) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
558 (rmail-next-labeled-message n labels) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
559 (setq msg rmail-current-message)) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
560 (rmail-summary-goto-msg msg))) |
130 | 561 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
562 (defun rmail-summary-previous-labeled-message (n labels) |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
563 "Show previous message with LABELS. Defaults to last labels used. |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
564 With prefix argument N moves backward N messages with these labels." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
565 (interactive "p\nsMove to previous msg with labels: ") |
15658
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
566 (let (msg) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
567 (save-excursion |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
568 (set-buffer rmail-buffer) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
569 (rmail-previous-labeled-message n labels) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
570 (setq msg rmail-current-message)) |
996e272e9192
(rmail-summary-next-labeled-message)
Karl Heuer <kwzh@gnu.org>
parents:
15645
diff
changeset
|
571 (rmail-summary-goto-msg msg))) |
10663
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
572 |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
573 (defun rmail-summary-next-same-subject (n) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
574 "Go to the next message in the summary having the same subject. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
575 With prefix argument N, do this N times. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
576 If N is negative, go backwards." |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
577 (interactive "p") |
68090
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
578 (let ((forward (> n 0)) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
579 search-regexp i found) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
580 (with-current-buffer rmail-buffer |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
581 (setq search-regexp (rmail-current-subject-regexp) |
9b341a563aea
(rmail-summary-by-topic): Use
Alex Schroeder <alex@gnu.org>
parents:
65680
diff
changeset
|
582 i rmail-current-message)) |
10663
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
583 (save-excursion |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
584 (while (and (/= n 0) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
585 (if forward |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
586 (not (eobp)) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
587 (not (bobp)))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
588 (let (done) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
589 (while (and (not done) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
590 (if forward |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
591 (not (eobp)) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
592 (not (bobp)))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
593 ;; Advance thru summary. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
594 (forward-line (if forward 1 -1)) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
595 ;; Get msg number of this line. |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
596 (setq i (string-to-number |
10663
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
597 (buffer-substring (point) |
39567 | 598 (min (point-max) (+ 6 (point)))))) |
10663
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
599 ;; See if that msg has desired subject. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
600 (save-excursion |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
601 (set-buffer rmail-buffer) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
602 (save-restriction |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
603 (widen) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
604 (goto-char (rmail-msgbeg i)) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
605 (search-forward "\n*** EOOH ***\n") |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
606 (let ((beg (point)) end) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
607 (search-forward "\n\n") |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
608 (setq end (point)) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
609 (goto-char beg) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
610 (setq done (re-search-forward search-regexp end t)))))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
611 (if done (setq found i))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
612 (setq n (if forward (1- n) (1+ n))))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
613 (if found |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
614 (rmail-summary-goto-msg found) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
615 (error "No %s message with same subject" |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
616 (if forward "following" "previous"))))) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
617 |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
618 (defun rmail-summary-previous-same-subject (n) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
619 "Go to the previous message in the summary having the same subject. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
620 With prefix argument N, do this N times. |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
621 If N is negative, go forwards instead." |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
622 (interactive "p") |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
623 (rmail-summary-next-same-subject (- n))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
624 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
625 ;; Delete and undelete summary commands. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
626 |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
627 (defun rmail-summary-delete-forward (&optional count) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
628 "Delete this message and move to next nondeleted one. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
629 Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
630 A prefix argument serves as a repeat count; |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
631 a negative argument means to delete and move backward." |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
632 (interactive "p") |
17867
4b87104dcbc7
(rmail-summary-delete-forward): Force the
Richard M. Stallman <rms@gnu.org>
parents:
17631
diff
changeset
|
633 (unless (numberp count) (setq count 1)) |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
634 (let (end del-msg |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
635 (backward (< count 0))) |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
636 (while (/= count 0) |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
637 (rmail-summary-goto-msg) |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
638 (with-current-buffer rmail-buffer |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
639 (rmail-delete-message) |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
640 (setq del-msg rmail-current-message)) |
5370
45ed020959f1
(rmail-summary-delete-forward): Move to next or prev msg
Richard M. Stallman <rms@gnu.org>
parents:
5275
diff
changeset
|
641 (rmail-summary-mark-deleted del-msg) |
45ed020959f1
(rmail-summary-delete-forward): Move to next or prev msg
Richard M. Stallman <rms@gnu.org>
parents:
5275
diff
changeset
|
642 (while (and (not (if backward (bobp) (eobp))) |
5514
8112b5b2651b
(rmail-summary-delete-forward): Fix regexp
Richard M. Stallman <rms@gnu.org>
parents:
5507
diff
changeset
|
643 (save-excursion (beginning-of-line) |
9151
02bee4d2de9a
(rmail-summary-delete-forward): Regexp for recognizing deleted message
Richard M. Stallman <rms@gnu.org>
parents:
8997
diff
changeset
|
644 (looking-at " *[0-9]+D"))) |
9545
0773b7048206
(rmail-summary-delete-forward): Don't move fwd to eob.
Richard M. Stallman <rms@gnu.org>
parents:
9540
diff
changeset
|
645 (forward-line (if backward -1 1))) |
0773b7048206
(rmail-summary-delete-forward): Don't move fwd to eob.
Richard M. Stallman <rms@gnu.org>
parents:
9540
diff
changeset
|
646 ;; It looks ugly to move to the empty line at end of buffer. |
0773b7048206
(rmail-summary-delete-forward): Don't move fwd to eob.
Richard M. Stallman <rms@gnu.org>
parents:
9540
diff
changeset
|
647 (and (eobp) (not backward) |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
648 (forward-line -1)) |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
649 (setq count |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
650 (if (> count 0) (1- count) (1+ count)))))) |
130 | 651 |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
652 (defun rmail-summary-delete-backward (&optional count) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
653 "Delete this message and move to previous nondeleted one. |
17484
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
654 Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
655 A prefix argument serves as a repeat count; |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
656 a negative argument means to delete and move forward." |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
657 (interactive "p") |
3303fa112347
(rmail-summary-delete-forward): Argument is now a repeat count.
Richard M. Stallman <rms@gnu.org>
parents:
17096
diff
changeset
|
658 (rmail-summary-delete-forward (- count))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
659 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
660 (defun rmail-summary-mark-deleted (&optional n undel) |
14293
87b4bd8fea26
(rmail-make-basic-summary-line): Include msg line number.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
661 ;; Since third arg is t, this only alters the summary, not the Rmail buf. |
3100
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
662 (and n (rmail-summary-goto-msg n t t)) |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
663 (or (eobp) |
10489
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
664 (not (overlay-get rmail-summary-overlay 'face)) |
3100
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
665 (let ((buffer-read-only nil)) |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
666 (skip-chars-forward " ") |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
667 (skip-chars-forward "[0-9]") |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
668 (if undel |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
669 (if (looking-at "D") |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
670 (progn (delete-char 1) (insert " "))) |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
671 (delete-char 1) |
eb6ae6faff24
(rmail-summary-mark-deleted): Check for end of buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2233
diff
changeset
|
672 (insert "D")))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
673 (beginning-of-line)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
674 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
675 (defun rmail-summary-mark-undeleted (n) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
676 (rmail-summary-mark-deleted n t)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
677 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
678 (defun rmail-summary-deleted-p (&optional n) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
679 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
680 (and n (rmail-summary-goto-msg n nil t)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
681 (skip-chars-forward " ") |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
682 (skip-chars-forward "[0-9]") |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
683 (looking-at "D"))) |
130 | 684 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
685 (defun rmail-summary-undelete (&optional arg) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
686 "Undelete current message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
687 Optional prefix ARG means undelete ARG previous messages." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
688 (interactive "p") |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
689 (if (/= arg 1) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
690 (rmail-summary-undelete-many arg) |
5678
3824222fed2e
(rmail-summary-undelete): If we don't undelete anything, don't move point.
Richard M. Stallman <rms@gnu.org>
parents:
5514
diff
changeset
|
691 (let ((buffer-read-only nil) |
3824222fed2e
(rmail-summary-undelete): If we don't undelete anything, don't move point.
Richard M. Stallman <rms@gnu.org>
parents:
5514
diff
changeset
|
692 (opoint (point))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
693 (end-of-line) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
694 (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
695 (replace-match "\\1 ") |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
696 (rmail-summary-goto-msg) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
697 (if rmail-enable-mime |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
698 (set-buffer rmail-buffer) |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
699 (pop-to-buffer rmail-buffer)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
700 (and (rmail-message-deleted-p rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
701 (rmail-undelete-previous-message)) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
702 (if rmail-enable-mime |
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
703 (pop-to-buffer rmail-view-buffer)) |
5678
3824222fed2e
(rmail-summary-undelete): If we don't undelete anything, don't move point.
Richard M. Stallman <rms@gnu.org>
parents:
5514
diff
changeset
|
704 (pop-to-buffer rmail-summary-buffer)) |
3824222fed2e
(rmail-summary-undelete): If we don't undelete anything, don't move point.
Richard M. Stallman <rms@gnu.org>
parents:
5514
diff
changeset
|
705 (t (goto-char opoint)))))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
706 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
707 (defun rmail-summary-undelete-many (&optional n) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
708 "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
709 (interactive "P") |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
710 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
711 (set-buffer rmail-buffer) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
712 (let* ((init-msg (if n rmail-current-message rmail-total-messages)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
713 (rmail-current-message init-msg) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
714 (n (or n rmail-total-messages)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
715 (msgs-undeled 0)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
716 (while (and (> rmail-current-message 0) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
717 (< msgs-undeled n)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
718 (if (rmail-message-deleted-p rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
719 (progn (rmail-set-attribute "deleted" nil) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
720 (setq msgs-undeled (1+ msgs-undeled)))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
721 (setq rmail-current-message (1- rmail-current-message))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
722 (set-buffer rmail-summary-buffer) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
723 (setq rmail-current-message init-msg msgs-undeled 0) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
724 (while (and (> rmail-current-message 0) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
725 (< msgs-undeled n)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
726 (if (rmail-summary-deleted-p rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
727 (progn (rmail-summary-mark-undeleted rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
728 (setq msgs-undeled (1+ msgs-undeled)))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
729 (setq rmail-current-message (1- rmail-current-message)))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
730 (rmail-summary-goto-msg))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
731 |
130 | 732 ;; Rmail Summary mode is suitable only for specially formatted data. |
733 (put 'rmail-summary-mode 'mode-class 'special) | |
734 | |
735 (defun rmail-summary-mode () | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
736 "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary]. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
737 As commands are issued in the summary buffer, they are applied to the |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
738 corresponding mail messages in the rmail buffer. |
130 | 739 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
740 All normal editing commands are turned off. |
5121
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
741 Instead, nearly all the Rmail mode commands are available, |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
742 though many of them move only among the messages in the summary. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
743 |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
744 These additional commands exist: |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
745 |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
746 \\[rmail-summary-undelete-many] Undelete all or prefix arg deleted messages. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
747 \\[rmail-summary-wipe] Delete the summary and go to the Rmail buffer. |
130 | 748 |
5121
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
749 Commands for sorting the summary: |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
750 |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
751 \\[rmail-summary-sort-by-date] Sort by date. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
752 \\[rmail-summary-sort-by-subject] Sort by subject. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
753 \\[rmail-summary-sort-by-author] Sort by author. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
754 \\[rmail-summary-sort-by-recipient] Sort by recipient. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
755 \\[rmail-summary-sort-by-correspondent] Sort by correspondent. |
6717
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
756 \\[rmail-summary-sort-by-lines] Sort by lines. |
37590
003e23c611eb
(rmail-summary-sort-by-labels): Renamed
Gerd Moellmann <gerd@gnu.org>
parents:
36746
diff
changeset
|
757 \\[rmail-summary-sort-by-labels] Sort by labels." |
130 | 758 (interactive) |
759 (kill-all-local-variables) | |
760 (setq major-mode 'rmail-summary-mode) | |
761 (setq mode-name "RMAIL Summary") | |
762 (setq truncate-lines t) | |
763 (setq buffer-read-only t) | |
764 (set-syntax-table text-mode-syntax-table) | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
765 (make-local-variable 'rmail-buffer) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
766 (make-local-variable 'rmail-view-buffer) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
767 (make-local-variable 'rmail-total-messages) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
768 (make-local-variable 'rmail-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
769 (setq rmail-current-message nil) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
770 (make-local-variable 'rmail-summary-redo) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
771 (setq rmail-summary-redo nil) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
772 (make-local-variable 'revert-buffer-function) |
9482
7330d8566c13
* rmailsum.el: (rmail-summary-mode): Set font-lock-defaults.
Simon Marshall <simon@gnu.org>
parents:
9448
diff
changeset
|
773 (make-local-variable 'font-lock-defaults) |
7330d8566c13
* rmailsum.el: (rmail-summary-mode): Set font-lock-defaults.
Simon Marshall <simon@gnu.org>
parents:
9448
diff
changeset
|
774 (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) |
6724
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
775 (rmail-summary-enable) |
62764
4bce01bf6006
(rmail-summary-mode): Use run-mode-hooks.
Lute Kamstra <lute@gnu.org>
parents:
62402
diff
changeset
|
776 (run-mode-hooks 'rmail-summary-mode-hook)) |
130 | 777 |
6724
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
778 ;; Summary features need to be disabled during edit mode. |
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
779 (defun rmail-summary-disable () |
6726 | 780 (use-local-map text-mode-map) |
14362
55ffd73831cb
Use make-local-hook for post-command-hook
Simon Marshall <simon@gnu.org>
parents:
14293
diff
changeset
|
781 (remove-hook 'post-command-hook 'rmail-summary-rmail-update t) |
6726 | 782 (setq revert-buffer-function nil)) |
6724
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
783 |
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
784 (defun rmail-summary-enable () |
6726 | 785 (use-local-map rmail-summary-mode-map) |
14362
55ffd73831cb
Use make-local-hook for post-command-hook
Simon Marshall <simon@gnu.org>
parents:
14293
diff
changeset
|
786 (add-hook 'post-command-hook 'rmail-summary-rmail-update nil t) |
6726 | 787 (setq revert-buffer-function 'rmail-update-summary)) |
6724
6728ad7f85e9
(rmail-summary-disable): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6717
diff
changeset
|
788 |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
789 (defvar rmail-summary-put-back-unseen nil |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
790 "Used for communicating between calls to `rmail-summary-rmail-update'. |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
791 If it moves to a message within an Incremental Search, and removes |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
792 the `unseen' attribute from that message, it sets this flag |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
793 so that if the next motion between messages is in the same Incremental |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
794 Search, the `unseen' attribute is restored.") |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
795 |
2164
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
796 ;; Show in Rmail the message described by the summary line that point is on, |
6e276a32aef1
(rmail-summary-next-msg): Call display-buffer.
Richard M. Stallman <rms@gnu.org>
parents:
2077
diff
changeset
|
797 ;; but only if the Rmail buffer is already visible. |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
798 ;; This is a post-command-hook in summary buffers. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
799 (defun rmail-summary-rmail-update () |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
800 (let (buffer-read-only) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
801 (save-excursion |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
802 ;; If at end of buffer, pretend we are on the last text line. |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
803 (if (eobp) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
804 (forward-line -1)) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
805 (beginning-of-line) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
806 (skip-chars-forward " ") |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
807 (let ((msg-num (string-to-number (buffer-substring |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
808 (point) |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
809 (progn (skip-chars-forward "0-9") |
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
810 (point)))))) |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
811 ;; Always leave `unseen' removed |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
812 ;; if we get out of isearch mode. |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
813 ;; Don't let a subsequent isearch restore that `unseen'. |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
814 (if (not isearch-mode) |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
815 (setq rmail-summary-put-back-unseen nil)) |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
816 |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
817 (or (eq rmail-current-message msg-num) |
20081
cf2733572fa7
(rmail-summary-rmail-update): When looking for
Karl Heuer <kwzh@gnu.org>
parents:
19570
diff
changeset
|
818 (let ((window (get-buffer-window rmail-view-buffer t)) |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
819 (owin (selected-window))) |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
820 (if isearch-mode |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
821 (save-excursion |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
822 (set-buffer rmail-buffer) |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
823 ;; If we first saw the previous message in this search, |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
824 ;; and we have gone to a different message while searching, |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
825 ;; put back `unseen' on the former one. |
22352
312d6d72be14
(rmail-summary-rmail-update): Set message
Karl Heuer <kwzh@gnu.org>
parents:
22203
diff
changeset
|
826 (if rmail-summary-put-back-unseen |
22546
8322a6923140
(rmail-summary-rmail-update): Fix indentation.
Karl Heuer <kwzh@gnu.org>
parents:
22352
diff
changeset
|
827 (rmail-set-attribute "unseen" t |
8322a6923140
(rmail-summary-rmail-update): Fix indentation.
Karl Heuer <kwzh@gnu.org>
parents:
22352
diff
changeset
|
828 rmail-current-message)) |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
829 ;; Arrange to do that later, for the new current message, |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
830 ;; if it still has `unseen'. |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
831 (setq rmail-summary-put-back-unseen |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
832 (rmail-message-labels-p msg-num ", ?\\(unseen\\),"))) |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
833 (setq rmail-summary-put-back-unseen nil)) |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
834 |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
835 ;; Go to the desired message. |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
836 (setq rmail-current-message msg-num) |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
837 |
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
838 ;; Update the summary to show the message has been seen. |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
839 (if (= (following-char) ?-) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
840 (progn |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
841 (delete-char 1) |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
842 (insert " "))) |
16242
fa3885bdc49c
(rmail-summary-next-same-subject): Don't set
Richard M. Stallman <rms@gnu.org>
parents:
15658
diff
changeset
|
843 |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
844 (if window |
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
845 ;; Using save-window-excursion would cause the new value |
3461
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
846 ;; of point to get lost. |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
847 (unwind-protect |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
848 (progn |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
849 (select-window window) |
9432
a8cd4563a8ae
(rmail-summary-rmail-update): Pass new arg to rmail-show-message.
Richard M. Stallman <rms@gnu.org>
parents:
9379
diff
changeset
|
850 (rmail-show-message msg-num t)) |
6961
666f11765323
(rmail-summary-rmail-update): Update rmail buffer even if it isn't displayed.
Karl Heuer <kwzh@gnu.org>
parents:
6762
diff
changeset
|
851 (select-window owin)) |
8635
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
852 (if (buffer-name rmail-buffer) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
853 (save-excursion |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
854 (set-buffer rmail-buffer) |
10489
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
855 (rmail-show-message msg-num t)))))) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
856 (rmail-summary-update-highlight nil))))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
857 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
858 (if rmail-summary-mode-map |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
859 nil |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
860 (setq rmail-summary-mode-map (make-keymap)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
861 (suppress-keymap rmail-summary-mode-map) |
19111
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
862 |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
863 (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
864 (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label) |
15488
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
865 (define-key rmail-summary-mode-map "b" 'rmail-summary-bury) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
866 (define-key rmail-summary-mode-map "c" 'rmail-summary-continue) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
867 (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
868 (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
869 (define-key rmail-summary-mode-map "e" 'rmail-summary-edit-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
870 (define-key rmail-summary-mode-map "f" 'rmail-summary-forward) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
871 (define-key rmail-summary-mode-map "g" 'rmail-summary-get-new-mail) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
872 (define-key rmail-summary-mode-map "h" 'rmail-summary) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
873 (define-key rmail-summary-mode-map "i" 'rmail-summary-input) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
874 (define-key rmail-summary-mode-map "j" 'rmail-summary-goto-msg) |
26809
db949b28b6b4
(rmail-summary-mode-map): Bind RET to rmail-summary-goto-msg.
Gerd Moellmann <gerd@gnu.org>
parents:
24849
diff
changeset
|
875 (define-key rmail-summary-mode-map "\C-m" 'rmail-summary-goto-msg) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
876 (define-key rmail-summary-mode-map "k" 'rmail-summary-kill-label) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
877 (define-key rmail-summary-mode-map "l" 'rmail-summary-by-labels) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
878 (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
879 (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
880 (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
881 (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
882 (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
883 (define-key rmail-summary-mode-map "m" 'rmail-summary-mail) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
884 (define-key rmail-summary-mode-map "\M-m" 'rmail-summary-retry-failure) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
885 (define-key rmail-summary-mode-map "n" 'rmail-summary-next-msg) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
886 (define-key rmail-summary-mode-map "\en" 'rmail-summary-next-all) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
887 (define-key rmail-summary-mode-map "\e\C-n" 'rmail-summary-next-labeled-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
888 (define-key rmail-summary-mode-map "o" 'rmail-summary-output-to-rmail-file) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
889 (define-key rmail-summary-mode-map "\C-o" 'rmail-summary-output) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
890 (define-key rmail-summary-mode-map "p" 'rmail-summary-previous-msg) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
891 (define-key rmail-summary-mode-map "\ep" 'rmail-summary-previous-all) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
892 (define-key rmail-summary-mode-map "\e\C-p" 'rmail-summary-previous-labeled-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
893 (define-key rmail-summary-mode-map "q" 'rmail-summary-quit) |
22203
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
894 (define-key rmail-summary-mode-map "Q" 'rmail-summary-wipe) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
895 (define-key rmail-summary-mode-map "r" 'rmail-summary-reply) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
896 (define-key rmail-summary-mode-map "s" 'rmail-summary-expunge-and-save) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
897 (define-key rmail-summary-mode-map "\es" 'rmail-summary-search) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
898 (define-key rmail-summary-mode-map "t" 'rmail-summary-toggle-header) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
899 (define-key rmail-summary-mode-map "u" 'rmail-summary-undelete) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
900 (define-key rmail-summary-mode-map "\M-u" 'rmail-summary-undelete-many) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
901 (define-key rmail-summary-mode-map "x" 'rmail-summary-expunge) |
22203
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
902 (define-key rmail-summary-mode-map "w" 'rmail-summary-output-body) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
903 (define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message) |
64929
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
904 (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
905 (define-key rmail-summary-mode-map "<" 'rmail-summary-first-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
906 (define-key rmail-summary-mode-map ">" 'rmail-summary-last-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
907 (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
908 (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
909 (define-key rmail-summary-mode-map "?" 'describe-mode) |
10663
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
910 (define-key rmail-summary-mode-map "\C-c\C-n" 'rmail-summary-next-same-subject) |
b0bf7d40a75d
(rmail-summary-next-same-subject): New command.
Richard M. Stallman <rms@gnu.org>
parents:
10489
diff
changeset
|
911 (define-key rmail-summary-mode-map "\C-c\C-p" 'rmail-summary-previous-same-subject) |
3879
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
912 (define-key rmail-summary-mode-map "\C-c\C-s\C-d" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
913 'rmail-summary-sort-by-date) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
914 (define-key rmail-summary-mode-map "\C-c\C-s\C-s" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
915 'rmail-summary-sort-by-subject) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
916 (define-key rmail-summary-mode-map "\C-c\C-s\C-a" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
917 'rmail-summary-sort-by-author) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
918 (define-key rmail-summary-mode-map "\C-c\C-s\C-r" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
919 'rmail-summary-sort-by-recipient) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
920 (define-key rmail-summary-mode-map "\C-c\C-s\C-c" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
921 'rmail-summary-sort-by-correspondent) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
922 (define-key rmail-summary-mode-map "\C-c\C-s\C-l" |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
923 'rmail-summary-sort-by-lines) |
6717
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
924 (define-key rmail-summary-mode-map "\C-c\C-s\C-k" |
37590
003e23c611eb
(rmail-summary-sort-by-labels): Renamed
Gerd Moellmann <gerd@gnu.org>
parents:
36746
diff
changeset
|
925 'rmail-summary-sort-by-labels) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
926 ) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
927 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
928 ;;; Menu bar bindings. |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
929 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
930 (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
931 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
932 (define-key rmail-summary-mode-map [menu-bar classify] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
933 (cons "Classify" (make-sparse-keymap "Classify"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
934 |
8635
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
935 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
936 '("Output (Rmail Menu)..." . rmail-summary-output-menu)) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
937 |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
938 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
12033
f7638ab47de7
Fix capitalization in menu bar.
Karl Heuer <kwzh@gnu.org>
parents:
11519
diff
changeset
|
939 '("Input Rmail File (menu)..." . rmail-input-menu)) |
8635
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
940 |
8911
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
941 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
942 '(nil)) |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
943 |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
944 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
945 '(nil)) |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
946 |
22203
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
947 (define-key rmail-summary-mode-map [menu-bar classify output-body] |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
948 '("Output (body)..." . rmail-summary-output-body)) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
949 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
950 (define-key rmail-summary-mode-map [menu-bar classify output-inbox] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
951 '("Output (inbox)..." . rmail-summary-output)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
952 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
953 (define-key rmail-summary-mode-map [menu-bar classify output] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
954 '("Output (Rmail)..." . rmail-summary-output-to-rmail-file)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
955 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
956 (define-key rmail-summary-mode-map [menu-bar classify kill-label] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
957 '("Kill Label..." . rmail-summary-kill-label)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
958 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
959 (define-key rmail-summary-mode-map [menu-bar classify add-label] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
960 '("Add Label..." . rmail-summary-add-label)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
961 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
962 (define-key rmail-summary-mode-map [menu-bar summary] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
963 (cons "Summary" (make-sparse-keymap "Summary"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
964 |
15509
015c38409ce5
(rmail-summary-mode-map): Add rmail-summary-by-senders.
Richard M. Stallman <rms@gnu.org>
parents:
15488
diff
changeset
|
965 (define-key rmail-summary-mode-map [menu-bar summary senders] |
015c38409ce5
(rmail-summary-mode-map): Add rmail-summary-by-senders.
Richard M. Stallman <rms@gnu.org>
parents:
15488
diff
changeset
|
966 '("By Senders..." . rmail-summary-by-senders)) |
015c38409ce5
(rmail-summary-mode-map): Add rmail-summary-by-senders.
Richard M. Stallman <rms@gnu.org>
parents:
15488
diff
changeset
|
967 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
968 (define-key rmail-summary-mode-map [menu-bar summary labels] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
969 '("By Labels..." . rmail-summary-by-labels)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
970 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
971 (define-key rmail-summary-mode-map [menu-bar summary recipients] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
972 '("By Recipients..." . rmail-summary-by-recipients)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
973 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
974 (define-key rmail-summary-mode-map [menu-bar summary topic] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
975 '("By Topic..." . rmail-summary-by-topic)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
976 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
977 (define-key rmail-summary-mode-map [menu-bar summary regexp] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
978 '("By Regexp..." . rmail-summary-by-regexp)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
979 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
980 (define-key rmail-summary-mode-map [menu-bar summary all] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
981 '("All" . rmail-summary)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
982 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
983 (define-key rmail-summary-mode-map [menu-bar mail] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
984 (cons "Mail" (make-sparse-keymap "Mail"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
985 |
8419
711098a43695
(rmail-summary-mode-map): Fix the Get New Mail entry.
Richard M. Stallman <rms@gnu.org>
parents:
8392
diff
changeset
|
986 (define-key rmail-summary-mode-map [menu-bar mail rmail-summary-get-new-mail] |
8392
f0e1008534c4
(rmail-summary-mode-map): Move new Re-send menu item to right place.
Richard M. Stallman <rms@gnu.org>
parents:
8385
diff
changeset
|
987 '("Get New Mail" . rmail-summary-get-new-mail)) |
f0e1008534c4
(rmail-summary-mode-map): Move new Re-send menu item to right place.
Richard M. Stallman <rms@gnu.org>
parents:
8385
diff
changeset
|
988 |
8421
6f13961ee63e
(rmail-summary-mode-map): Fix typo.
Richard M. Stallman <rms@gnu.org>
parents:
8419
diff
changeset
|
989 (define-key rmail-summary-mode-map [menu-bar mail lambda] |
8392
f0e1008534c4
(rmail-summary-mode-map): Move new Re-send menu item to right place.
Richard M. Stallman <rms@gnu.org>
parents:
8385
diff
changeset
|
990 '("----")) |
8379
466112a5ae5a
(rmail-summary-mode-map): Add Re-send menu item.
Richard M. Stallman <rms@gnu.org>
parents:
7421
diff
changeset
|
991 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
992 (define-key rmail-summary-mode-map [menu-bar mail continue] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
993 '("Continue" . rmail-summary-continue)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
994 |
8392
f0e1008534c4
(rmail-summary-mode-map): Move new Re-send menu item to right place.
Richard M. Stallman <rms@gnu.org>
parents:
8385
diff
changeset
|
995 (define-key rmail-summary-mode-map [menu-bar mail resend] |
9448
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
996 '("Re-send..." . rmail-summary-resend)) |
8392
f0e1008534c4
(rmail-summary-mode-map): Move new Re-send menu item to right place.
Richard M. Stallman <rms@gnu.org>
parents:
8385
diff
changeset
|
997 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
998 (define-key rmail-summary-mode-map [menu-bar mail forward] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
999 '("Forward" . rmail-summary-forward)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1000 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1001 (define-key rmail-summary-mode-map [menu-bar mail retry] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1002 '("Retry" . rmail-summary-retry-failure)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1003 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1004 (define-key rmail-summary-mode-map [menu-bar mail reply] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1005 '("Reply" . rmail-summary-reply)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1006 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1007 (define-key rmail-summary-mode-map [menu-bar mail mail] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1008 '("Mail" . rmail-summary-mail)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1009 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1010 (define-key rmail-summary-mode-map [menu-bar delete] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1011 (cons "Delete" (make-sparse-keymap "Delete"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1012 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1013 (define-key rmail-summary-mode-map [menu-bar delete expunge/save] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1014 '("Expunge/Save" . rmail-summary-expunge-and-save)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1015 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1016 (define-key rmail-summary-mode-map [menu-bar delete expunge] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1017 '("Expunge" . rmail-summary-expunge)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1018 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1019 (define-key rmail-summary-mode-map [menu-bar delete undelete] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1020 '("Undelete" . rmail-summary-undelete)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1021 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1022 (define-key rmail-summary-mode-map [menu-bar delete delete] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1023 '("Delete" . rmail-summary-delete-forward)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1024 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1025 (define-key rmail-summary-mode-map [menu-bar move] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1026 (cons "Move" (make-sparse-keymap "Move"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1027 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1028 (define-key rmail-summary-mode-map [menu-bar move search-back] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
1029 '("Search Back..." . rmail-summary-search-backward)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1030 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1031 (define-key rmail-summary-mode-map [menu-bar move search] |
8422
bfdf6de7fddb
(rmail-summary-mode-map): Add `...' where appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
8421
diff
changeset
|
1032 '("Search..." . rmail-summary-search)) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1033 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1034 (define-key rmail-summary-mode-map [menu-bar move previous] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1035 '("Previous Nondeleted" . rmail-summary-previous-msg)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1036 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1037 (define-key rmail-summary-mode-map [menu-bar move next] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1038 '("Next Nondeleted" . rmail-summary-next-msg)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1039 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1040 (define-key rmail-summary-mode-map [menu-bar move last] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1041 '("Last" . rmail-summary-last-message)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1042 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1043 (define-key rmail-summary-mode-map [menu-bar move first] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1044 '("First" . rmail-summary-first-message)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1045 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1046 (define-key rmail-summary-mode-map [menu-bar move previous] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1047 '("Previous" . rmail-summary-previous-all)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1048 |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1049 (define-key rmail-summary-mode-map [menu-bar move next] |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1050 '("Next" . rmail-summary-next-all)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1051 |
19111
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1052 (defun rmail-summary-mouse-goto-message (event) |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1053 "Select the message whose summary line you click on." |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1054 (interactive "@e") |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1055 (goto-char (posn-point (event-end event))) |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1056 (rmail-summary-goto-msg)) |
14293
87b4bd8fea26
(rmail-make-basic-summary-line): Include msg line number.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
1057 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1058 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) |
19111
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1059 "Go to message N in the summary buffer and the Rmail buffer. |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1060 If N is nil, use the message corresponding to point in the summary |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1061 and move to that message in the Rmail buffer. |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1062 |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1063 If NOWARN, don't say anything if N is out of range. |
e561070ee48c
(rmail-summary-mouse-goto-message): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17867
diff
changeset
|
1064 If SKIP-RMAIL, don't do anything to the Rmail buffer." |
130 | 1065 (interactive "P") |
1066 (if (consp n) (setq n (prefix-numeric-value n))) | |
1067 (if (eobp) (forward-line -1)) | |
1068 (beginning-of-line) | |
9352
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1069 (let* ((obuf (current-buffer)) |
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1070 (buf rmail-buffer) |
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1071 (cur (point)) |
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1072 message-not-found |
62402
a7e02ef1e3d6
Replace `string-to-int' by `string-to-number'.
Juanma Barranquero <lekktu@gmail.com>
parents:
52963
diff
changeset
|
1073 (curmsg (string-to-number |
9352
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1074 (buffer-substring (point) |
39567 | 1075 (min (point-max) (+ 6 (point)))))) |
9352
f10a1492ecfa
(rmail-summary-goto-msg): Get rmail-total-messages from the rmail buffer.
Richard M. Stallman <rms@gnu.org>
parents:
9151
diff
changeset
|
1076 (total (save-excursion (set-buffer buf) rmail-total-messages))) |
6422
401da3d11995
(rmail-summary-goto-msg): Highlight message number of current message.
Richard M. Stallman <rms@gnu.org>
parents:
5861
diff
changeset
|
1077 ;; If message number N was specified, find that message's line |
401da3d11995
(rmail-summary-goto-msg): Highlight message number of current message.
Richard M. Stallman <rms@gnu.org>
parents:
5861
diff
changeset
|
1078 ;; or set message-not-found. |
401da3d11995
(rmail-summary-goto-msg): Highlight message number of current message.
Richard M. Stallman <rms@gnu.org>
parents:
5861
diff
changeset
|
1079 ;; If N wasn't specified or that message can't be found. |
401da3d11995
(rmail-summary-goto-msg): Highlight message number of current message.
Richard M. Stallman <rms@gnu.org>
parents:
5861
diff
changeset
|
1080 ;; set N by default. |
130 | 1081 (if (not n) |
1082 (setq n curmsg) | |
1083 (if (< n 1) | |
1084 (progn (message "No preceding message") | |
1085 (setq n 1))) | |
52963
c4870e121489
(rmail-summary-goto-msg): Don't call itself
Eli Zaretskii <eliz@gnu.org>
parents:
52683
diff
changeset
|
1086 (if (and (> n total) |
c4870e121489
(rmail-summary-goto-msg): Don't call itself
Eli Zaretskii <eliz@gnu.org>
parents:
52683
diff
changeset
|
1087 (> total 0)) |
130 | 1088 (progn (message "No following message") |
1089 (goto-char (point-max)) | |
14293
87b4bd8fea26
(rmail-make-basic-summary-line): Include msg line number.
Karl Heuer <kwzh@gnu.org>
parents:
14169
diff
changeset
|
1090 (rmail-summary-goto-msg nil nowarn skip-rmail))) |
130 | 1091 (goto-char (point-min)) |
39567 | 1092 (if (not (re-search-forward (format "^%5d[^0-9]" n) nil t)) |
130 | 1093 (progn (or nowarn (message "Message %d not found" n)) |
1094 (setq n curmsg) | |
6422
401da3d11995
(rmail-summary-goto-msg): Highlight message number of current message.
Richard M. Stallman <rms@gnu.org>
parents:
5861
diff
changeset
|
1095 (setq message-not-found t) |
130 | 1096 (goto-char cur)))) |
1097 (beginning-of-line) | |
1098 (skip-chars-forward " ") | |
1099 (skip-chars-forward "0-9") | |
1100 (save-excursion (if (= (following-char) ?-) | |
1101 (let ((buffer-read-only nil)) | |
1102 (delete-char 1) | |
1103 (insert " ")))) | |
10489
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1104 (rmail-summary-update-highlight message-not-found) |
130 | 1105 (beginning-of-line) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1106 (if skip-rmail |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1107 nil |
5275
c2a5a99d89e8
(rmail-summary-goto-msg): Use unwind-protect to go
Richard M. Stallman <rms@gnu.org>
parents:
5121
diff
changeset
|
1108 (let ((selwin (selected-window))) |
c2a5a99d89e8
(rmail-summary-goto-msg): Use unwind-protect to go
Richard M. Stallman <rms@gnu.org>
parents:
5121
diff
changeset
|
1109 (unwind-protect |
c2a5a99d89e8
(rmail-summary-goto-msg): Use unwind-protect to go
Richard M. Stallman <rms@gnu.org>
parents:
5121
diff
changeset
|
1110 (progn (pop-to-buffer buf) |
c2a5a99d89e8
(rmail-summary-goto-msg): Use unwind-protect to go
Richard M. Stallman <rms@gnu.org>
parents:
5121
diff
changeset
|
1111 (rmail-show-message n)) |
8728
b30c35c8e7ed
(rmail-summary-goto-msg): Preserve the current buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8635
diff
changeset
|
1112 (select-window selwin) |
b30c35c8e7ed
(rmail-summary-goto-msg): Preserve the current buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8635
diff
changeset
|
1113 ;; The actions above can alter the current buffer. Preserve it. |
b30c35c8e7ed
(rmail-summary-goto-msg): Preserve the current buffer.
Richard M. Stallman <rms@gnu.org>
parents:
8635
diff
changeset
|
1114 (set-buffer obuf)))))) |
10489
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1115 |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1116 ;; Update the highlighted line in an rmail summary buffer. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1117 ;; That should be current. We highlight the line point is on. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1118 ;; If NOT-FOUND is non-nil, we turn off highlighting. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1119 (defun rmail-summary-update-highlight (not-found) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1120 ;; Make sure we have an overlay to use. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1121 (or rmail-summary-overlay |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1122 (progn |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1123 (make-local-variable 'rmail-summary-overlay) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1124 (setq rmail-summary-overlay (make-overlay (point) (point))))) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1125 ;; If this message is in the summary, use the overlay to highlight it. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1126 ;; Otherwise, don't highlight anything. |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1127 (if not-found |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1128 (overlay-put rmail-summary-overlay 'face nil) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1129 (move-overlay rmail-summary-overlay |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1130 (save-excursion (beginning-of-line) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1131 (skip-chars-forward " ") |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1132 (point)) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1133 (save-excursion (end-of-line) (point))) |
5906e2f35eb9
(rmail-summary-update-highlight): New function.
Richard M. Stallman <rms@gnu.org>
parents:
10142
diff
changeset
|
1134 (overlay-put rmail-summary-overlay 'face 'highlight))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1135 |
130 | 1136 (defun rmail-summary-scroll-msg-up (&optional dist) |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1137 "Scroll the Rmail window forward. |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1138 If the Rmail window is displaying the end of a message, |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1139 advance to the next message." |
130 | 1140 (interactive "P") |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1141 (if (eq dist '-) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1142 (rmail-summary-scroll-msg-down nil) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
1143 (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer))) |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1144 (if rmail-buffer-window |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1145 (if (let ((rmail-summary-window (selected-window))) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1146 (select-window rmail-buffer-window) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1147 (prog1 |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1148 ;; Is EOB visible in the buffer? |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1149 (save-excursion |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1150 (let ((ht (window-height (selected-window)))) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1151 (move-to-window-line (- ht 2)) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1152 (end-of-line) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1153 (eobp))) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1154 (select-window rmail-summary-window))) |
14940
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1155 (if (not rmail-summary-scroll-between-messages) |
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1156 (error "End of buffer") |
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1157 (rmail-summary-next-msg (or dist 1))) |
17096
4a2d9b3990e3
(rmail-new-summary): Setup rmail-view-buffer.
Kenichi Handa <handa@m17n.org>
parents:
16676
diff
changeset
|
1158 (let ((other-window-scroll-buffer rmail-view-buffer)) |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1159 (scroll-other-window dist))) |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1160 ;; If it isn't visible at all, show the beginning. |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1161 (rmail-summary-beginning-of-message))))) |
130 | 1162 |
1163 (defun rmail-summary-scroll-msg-down (&optional dist) | |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1164 "Scroll the Rmail window backward. |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1165 If the Rmail window is now displaying the beginning of a message, |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1166 move to the previous message." |
130 | 1167 (interactive "P") |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1168 (if (eq dist '-) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1169 (rmail-summary-scroll-msg-up nil) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1170 (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer))) |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1171 (if rmail-buffer-window |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1172 (if (let ((rmail-summary-window (selected-window))) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1173 (select-window rmail-buffer-window) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1174 (prog1 |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1175 ;; Is BOB visible in the buffer? |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1176 (save-excursion |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1177 (move-to-window-line 0) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1178 (beginning-of-line) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1179 (bobp)) |
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1180 (select-window rmail-summary-window))) |
14940
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1181 (if (not rmail-summary-scroll-between-messages) |
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1182 (error "Beginning of buffer") |
9dceb7afbb68
(rmail-summary-scroll-between-messages): New var.
Richard M. Stallman <rms@gnu.org>
parents:
14786
diff
changeset
|
1183 (rmail-summary-previous-msg (or dist 1))) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1184 (let ((other-window-scroll-buffer rmail-view-buffer)) |
10030
f0264fb75509
(rmail-summary-scroll-msg-up): If at end of message,
Richard M. Stallman <rms@gnu.org>
parents:
9545
diff
changeset
|
1185 (scroll-other-window-down dist))) |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1186 ;; If it isn't visible at all, show the beginning. |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1187 (rmail-summary-beginning-of-message))))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1188 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1189 (defun rmail-summary-beginning-of-message () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1190 "Show current message from the beginning." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1191 (interactive) |
64929
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1192 (rmail-summary-show-message 'BEG)) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1193 |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1194 (defun rmail-summary-end-of-message () |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1195 "Show bottom of current message." |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1196 (interactive) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1197 (rmail-summary-show-message 'END)) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1198 |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1199 (defun rmail-summary-show-message (where) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1200 "Show current mail message. |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1201 Position it according to WHERE which can be BEG or END" |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1202 (if (and (one-window-p) (not pop-up-frames)) |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1203 ;; If there is just one window, put the summary on the top. |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1204 (let ((buffer rmail-view-buffer)) |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1205 (split-window (selected-window) rmail-summary-window-size) |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1206 (select-window (frame-first-window)) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1207 (pop-to-buffer rmail-view-buffer) |
16676
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1208 ;; If pop-to-buffer did not use that window, delete that |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1209 ;; window. (This can happen if it uses another frame.) |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1210 (or (eq buffer (window-buffer (next-window (frame-first-window)))) |
82e54a854639
(rmail-summary-beginning-of-message):
Richard M. Stallman <rms@gnu.org>
parents:
16389
diff
changeset
|
1211 (delete-other-windows))) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1212 (pop-to-buffer rmail-view-buffer)) |
64929
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1213 (cond |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1214 ((eq where 'BEG) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1215 (goto-char (point-min)) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1216 (search-forward "\n\n")) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1217 ((eq where 'END) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1218 (goto-char (point-max)) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1219 (recenter (1- (window-height)))) |
196e55109345
(rmail-summary-end-of-message): New command to go to the bottom of the mail
Eli Zaretskii <eliz@gnu.org>
parents:
64754
diff
changeset
|
1220 ) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1221 (pop-to-buffer rmail-summary-buffer)) |
130 | 1222 |
15488
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1223 (defun rmail-summary-bury () |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1224 "Bury the Rmail buffer and the Rmail summary buffer." |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1225 (interactive) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1226 (let ((buffer-to-bury (current-buffer))) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1227 (let (window) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1228 (while (setq window (get-buffer-window rmail-buffer)) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1229 (set-window-buffer window (other-buffer rmail-buffer))) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1230 (bury-buffer rmail-buffer)) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1231 (switch-to-buffer (other-buffer buffer-to-bury)) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1232 (bury-buffer buffer-to-bury))) |
fd4273de8c97
(rmail-summary-bury): New function.
Richard M. Stallman <rms@gnu.org>
parents:
15409
diff
changeset
|
1233 |
130 | 1234 (defun rmail-summary-quit () |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1235 "Quit out of Rmail and Rmail summary." |
130 | 1236 (interactive) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1237 (rmail-summary-wipe) |
130 | 1238 (rmail-quit)) |
1239 | |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1240 (defun rmail-summary-wipe () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1241 "Kill and wipe away Rmail summary, remaining within Rmail." |
130 | 1242 (interactive) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1243 (save-excursion (set-buffer rmail-buffer) (setq rmail-summary-buffer nil)) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1244 (let ((local-rmail-buffer rmail-view-buffer)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1245 (kill-buffer (current-buffer)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1246 ;; Delete window if not only one. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1247 (if (not (eq (selected-window) (next-window nil 'no-minibuf))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1248 (delete-window)) |
5121
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
1249 ;; Switch windows to the rmail buffer, or switch to it in this window. |
864d3ca7f2b6
(rmail-summary-wipe): If rmail buffer is not visible,
Richard M. Stallman <rms@gnu.org>
parents:
5006
diff
changeset
|
1250 (pop-to-buffer local-rmail-buffer))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1251 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1252 (defun rmail-summary-expunge () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1253 "Actually erase all deleted messages and recompute summary headers." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1254 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1255 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1256 (set-buffer rmail-buffer) |
34482 | 1257 (when (rmail-expunge-confirmed) |
34184 | 1258 (rmail-only-expunge))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1259 (rmail-update-summary)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1260 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1261 (defun rmail-summary-expunge-and-save () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1262 "Expunge and save RMAIL file." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1263 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1264 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1265 (set-buffer rmail-buffer) |
34482 | 1266 (when (rmail-expunge-confirmed) |
34184 | 1267 (rmail-only-expunge))) |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1268 (rmail-update-summary) |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1269 (save-excursion |
3461
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1270 (set-buffer rmail-buffer) |
5861
882894a8c217
(rmail-summary-expunge-and-save): Mark summary buffer as unmodified.
Karl Heuer <kwzh@gnu.org>
parents:
5709
diff
changeset
|
1271 (save-buffer)) |
882894a8c217
(rmail-summary-expunge-and-save): Mark summary buffer as unmodified.
Karl Heuer <kwzh@gnu.org>
parents:
5709
diff
changeset
|
1272 (set-buffer-modified-p nil)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1273 |
19570
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1274 (defun rmail-summary-get-new-mail (&optional file-name) |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1275 "Get new mail and recompute summary headers. |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1276 |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1277 Optionally you can specify the file to get new mail from. In this case, |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1278 the file of new mail is not changed or deleted. Noninteractively, you can |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1279 pass the inbox file name as an argument. Interactively, a prefix |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1280 argument says to read a file name and use that file as the inbox." |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1281 (interactive |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1282 (list (if current-prefix-arg |
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1283 (read-file-name "Get new mail from file: ")))) |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1284 (let (msg) |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1285 (save-excursion |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1286 (set-buffer rmail-buffer) |
19570
a2a72d1e0970
(rmail-summary-get-new-mail):
Richard M. Stallman <rms@gnu.org>
parents:
19111
diff
changeset
|
1287 (rmail-get-new-mail file-name) |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1288 ;; Get the proper new message number. |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1289 (setq msg rmail-current-message)) |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1290 ;; Make sure that message is displayed. |
13663
197f7ae5493d
(rmail-summary-get-new-mail): Don't call rmail-summary-goto-msg if msg is 0.
Richard M. Stallman <rms@gnu.org>
parents:
13515
diff
changeset
|
1291 (or (zerop msg) |
197f7ae5493d
(rmail-summary-get-new-mail): Don't call rmail-summary-goto-msg if msg is 0.
Richard M. Stallman <rms@gnu.org>
parents:
13515
diff
changeset
|
1292 (rmail-summary-goto-msg msg)))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1293 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1294 (defun rmail-summary-input (filename) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1295 "Run Rmail on file FILENAME." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1296 (interactive "FRun rmail on RMAIL file: ") |
3466
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1297 ;; We switch windows here, then display the other Rmail file there. |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1298 (pop-to-buffer rmail-buffer) |
c8f52c44d9a4
(rmail-summary-expunge-and-save): Do save-buffer last.
Richard M. Stallman <rms@gnu.org>
parents:
3461
diff
changeset
|
1299 (rmail filename)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1300 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1301 (defun rmail-summary-first-message () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1302 "Show first message in Rmail file from summary buffer." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1303 (interactive) |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
1304 (with-no-warnings |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
1305 (beginning-of-buffer))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1306 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1307 (defun rmail-summary-last-message () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1308 "Show last message in Rmail file from summary buffer." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1309 (interactive) |
63944
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
1310 (with-no-warnings |
6f8d122757b4
(rmail-summary-redo): Add defvar.
Richard M. Stallman <rms@gnu.org>
parents:
62764
diff
changeset
|
1311 (end-of-buffer)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1312 (forward-line -1)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1313 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1314 (defvar rmail-summary-edit-map nil) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1315 (if rmail-summary-edit-map |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1316 nil |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1317 (setq rmail-summary-edit-map |
4990
8f5a44af0114
(rmail-summary-edit-map): Inherit text-mode-map properly.
Richard M. Stallman <rms@gnu.org>
parents:
3879
diff
changeset
|
1318 (nconc (make-sparse-keymap) text-mode-map)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1319 (define-key rmail-summary-edit-map "\C-c\C-c" 'rmail-cease-edit) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1320 (define-key rmail-summary-edit-map "\C-c\C-]" 'rmail-abort-edit)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1321 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1322 (defun rmail-summary-edit-current-message () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1323 "Edit the contents of this message." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1324 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1325 (pop-to-buffer rmail-buffer) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1326 (rmail-edit-current-message) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1327 (use-local-map rmail-summary-edit-map)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1328 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1329 (defun rmail-summary-cease-edit () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1330 "Finish editing message, then go back to Rmail summary buffer." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1331 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1332 (rmail-cease-edit) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1333 (pop-to-buffer rmail-summary-buffer)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1334 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1335 (defun rmail-summary-abort-edit () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1336 "Abort edit of current message; restore original contents. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1337 Go back to summary buffer." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1338 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1339 (rmail-abort-edit) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1340 (pop-to-buffer rmail-summary-buffer)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1341 |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1342 (defun rmail-summary-search-backward (regexp &optional n) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1343 "Show message containing next match for REGEXP. |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1344 Prefix argument gives repeat count; negative argument means search |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1345 backwards (through earlier messages). |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1346 Interactively, empty argument means use same regexp used last time." |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1347 (interactive |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1348 (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1349 (prompt |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1350 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1351 regexp) |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1352 (setq prompt |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1353 (concat prompt |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1354 (if rmail-search-last-regexp |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1355 (concat ", default " |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1356 rmail-search-last-regexp "): ") |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1357 "): "))) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1358 (setq regexp (read-string prompt)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1359 (cond ((not (equal regexp "")) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1360 (setq rmail-search-last-regexp regexp)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1361 ((not rmail-search-last-regexp) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1362 (error "No previous Rmail search string"))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1363 (list rmail-search-last-regexp |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1364 (prefix-numeric-value current-prefix-arg)))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1365 ;; Don't use save-excursion because that prevents point from moving |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1366 ;; properly in the summary buffer. |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1367 (let ((buffer (current-buffer))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1368 (unwind-protect |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1369 (progn |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1370 (set-buffer rmail-buffer) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1371 (rmail-search regexp (- n))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1372 (set-buffer buffer)))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1373 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1374 (defun rmail-summary-search (regexp &optional n) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1375 "Show message containing next match for REGEXP. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1376 Prefix argument gives repeat count; negative argument means search |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1377 backwards (through earlier messages). |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1378 Interactively, empty argument means use same regexp used last time." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1379 (interactive |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1380 (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1381 (prompt |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1382 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1383 regexp) |
65680
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1384 (setq prompt |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1385 (concat prompt |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1386 (if rmail-search-last-regexp |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1387 (concat ", default " |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1388 rmail-search-last-regexp "): ") |
ed770a0a7846
2005-09-24 Emilio C. Lopes <eclig@gmx.net>
Romain Francoise <romain@orebokech.com>
parents:
65206
diff
changeset
|
1389 "): "))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1390 (setq regexp (read-string prompt)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1391 (cond ((not (equal regexp "")) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1392 (setq rmail-search-last-regexp regexp)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1393 ((not rmail-search-last-regexp) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1394 (error "No previous Rmail search string"))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1395 (list rmail-search-last-regexp |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1396 (prefix-numeric-value current-prefix-arg)))) |
3862
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1397 ;; Don't use save-excursion because that prevents point from moving |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1398 ;; properly in the summary buffer. |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1399 (let ((buffer (current-buffer))) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1400 (unwind-protect |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1401 (progn |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1402 (set-buffer rmail-buffer) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1403 (rmail-search regexp n)) |
d65e83bd1120
(rmail-summary-mode-map): Add local menu bar bindings.
Richard M. Stallman <rms@gnu.org>
parents:
3509
diff
changeset
|
1404 (set-buffer buffer)))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1405 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1406 (defun rmail-summary-toggle-header () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1407 "Show original message header if pruned header currently shown, or vice versa." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1408 (interactive) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1409 (save-window-excursion |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1410 (set-buffer rmail-buffer) |
11175
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1411 (rmail-toggle-header)) |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1412 ;; Inside save-excursion, some changes to point in the RMAIL buffer are lost. |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1413 ;; Set point to point-min in the RMAIL buffer, if it is visible. |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1414 (let ((window (get-buffer-window rmail-view-buffer))) |
11175
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1415 (if window |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1416 ;; Using save-window-excursion would lose the new value of point. |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1417 (let ((owin (selected-window))) |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1418 (unwind-protect |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1419 (progn |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1420 (select-window window) |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1421 (goto-char (point-min))) |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1422 (select-window owin)))))) |
025aeb70cfed
(rmail-summary-toggle-header): Make header visible in message buffer.
Richard M. Stallman <rms@gnu.org>
parents:
10784
diff
changeset
|
1423 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1424 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1425 (defun rmail-summary-add-label (label) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1426 "Add LABEL to labels associated with current Rmail message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1427 Completion is performed over known labels when reading." |
3461
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1428 (interactive (list (save-excursion |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1429 (set-buffer rmail-buffer) |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1430 (rmail-read-label "Add label")))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1431 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1432 (set-buffer rmail-buffer) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1433 (rmail-add-label label))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1434 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1435 (defun rmail-summary-kill-label (label) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1436 "Remove LABEL from labels associated with current Rmail message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1437 Completion is performed over known labels when reading." |
3461
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1438 (interactive (list (save-excursion |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1439 (set-buffer rmail-buffer) |
1dec1449324d
(rmail-summary-expunge-and-save):
Richard M. Stallman <rms@gnu.org>
parents:
3443
diff
changeset
|
1440 (rmail-read-label "Kill label")))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1441 (save-excursion |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1442 (set-buffer rmail-buffer) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1443 (rmail-set-label label nil))) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1444 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1445 ;;;; *** Rmail Summary Mailing Commands *** |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1446 |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1447 (defun rmail-summary-override-mail-send-and-exit () |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
1448 "Replace bindings to `mail-send-and-exit' with `rmail-summary-send-and-exit'." |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1449 (use-local-map (copy-keymap (current-local-map))) |
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1450 (dolist (key (where-is-internal 'mail-send-and-exit)) |
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1451 (define-key (current-local-map) key 'rmail-summary-send-and-exit))) |
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1452 |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1453 (defun rmail-summary-mail () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1454 "Send mail in another window. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1455 While composing the message, use \\[mail-yank-original] to yank the |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1456 original message into it." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1457 (interactive) |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1458 (let ((window (get-buffer-window rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1459 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1460 (select-window window) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1461 (set-buffer rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1462 (rmail-start-mail nil nil nil nil nil (current-buffer)) |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1463 (rmail-summary-override-mail-send-and-exit)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1464 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1465 (defun rmail-summary-continue () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1466 "Continue composing outgoing message previously being composed." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1467 (interactive) |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1468 (let ((window (get-buffer-window rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1469 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1470 (select-window window) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1471 (set-buffer rmail-buffer))) |
5709
85119c3098a0
Fix rmail summary commands to work with rmail-mail-new-frame.
Karl Heuer <kwzh@gnu.org>
parents:
5678
diff
changeset
|
1472 (rmail-start-mail t)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1473 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1474 (defun rmail-summary-reply (just-sender) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1475 "Reply to the current message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1476 Normally include CC: to all other recipients of original message; |
5709
85119c3098a0
Fix rmail summary commands to work with rmail-mail-new-frame.
Karl Heuer <kwzh@gnu.org>
parents:
5678
diff
changeset
|
1477 prefix argument means ignore them. While composing the reply, |
85119c3098a0
Fix rmail summary commands to work with rmail-mail-new-frame.
Karl Heuer <kwzh@gnu.org>
parents:
5678
diff
changeset
|
1478 use \\[mail-yank-original] to yank the original message into it." |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1479 (interactive "P") |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1480 (let ((window (get-buffer-window rmail-view-buffer))) |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1481 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1482 (select-window window) |
37614
17db314acfc2
(rmail-message-subject-p): Process the result
Gerd Moellmann <gerd@gnu.org>
parents:
37590
diff
changeset
|
1483 (set-buffer rmail-view-buffer))) |
5709
85119c3098a0
Fix rmail summary commands to work with rmail-mail-new-frame.
Karl Heuer <kwzh@gnu.org>
parents:
5678
diff
changeset
|
1484 (rmail-reply just-sender) |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1485 (rmail-summary-override-mail-send-and-exit)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1486 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1487 (defun rmail-summary-retry-failure () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1488 "Edit a mail message which is based on the contents of the current message. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1489 For a message rejected by the mail system, extract the interesting headers and |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1490 the body of the original message; otherwise copy the current message." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1491 (interactive) |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1492 (let ((window (get-buffer-window rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1493 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1494 (select-window window) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1495 (set-buffer rmail-buffer))) |
5709
85119c3098a0
Fix rmail summary commands to work with rmail-mail-new-frame.
Karl Heuer <kwzh@gnu.org>
parents:
5678
diff
changeset
|
1496 (rmail-retry-failure) |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1497 (rmail-summary-override-mail-send-and-exit)) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1498 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1499 (defun rmail-summary-send-and-exit () |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1500 "Send mail reply and return to summary buffer." |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1501 (interactive) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1502 (mail-send-and-exit t)) |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1503 |
5006
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1504 (defun rmail-summary-forward (resend) |
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1505 "Forward the current message to another user. |
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1506 With prefix argument, \"resend\" the message instead of forwarding it; |
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1507 see the documentation of `rmail-resend'." |
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1508 (interactive "P") |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1509 (save-excursion |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1510 (let ((window (get-buffer-window rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1511 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1512 (select-window window) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1513 (set-buffer rmail-buffer))) |
5006
356f6a751fdf
(rmail-summary-forward): Accept prefix arg
Richard M. Stallman <rms@gnu.org>
parents:
4990
diff
changeset
|
1514 (rmail-forward resend) |
36746
6e4beb27bc38
(rmail-summary-override-mail-send-and-exit):
Gerd Moellmann <gerd@gnu.org>
parents:
34482
diff
changeset
|
1515 (rmail-summary-override-mail-send-and-exit))) |
9448
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
1516 |
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
1517 (defun rmail-summary-resend () |
49637
32bf542aaf1c
(rmail-summary-previous-msg): Add docstring.
John Paul Wallington <jpw@pobox.com>
parents:
49598
diff
changeset
|
1518 "Resend current message using `rmail-resend'." |
9448
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
1519 (interactive) |
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
1520 (save-excursion |
10784
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1521 (let ((window (get-buffer-window rmail-buffer))) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1522 (if window |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1523 (select-window window) |
fdc9df3761d8
(rmail-summary-mail, rmail-summary-continue)
Richard M. Stallman <rms@gnu.org>
parents:
10663
diff
changeset
|
1524 (set-buffer rmail-buffer))) |
9448
99ec41e9cb2e
(rmail-summary-resend): New function.
Richard M. Stallman <rms@gnu.org>
parents:
9432
diff
changeset
|
1525 (call-interactively 'rmail-resend))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1526 |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1527 ;; Summary output commands. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1528 |
24837
e8e1a22961da
(rmail-summary-output-to-rmail-file): Fix typo.
Karl Heuer <kwzh@gnu.org>
parents:
23985
diff
changeset
|
1529 (defun rmail-summary-output-to-rmail-file (&optional file-name n) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1530 "Append the current message to an Rmail file named FILE-NAME. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1531 If the file does not exist, ask if it should be created. |
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1532 If file is being visited, the message is appended to the Emacs |
23221
8d1c55a12c94
(rmail-summary-output-to-rmail-file):
Karl Heuer <kwzh@gnu.org>
parents:
22546
diff
changeset
|
1533 buffer visiting that file. |
8d1c55a12c94
(rmail-summary-output-to-rmail-file):
Karl Heuer <kwzh@gnu.org>
parents:
22546
diff
changeset
|
1534 |
8d1c55a12c94
(rmail-summary-output-to-rmail-file):
Karl Heuer <kwzh@gnu.org>
parents:
22546
diff
changeset
|
1535 A prefix argument N says to output N consecutive messages |
8d1c55a12c94
(rmail-summary-output-to-rmail-file):
Karl Heuer <kwzh@gnu.org>
parents:
22546
diff
changeset
|
1536 starting with the current one. Deleted messages are skipped and don't count." |
23985
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1537 (interactive |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1538 (progn (require 'rmailout) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1539 (list (rmail-output-read-rmail-file-name) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1540 (prefix-numeric-value current-prefix-arg)))) |
24849
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1541 (let ((i 0) prev-msg) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1542 (while |
24849
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1543 (and (< i n) |
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1544 (progn (rmail-summary-goto-msg) |
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1545 (not (eq prev-msg |
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1546 (setq prev-msg |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1547 (with-current-buffer rmail-buffer |
24849
0e79d47f61d6
(rmail-summary-output-to-rmail-file): Avoid
Karl Heuer <kwzh@gnu.org>
parents:
24837
diff
changeset
|
1548 rmail-current-message)))))) |
23985
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1549 (setq i (1+ i)) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1550 (with-current-buffer rmail-buffer |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1551 (let ((rmail-delete-after-output nil)) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1552 (rmail-output-to-rmail-file file-name 1))) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1553 (if rmail-delete-after-output |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1554 (rmail-summary-delete-forward nil) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1555 (if (< i n) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1556 (rmail-summary-next-msg 1)))))) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1557 |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1558 (defun rmail-summary-output (&optional file-name n) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1559 "Append this message to Unix mail file named FILE-NAME. |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1560 |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1561 A prefix argument N says to output N consecutive messages |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1562 starting with the current one. Deleted messages are skipped and don't count." |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1563 (interactive |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1564 (progn (require 'rmailout) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1565 (list (rmail-output-read-file-name) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1566 (prefix-numeric-value current-prefix-arg)))) |
43481
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1567 (let ((i 0) prev-msg) |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1568 (while |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1569 (and (< i n) |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1570 (progn (rmail-summary-goto-msg) |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1571 (not (eq prev-msg |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1572 (setq prev-msg |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1573 (with-current-buffer rmail-buffer |
21de4f4cda23
(rmail-summary-output): Properly advance
Richard M. Stallman <rms@gnu.org>
parents:
42001
diff
changeset
|
1574 rmail-current-message)))))) |
23985
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1575 (setq i (1+ i)) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1576 (with-current-buffer rmail-buffer |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1577 (let ((rmail-delete-after-output nil)) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1578 (rmail-output file-name 1))) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1579 (if rmail-delete-after-output |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1580 (rmail-summary-delete-forward nil) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1581 (if (< i n) |
9cdc05332687
(rmail-summary-output-to-rmail-file):
Richard M. Stallman <rms@gnu.org>
parents:
23831
diff
changeset
|
1582 (rmail-summary-next-msg 1)))))) |
2077
6885836c2f98
(rmail-update-summary): New function.
Richard M. Stallman <rms@gnu.org>
parents:
845
diff
changeset
|
1583 |
8635
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1584 (defun rmail-summary-output-menu () |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1585 "Output current message to another Rmail file, chosen with a menu. |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1586 Also set the default for subsequent \\[rmail-output-to-rmail-file] commands. |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1587 The variables `rmail-secondary-file-directory' and |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1588 `rmail-secondary-file-regexp' control which files are offered in the menu." |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1589 (interactive) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1590 (save-excursion |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1591 (set-buffer rmail-buffer) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1592 (let ((rmail-delete-after-output nil)) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1593 (call-interactively 'rmail-output-menu))) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1594 (if rmail-delete-after-output |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1595 (rmail-summary-delete-forward nil))) |
a241401a67ff
(rmail-summary-output-menu): New command.
Richard M. Stallman <rms@gnu.org>
parents:
8547
diff
changeset
|
1596 |
8911
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1597 (defun rmail-summary-construct-io-menu () |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1598 (let ((files (rmail-find-all-files rmail-secondary-file-directory))) |
13001
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1599 (if files |
8911
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1600 (progn |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1601 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1602 (cons "Input Rmail File" |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1603 (rmail-list-to-menu "Input Rmail File" |
13001
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1604 files |
8911
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1605 'rmail-summary-input))) |
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1606 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1607 (cons "Output Rmail File" |
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
46130
diff
changeset
|
1608 (rmail-list-to-menu "Output Rmail File" |
13001
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1609 files |
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1610 'rmail-summary-output-to-rmail-file)))) |
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1611 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1612 '("Input Rmail File" . rmail-disable-menu)) |
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1613 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
7946d20948fc
(rmail-summary-construct-io-menu): Use all of FILES.
Richard M. Stallman <rms@gnu.org>
parents:
12911
diff
changeset
|
1614 '("Output Rmail File" . rmail-disable-menu))))) |
8911
3abf3f2ef6cf
(rmail-summary-construct-io-menu): New function.
Richard M. Stallman <rms@gnu.org>
parents:
8728
diff
changeset
|
1615 |
22203
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1616 (defun rmail-summary-output-body (&optional file-name) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1617 "Write this message body to the file FILE-NAME. |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1618 FILE-NAME defaults, interactively, from the Subject field of the message." |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1619 (interactive) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1620 (save-excursion |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1621 (set-buffer rmail-buffer) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1622 (let ((rmail-delete-after-output nil)) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1623 (if file-name |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1624 (rmail-output-body-to-file file-name) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1625 (call-interactively 'rmail-output-body-to-file)))) |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1626 (if rmail-delete-after-output |
481d174f762a
(rmail-summary-output-body): New function.
Richard M. Stallman <rms@gnu.org>
parents:
20081
diff
changeset
|
1627 (rmail-summary-delete-forward nil))) |
3879
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1628 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1629 ;; Sorting messages in Rmail Summary buffer. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1630 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1631 (defun rmail-summary-sort-by-date (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1632 "Sort messages of current Rmail summary by date. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1633 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1634 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1635 (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1636 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1637 (defun rmail-summary-sort-by-subject (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1638 "Sort messages of current Rmail summary by subject. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1639 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1640 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1641 (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1642 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1643 (defun rmail-summary-sort-by-author (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1644 "Sort messages of current Rmail summary by author. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1645 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1646 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1647 (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1648 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1649 (defun rmail-summary-sort-by-recipient (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1650 "Sort messages of current Rmail summary by recipient. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1651 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1652 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1653 (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1654 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1655 (defun rmail-summary-sort-by-correspondent (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1656 "Sort messages of current Rmail summary by other correspondent. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1657 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1658 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1659 (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1660 |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1661 (defun rmail-summary-sort-by-lines (reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1662 "Sort messages of current Rmail summary by lines of the message. |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1663 If prefix argument REVERSE is non-nil, sort them in reverse order." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1664 (interactive "P") |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1665 (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1666 |
37590
003e23c611eb
(rmail-summary-sort-by-labels): Renamed
Gerd Moellmann <gerd@gnu.org>
parents:
36746
diff
changeset
|
1667 (defun rmail-summary-sort-by-labels (reverse labels) |
003e23c611eb
(rmail-summary-sort-by-labels): Renamed
Gerd Moellmann <gerd@gnu.org>
parents:
36746
diff
changeset
|
1668 "Sort messages of current Rmail summary by labels. |
6717
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1669 If prefix argument REVERSE is non-nil, sort them in reverse order. |
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1670 KEYWORDS is a comma-separated list of labels." |
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1671 (interactive "P\nsSort by labels: ") |
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1672 (rmail-sort-from-summary |
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1673 (function (lambda (reverse) |
37590
003e23c611eb
(rmail-summary-sort-by-labels): Renamed
Gerd Moellmann <gerd@gnu.org>
parents:
36746
diff
changeset
|
1674 (rmail-sort-by-labels reverse labels))) |
6717
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1675 reverse)) |
2121bf252398
(rmail-summary-sort-by-keywords): New function.
Karl Heuer <kwzh@gnu.org>
parents:
6688
diff
changeset
|
1676 |
3879
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1677 (defun rmail-sort-from-summary (sortfun reverse) |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1678 "Sort Rmail messages from Summary buffer and update it after sorting." |
b8c99f30ca3f
(rmail-summary-mode-map): Bind summary sort commands.
Richard M. Stallman <rms@gnu.org>
parents:
3862
diff
changeset
|
1679 (require 'rmailsort) |
6582
bac8e17d51b3
(rmail-sort-from-summary): Preserve window selection.
Karl Heuer <kwzh@gnu.org>
parents:
6422
diff
changeset
|
1680 (let ((selwin (selected-window))) |
bac8e17d51b3
(rmail-sort-from-summary): Preserve window selection.
Karl Heuer <kwzh@gnu.org>
parents:
6422
diff
changeset
|
1681 (unwind-protect |
bac8e17d51b3
(rmail-sort-from-summary): Preserve window selection.
Karl Heuer <kwzh@gnu.org>
parents:
6422
diff
changeset
|
1682 (progn (pop-to-buffer rmail-buffer) |
bac8e17d51b3
(rmail-sort-from-summary): Preserve window selection.
Karl Heuer <kwzh@gnu.org>
parents:
6422
diff
changeset
|
1683 (funcall sortfun reverse)) |
bac8e17d51b3
(rmail-sort-from-summary): Preserve window selection.
Karl Heuer <kwzh@gnu.org>
parents:
6422
diff
changeset
|
1684 (select-window selwin)))) |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
130
diff
changeset
|
1685 |
29210 | 1686 (provide 'rmailsum) |
1687 | |
52401 | 1688 ;;; arch-tag: 556079ee-75c1-47f5-9884-2e0a0bc6c5a1 |
658
7cbd4fcd8b0f
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
130
diff
changeset
|
1689 ;;; rmailsum.el ends here |