Mercurial > emacs
annotate lisp/mail/rmailsum.el @ 107819:834292200403
xfns.c (Fx_show_tip): Subtract last glyph's width only when it is for padding.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sat, 10 Apr 2010 19:59:46 +0900 |
parents | 1d1d5d9bd884 |
children | 280c8ae2476d 0e19494fd75d |
rev | line source |
---|---|
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1 ;;; rmailsum.el --- make summary buffers for the mail reader |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
2 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
3 ;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2003, |
106815 | 4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
5 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
6 ;; Maintainer: FSF |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
7 ;; Keywords: mail |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
8 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
10 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
14 ;; (at your option) any later version. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
15 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
20 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
23 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
24 ;;; Commentary: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
25 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
26 ;; Extended by Bob Weiner of Motorola |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
27 ;; Provided all commands from rmail-mode in rmail-summary-mode and made key |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
28 ;; bindings in both modes wholly compatible. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
29 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
30 ;;; Code: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
31 |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
32 ;; For rmail-select-summary. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
33 (require 'rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
34 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
35 (defcustom rmail-summary-scroll-between-messages t |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
36 "Non-nil means Rmail summary scroll commands move between messages. |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
37 That is, after `rmail-summary-scroll-msg-up' reaches the end of a |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
38 message, it moves to the next message; and similarly for |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
39 `rmail-summary-scroll-msg-down'." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
40 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
41 :group 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
42 |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
43 ;; FIXME could do with a :set function that regenerates the summary |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
44 ;; and updates rmail-summary-vector. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
45 (defcustom rmail-summary-line-count-flag t |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
46 "Non-nil means Rmail summary should show the number of lines in each message. |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
47 Setting this option to nil might speed up the generation of summaries." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
48 :type 'boolean |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
49 :group 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
50 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
51 (defvar rmail-summary-font-lock-keywords |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
52 '(("^.....D.*" . font-lock-string-face) ; Deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
53 ("^.....-.*" . font-lock-type-face) ; Unread. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
54 ;; Neither of the below will be highlighted if either of the above are: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
55 ("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
56 ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
57 "Additional expressions to highlight in Rmail Summary mode.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
58 |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
59 (defvar rmail-summary-redo nil |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
60 "(FUNCTION . ARGS) to regenerate this Rmail summary buffer.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
61 |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
62 (defvar rmail-summary-overlay nil |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
63 "Overlay used to highlight the current message in the Rmail summary.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
64 (put 'rmail-summary-overlay 'permanent-local t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
65 |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
66 (defvar rmail-summary-mode-map nil |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
67 "Keymap used in Rmail summary mode.") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
68 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
69 ;; Entry points for making a summary buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
70 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
71 ;; Regenerate the contents of the summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
72 ;; using the same selection criterion as last time. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
73 ;; M-x revert-buffer in a summary buffer calls this function. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
74 (defun rmail-update-summary (&rest ignore) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
75 (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
76 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
77 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
78 (defun rmail-summary () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
79 "Display a summary of all messages, one line per message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
80 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
81 (rmail-new-summary "All" '(rmail-summary) nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
82 (unless (get-buffer-window rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
83 (rmail-summary-beginning-of-message))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
84 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
85 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
86 (defun rmail-summary-by-labels (labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
87 "Display a summary of all messages with one or more LABELS. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
88 LABELS should be a string containing the desired labels, separated by commas." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
89 (interactive "sLabels to summarize by: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
90 (if (string= labels "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
91 (setq labels (or rmail-last-multi-labels |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
92 (error "No label specified")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
93 (setq rmail-last-multi-labels labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
94 (rmail-new-summary (concat "labels " labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
95 (list 'rmail-summary-by-labels labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
96 'rmail-message-labels-p |
101416
cd1aa4fbf976
(rmail-summary-by-labels): Correctly handle return value of
Chong Yidong <cyd@stupidchicken.com>
parents:
101377
diff
changeset
|
97 (concat " \\(" |
cd1aa4fbf976
(rmail-summary-by-labels): Correctly handle return value of
Chong Yidong <cyd@stupidchicken.com>
parents:
101377
diff
changeset
|
98 (mail-comma-list-regexp labels) |
cd1aa4fbf976
(rmail-summary-by-labels): Correctly handle return value of
Chong Yidong <cyd@stupidchicken.com>
parents:
101377
diff
changeset
|
99 "\\)\\(,\\|\\'\\)"))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
100 |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
101 ;; FIXME "a string of regexps separated by commas" makes no sense because: |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
102 ;; i) it's pointless (you can just use \\|) |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
103 ;; ii) it's broken (you can't specify a literal comma) |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
104 ;; rmail-summary-by-topic and rmail-summary-by-senders have the same issue. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
105 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
106 (defun rmail-summary-by-recipients (recipients &optional primary-only) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
107 "Display a summary of all messages with the given RECIPIENTS. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
108 Normally checks the To, From and Cc fields of headers; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
109 but if PRIMARY-ONLY is non-nil (prefix arg given), |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
110 only look in the To and From fields. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
111 RECIPIENTS is a string of regexps separated by commas." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
112 (interactive "sRecipients to summarize by: \nP") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
113 (rmail-new-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
114 (concat "recipients " recipients) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
115 (list 'rmail-summary-by-recipients recipients primary-only) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
116 'rmail-message-recipients-p |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
117 (mail-comma-list-regexp recipients) primary-only)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
118 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
119 (defun rmail-message-recipients-p (msg recipients &optional primary-only) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
120 (rmail-apply-in-message msg 'rmail-message-recipients-p-1 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
121 recipients primary-only)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
122 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
123 (defun rmail-message-recipients-p-1 (recipients &optional primary-only) |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
124 ;; mail-fetch-field does not care where it starts from. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
125 (narrow-to-region (point) (progn (search-forward "\n\n") (point))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
126 (or (string-match recipients (or (mail-fetch-field "To") "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
127 (string-match recipients (or (mail-fetch-field "From") "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
128 (if (not primary-only) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
129 (string-match recipients (or (mail-fetch-field "Cc") ""))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
130 |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
131 ;; FIXME I find this a non-obvious name for what this function does. |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
132 ;; Also, the optional WHOLE-MESSAGE argument of r-s-by-topic would |
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
133 ;; seem more natural here. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
134 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
135 (defun rmail-summary-by-regexp (regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
136 "Display a summary of all messages according to regexp REGEXP. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
137 If the regular expression is found in the header of the message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
138 \(including in the date and other lines, as well as the subject line), |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
139 Emacs will list the message in the summary." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
140 (interactive "sRegexp to summarize by: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
141 (if (string= regexp "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
142 (setq regexp (or rmail-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
143 (error "No regexp specified")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
144 (setq rmail-last-regexp regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
145 (rmail-new-summary (concat "regexp " regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
146 (list 'rmail-summary-by-regexp regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
147 'rmail-message-regexp-p |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
148 regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
149 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
150 (defun rmail-message-regexp-p (msg regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
151 "Return t, if for message number MSG, regexp REGEXP matches in the header." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
152 (rmail-apply-in-message msg 'rmail-message-regexp-p-1 msg regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
153 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
154 (defun rmail-message-regexp-p-1 (msg regexp) |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
155 ;; Search functions can expect to start from the beginning. |
101535
8b115b281787
(rmail-message-recipients-p-1, rmail-message-regexp-p-1): Avoid clobbering the mark.
Chong Yidong <cyd@stupidchicken.com>
parents:
101533
diff
changeset
|
156 (narrow-to-region (point) (save-excursion (search-forward "\n\n") (point))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
157 (if rmail-enable-mime |
101537
d15ac066761b
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101535
diff
changeset
|
158 (if rmail-search-mime-header-function |
d15ac066761b
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101535
diff
changeset
|
159 (funcall rmail-search-mime-header-function msg regexp (point)) |
d15ac066761b
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101535
diff
changeset
|
160 (error "You must set `rmail-search-mime-header-function'")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
161 (re-search-forward regexp nil t))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
162 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
163 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
164 (defun rmail-summary-by-topic (subject &optional whole-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
165 "Display a summary of all messages with the given SUBJECT. |
102113
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
166 Normally checks just the Subject field of headers; but with prefix |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
167 argument WHOLE-MESSAGE is non-nil, looks in the whole message. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
168 SUBJECT is a string of regexps separated by commas." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
169 (interactive |
102113
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
170 ;; We quote the default subject, because if it contains regexp |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
171 ;; special characters (eg "?"), it can fail to match itself. (Bug#2333) |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
172 (let* ((subject (regexp-quote (rmail-simplified-subject))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
173 (prompt (concat "Topics to summarize by (regexp" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
174 (if subject ", default current subject" "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
175 "): "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
176 (list (read-string prompt nil nil subject) current-prefix-arg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
177 (rmail-new-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
178 (concat "about " subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
179 (list 'rmail-summary-by-topic subject whole-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
180 'rmail-message-subject-p |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
181 (mail-comma-list-regexp subject) whole-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
182 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
183 (defun rmail-message-subject-p (msg subject &optional whole-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
184 (if whole-message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
185 (rmail-apply-in-message msg 're-search-forward subject nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
186 (string-match subject (rmail-simplified-subject msg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
187 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
188 ;;;###autoload |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
189 (defun rmail-summary-by-senders (senders) |
102374
8e96a66e8df3
(rmail-summary-by-senders): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102367
diff
changeset
|
190 "Display a summary of all messages whose \"From\" field matches SENDERS. |
8e96a66e8df3
(rmail-summary-by-senders): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102367
diff
changeset
|
191 SENDERS is a string of regexps separated by commas." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
192 (interactive "sSenders to summarize by: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
193 (rmail-new-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
194 (concat "senders " senders) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
195 (list 'rmail-summary-by-senders senders) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
196 'rmail-message-senders-p |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
197 (mail-comma-list-regexp senders))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
198 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
199 (defun rmail-message-senders-p (msg senders) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
200 (string-match senders (or (rmail-get-header "From" msg) ""))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
201 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
202 ;; General making of a summary buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
203 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
204 (defvar rmail-summary-symbol-number 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
205 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
206 (defvar rmail-new-summary-line-count) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
207 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
208 (defun rmail-new-summary (desc redo func &rest args) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
209 "Create a summary of selected messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
210 DESC makes part of the mode line of the summary buffer. REDO is form ... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
211 For each message, FUNC is applied to the message number and ARGS... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
212 and if the result is non-nil, that message is included. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
213 nil for FUNCTION means all messages." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
214 (message "Computing summary lines...") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
215 (unless rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
216 (error "No RMAIL buffer found")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
217 (let (mesg was-in-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
218 (if (eq major-mode 'rmail-summary-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
219 (setq was-in-summary t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
220 (with-current-buffer rmail-buffer |
101701
ba9c16ff3497
(rmail-new-summary): Don't try to summarize an empty folder.
Glenn Morris <rgm@gnu.org>
parents:
101666
diff
changeset
|
221 (if (zerop (setq mesg rmail-current-message)) |
ba9c16ff3497
(rmail-new-summary): Don't try to summarize an empty folder.
Glenn Morris <rgm@gnu.org>
parents:
101666
diff
changeset
|
222 (error "No messages to summarize")) |
ba9c16ff3497
(rmail-new-summary): Don't try to summarize an empty folder.
Glenn Morris <rgm@gnu.org>
parents:
101666
diff
changeset
|
223 (setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
224 ;; Now display the summary buffer and go to the right place in it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
225 (unless was-in-summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
226 (if (and (one-window-p) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
227 pop-up-windows |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
228 (not pop-up-frames)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
229 ;; If there is just one window, put the summary on the top. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
230 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
231 (split-window (selected-window) rmail-summary-window-size) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
232 (select-window (next-window (frame-first-window))) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
233 (rmail-pop-to-buffer rmail-summary-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
234 ;; If pop-to-buffer did not use that window, delete that |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
235 ;; window. (This can happen if it uses another frame.) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
236 (if (not (eq rmail-summary-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
237 (window-buffer (frame-first-window)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
238 (delete-other-windows))) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
239 (rmail-pop-to-buffer rmail-summary-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
240 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
241 ;; This is how rmail makes the summary buffer reappear. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
242 ;; We do this here to make the window the proper size. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
243 (rmail-select-summary nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
244 (set-buffer rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
245 (rmail-summary-goto-msg mesg t t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
246 (rmail-summary-construct-io-menu) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
247 (message "Computing summary lines...done"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
248 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
249 (defun rmail-new-summary-1 (description form function args) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
250 "Filter messages to obtain summary lines. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
251 DESCRIPTION is added to the mode line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
252 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
253 Return the summary buffer by invoking FUNCTION on each message |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
254 passing the message number and ARGS... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
255 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
256 REDO is a form ... |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
257 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
258 The current buffer must be a Rmail buffer either containing a |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
259 collection of mbox formatted messages or displaying a single |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
260 message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
261 (let ((summary-msgs ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
262 (rmail-new-summary-line-count 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
263 (sumbuf (rmail-get-create-summary-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
264 ;; Scan the messages, getting their summary strings |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
265 ;; and putting the list of them in SUMMARY-MSGS. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
266 (let ((msgnum 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
267 (main-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
268 (total rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
269 (inhibit-read-only t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
270 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
271 ;; Go where the mbox text is. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
272 (if (rmail-buffers-swapped-p) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
273 (set-buffer rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
274 (let ((old-min (point-min-marker)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
275 (old-max (point-max-marker))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
276 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
277 ;; Can't use save-restriction here; that doesn't work if we |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
278 ;; plan to modify text outside the original restriction. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
279 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
280 (widen) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
281 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
282 (while (>= total msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
283 ;; Go back to the Rmail buffer so |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
284 ;; so FUNCTION and rmail-get-summary can see its local vars. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
285 (with-current-buffer main-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
286 ;; First test whether to include this message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
287 (if (or (null function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
288 (apply function msgnum args)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
289 (setq summary-msgs |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
290 (cons (cons msgnum (rmail-get-summary msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
291 summary-msgs)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
292 (setq msgnum (1+ msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
293 ;; Provide a periodic User progress message. |
102841
3ba455e0b28d
(rmail-new-summary-1): Don't show zero count of summary lines.
Eli Zaretskii <eliz@gnu.org>
parents:
102386
diff
changeset
|
294 (if (and (not (zerop rmail-new-summary-line-count)) |
3ba455e0b28d
(rmail-new-summary-1): Don't show zero count of summary lines.
Eli Zaretskii <eliz@gnu.org>
parents:
102386
diff
changeset
|
295 (zerop (% rmail-new-summary-line-count 10))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
296 (message "Computing summary lines...%d" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
297 rmail-new-summary-line-count))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
298 (setq summary-msgs (nreverse summary-msgs))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
299 (narrow-to-region old-min old-max))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
300 ;; Temporarily, while summary buffer is unfinished, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
301 ;; we "don't have" a summary. |
102113
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
302 (setq rmail-summary-buffer nil) |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
303 (unless summary-msgs |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
304 (kill-buffer sumbuf) |
73021f190218
(rmail-summary-by-topic): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102049
diff
changeset
|
305 (error "Nothing to summarize")) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
306 ;; I have not a clue what this clause is doing. If you read this |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
307 ;; chunk of code and have a clue, then please email that clue to |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
308 ;; pmr@pajato.com |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
309 (if rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
310 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
311 (setq rmail-summary-buffer nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
312 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
313 (let ((rbuf (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
314 (total rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
315 (set-buffer sumbuf) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
316 ;; Set up the summary buffer's contents. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
317 (let ((buffer-read-only nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
318 (erase-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
319 (while summary-msgs |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
320 (princ (cdr (car summary-msgs)) sumbuf) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
321 (setq summary-msgs (cdr summary-msgs))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
322 (goto-char (point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
323 ;; Set up the rest of its state and local variables. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
324 (setq buffer-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
325 (rmail-summary-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
326 (make-local-variable 'minor-mode-alist) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
327 (setq minor-mode-alist (list (list t (concat ": " description)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
328 (setq rmail-buffer rbuf |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
329 rmail-summary-redo form |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
330 rmail-total-messages total))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
331 sumbuf)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
332 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
333 (defun rmail-get-create-summary-buffer () |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
334 "Return the Rmail summary buffer. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
335 If necessary, it is created and undo is disabled." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
336 (if (and rmail-summary-buffer (buffer-name rmail-summary-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
337 rmail-summary-buffer |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
338 (let ((buff (generate-new-buffer (concat (buffer-name) "-summary")))) |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
339 (with-current-buffer buff |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
340 (setq buffer-undo-list t)) |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
341 buff))) |
101537
d15ac066761b
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101535
diff
changeset
|
342 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
343 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
344 ;; Low levels of generating a summary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
345 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
346 (defun rmail-get-summary (msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
347 "Return the summary line for message MSGNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
348 The mbox buffer must be current when you call this function |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
349 even if its text is swapped. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
350 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
351 If the message has a summary line already, it will be stored in |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
352 the message as a header and simply returned, otherwise the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
353 summary line is created, saved in the message header, cached and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
354 returned. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
355 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
356 The current buffer contains the unrestricted message collection." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
357 (let ((line (aref rmail-summary-vector (1- msgnum)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
358 (unless line |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
359 ;; Register a summary line for MSGNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
360 (setq rmail-new-summary-line-count (1+ rmail-new-summary-line-count) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
361 line (rmail-create-summary-line msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
362 ;; Cache the summary line for use during this Rmail session. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
363 (aset rmail-summary-vector (1- msgnum) line)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
364 line)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
365 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
366 (defcustom rmail-summary-line-decoder (function identity) |
101537
d15ac066761b
Remove leading `*' from defcustom docs.
Glenn Morris <rgm@gnu.org>
parents:
101535
diff
changeset
|
367 "Function to decode a Rmail summary line. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
368 It receives the summary line for one message as a string |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
369 and should return the decoded string. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
370 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
371 By default, it is `identity', which returns the string unaltered." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
372 :type 'function |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
373 :group 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
374 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
375 (defun rmail-create-summary-line (msgnum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
376 "Return the summary line for message MSGNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
377 Obtain the message summary from the header if it is available |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
378 otherwise create it and store it in the message header. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
379 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
380 The mbox buffer must be current when you call this function |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
381 even if its text is swapped." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
382 (let ((beg (rmail-msgbeg msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
383 (end (rmail-msgend msgnum)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
384 (deleted (rmail-message-deleted-p msgnum)) |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
385 ;; Does not work (swapped?) |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
386 ;;; (unseen (rmail-message-unseen-p msgnum)) |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
387 unseen lines) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
388 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
389 ;; Switch to the buffer that has the whole mbox text. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
390 (if (rmail-buffers-swapped-p) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
391 (set-buffer rmail-view-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
392 ;; Now we can compute the line count. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
393 (if rmail-summary-line-count-flag |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
394 (setq lines (count-lines beg end))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
395 ;; Narrow to the message header. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
396 (save-excursion |
101841
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
397 (save-restriction |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
398 (widen) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
399 (goto-char beg) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
400 (if (search-forward "\n\n" end t) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
401 (progn |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
402 (narrow-to-region beg (point)) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
403 ;; Replace rmail-message-unseen-p from above. |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
404 (goto-char beg) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
405 (setq unseen (and (search-forward |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
406 (concat rmail-attribute-header ": ") nil t) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
407 (looking-at "......U"))) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
408 ;; Generate a status line from the message. |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
409 (rmail-create-summary msgnum deleted unseen lines)) |
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
410 (rmail-error-bad-format msgnum))))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
411 |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
412 ;; FIXME this is now unused. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
413 ;; The intention was to display in the summary something like {E} |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
414 ;; for an edited messaged, similarly for answered, etc. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
415 ;; But that conflicts with the previous rmail usage, where |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
416 ;; any user-defined { labels } occupied this space. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
417 ;; So whilst it would be nice to have this information in the summary, |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
418 ;; it would need to go somewhere else. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
419 (defun rmail-get-summary-status () |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
420 "Return a coded string wrapped in curly braces denoting the status. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
421 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
422 The current buffer must already be narrowed to the message headers for |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
423 the message being processed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
424 (let ((status (mail-fetch-field rmail-attribute-header)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
425 (index 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
426 (result "") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
427 char) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
428 ;; Strip off the read/unread and the deleted attribute which are |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
429 ;; handled separately. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
430 (setq status |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
431 (if status |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
432 (concat (substring status 0 1) (substring status 2 6)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
433 "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
434 (while (< index (length status)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
435 (unless (string= "-" (setq char (substring status index (1+ index)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
436 (setq result (concat result char))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
437 (setq index (1+ index))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
438 (when (> (length result) 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
439 (setq result (concat "{" result "}"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
440 result)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
441 |
101950
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
442 (autoload 'rmail-make-label "rmailkwd") |
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
443 |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
444 (defun rmail-get-summary-labels () |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
445 "Return a string wrapped in curly braces with the current message labels. |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
446 Returns nil if there are no labels. The current buffer must |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
447 already be narrowed to the message headers for the message being |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
448 processed." |
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
449 (let ((labels (mail-fetch-field rmail-keyword-header))) |
101767
4958df99b14c
(rmail-get-summary-labels): Treat empty labels as null.
Glenn Morris <rgm@gnu.org>
parents:
101701
diff
changeset
|
450 (and labels |
4958df99b14c
(rmail-get-summary-labels): Treat empty labels as null.
Glenn Morris <rgm@gnu.org>
parents:
101701
diff
changeset
|
451 (not (string-equal labels "")) |
101950
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
452 (progn |
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
453 ;; Intern so that rmail-read-label can offer completion. |
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
454 (mapc 'rmail-make-label (split-string labels ", ")) |
01bb1ca54bd5
(rmail-get-summary-labels): Store any message labels for use in
Glenn Morris <rgm@gnu.org>
parents:
101841
diff
changeset
|
455 (format "{ %s } " labels))))) |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
456 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
457 (defun rmail-create-summary (msgnum deleted unseen lines) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
458 "Return the summary line for message MSGNUM. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
459 The current buffer should already be narrowed to the header for that message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
460 It could be either buffer, so don't access Rmail local variables. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
461 DELETED is t if this message is marked deleted. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
462 UNSEEN is t if it is marked unseen. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
463 LINES is the number of lines in the message (if we should display that) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
464 or else nil." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
465 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
466 (let ((line (rmail-header-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
467 (labels (rmail-get-summary-labels)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
468 pos status prefix basic-start basic-end linecount-string) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
469 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
470 (setq linecount-string |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
471 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
472 ((not lines) " ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
473 ((<= lines 9) (format " [%d]" lines)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
474 ((<= lines 99) (format " [%d]" lines)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
475 ((<= lines 999) (format " [%d]" lines)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
476 ((<= lines 9999) (format " [%dk]" (/ lines 1000))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
477 ((<= lines 99999) (format " [%dk]" (/ lines 1000))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
478 (t (format "[%dk]" (/ lines 1000))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
479 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
480 (setq status (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
481 (deleted ?D) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
482 (unseen ?-) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
483 (t ? )) |
101594
76012a3bc99d
(rmail-message-recipients-p-1): Don't bother
Glenn Morris <rgm@gnu.org>
parents:
101537
diff
changeset
|
484 prefix (format "%5d%c " msgnum status) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
485 basic-start (car line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
486 basic-end (cadr line)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
487 (funcall rmail-summary-line-decoder |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
488 (concat prefix basic-start linecount-string " " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
489 labels basic-end)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
490 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
491 (defun rmail-header-summary () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
492 "Return a message summary based on the message headers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
493 The value is a list of two strings, the first and second parts of the summary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
494 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
495 The current buffer must already be narrowed to the message headers for |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
496 the message being processed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
497 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
498 (list |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
499 (concat (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
500 (if (not (re-search-forward "^Date:" nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
501 " " |
104119
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
502 ;; Match month names case-insensitively |
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
503 (cond ((let ((case-fold-search t)) |
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
504 (re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)" |
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
505 (line-end-position) t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
506 (format "%2d-%3s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
507 (string-to-number (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
508 (match-beginning 2) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
509 (match-end 2))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
510 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
511 (match-beginning 4) (match-end 4)))) |
104119
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
512 ((let ((case-fold-search t)) |
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
513 (re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)" |
276df8a4316b
(rmail-header-summary): Ignore letter-case of month names. (Bug#3987)
Eli Zaretskii <eliz@gnu.org>
parents:
102841
diff
changeset
|
514 (line-end-position) t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
515 (format "%2d-%3s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
516 (string-to-number (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
517 (match-beginning 4) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
518 (match-end 4))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
519 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
520 (match-beginning 2) (match-end 2)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
521 ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)" |
101666
4c9b7acbd8b4
(rmail-header-summary): Use line-end-position.
Glenn Morris <rgm@gnu.org>
parents:
101662
diff
changeset
|
522 (line-end-position) t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
523 (format "%2s%2s%2s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
524 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
525 (match-beginning 2) (match-end 2)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
526 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
527 (match-beginning 3) (match-end 3)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
528 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
529 (match-beginning 4) (match-end 4)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
530 (t "??????")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
531 " " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
532 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
533 (let* ((from (and (re-search-forward "^From:[ \t]*" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
534 (mail-strip-quoted-names |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
535 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
536 (1- (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
537 ;; Get all the lines of the From field |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
538 ;; so that we get a whole comment if there is one, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
539 ;; so that mail-strip-quoted-names can discard it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
540 (let ((opoint (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
541 (while (progn (forward-line 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
542 (looking-at "[ \t]"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
543 ;; Back up over newline, then trailing spaces or tabs |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
544 (forward-char -1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
545 (skip-chars-backward " \t") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
546 (point)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
547 len mch lo) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
548 (if (or (null from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
549 (string-match |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
550 (or rmail-user-mail-address-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
551 (concat "^\\(" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
552 (regexp-quote (user-login-name)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
553 "\\($\\|@\\)\\|" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
554 (regexp-quote |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
555 ;; Don't lose if run from init file |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
556 ;; where user-mail-address is not |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
557 ;; set yet. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
558 (or user-mail-address |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
559 (concat (user-login-name) "@" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
560 (or mail-host-address |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
561 (system-name))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
562 "\\>\\)")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
563 from)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
564 ;; No From field, or it's this user. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
565 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
566 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
567 (if (not (re-search-forward "^To:[ \t]*" nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
568 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
569 (setq from |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
570 (concat "to: " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
571 (mail-strip-quoted-names |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
572 (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
573 (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
574 (progn (end-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
575 (skip-chars-backward " \t") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
576 (point))))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
577 (if (null from) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
578 " " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
579 (setq len (length from)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
580 (setq mch (string-match "[@%]" from)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
581 (format "%25s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
582 (if (or (not mch) (<= len 25)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
583 (substring from (max 0 (- len 25))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
584 (substring from |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
585 (setq lo (cond ((< (- mch 14) 0) 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
586 ((< len (+ mch 11)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
587 (- len 25)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
588 (t (- mch 14)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
589 (min len (+ lo 25))))))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
590 (concat (if (re-search-forward "^Subject:" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
591 (progn (skip-chars-forward " \t") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
592 (buffer-substring (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
593 (progn (end-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
594 (point)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
595 (re-search-forward "[\n][\n]+" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
596 (buffer-substring (point) (progn (end-of-line) (point)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
597 "\n"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
598 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
599 ;; Simple motion in a summary buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
600 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
601 (defun rmail-summary-next-all (&optional number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
602 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
603 (forward-line (if number number 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
604 ;; It doesn't look nice to move forward past the last message line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
605 (and (eobp) (> number 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
606 (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
607 (display-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
608 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
609 (defun rmail-summary-previous-all (&optional number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
610 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
611 (forward-line (- (if number number 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
612 ;; It doesn't look nice to move forward past the last message line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
613 (and (eobp) (< number 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
614 (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
615 (display-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
616 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
617 (defun rmail-summary-next-msg (&optional number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
618 "Display next non-deleted msg from rmail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
619 With optional prefix argument NUMBER, moves forward this number of non-deleted |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
620 messages, or backward if NUMBER is negative." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
621 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
622 (forward-line 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
623 (and (> number 0) (end-of-line)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
624 (let ((count (if (< number 0) (- number) number)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
625 (search (if (> number 0) 're-search-forward 're-search-backward)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
626 (non-del-msg-found nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
627 (while (and (> count 0) (setq non-del-msg-found |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
628 (or (funcall search "^.....[^D]" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
629 non-del-msg-found))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
630 (setq count (1- count)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
631 (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
632 (display-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
633 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
634 (defun rmail-summary-previous-msg (&optional number) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
635 "Display previous non-deleted msg from rmail file. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
636 With optional prefix argument NUMBER, moves backward this number of |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
637 non-deleted messages." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
638 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
639 (rmail-summary-next-msg (- (if number number 1)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
640 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
641 (defun rmail-summary-next-labeled-message (n labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
642 "Show next message with LABELS. Defaults to last labels used. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
643 With prefix argument N moves forward N messages with these labels." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
644 (interactive "p\nsMove to next msg with labels: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
645 (let (msg) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
646 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
647 (rmail-next-labeled-message n labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
648 (setq msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
649 (rmail-summary-goto-msg msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
650 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
651 (defun rmail-summary-previous-labeled-message (n labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
652 "Show previous message with LABELS. Defaults to last labels used. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
653 With prefix argument N moves backward N messages with these labels." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
654 (interactive "p\nsMove to previous msg with labels: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
655 (let (msg) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
656 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
657 (rmail-previous-labeled-message n labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
658 (setq msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
659 (rmail-summary-goto-msg msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
660 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
661 (defun rmail-summary-next-same-subject (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
662 "Go to the next message in the summary having the same subject. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
663 With prefix argument N, do this N times. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
664 If N is negative, go backwards." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
665 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
666 (let ((forward (> n 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
667 subject i found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
668 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
669 (setq subject (rmail-simplified-subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
670 i rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
671 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
672 (while (and (/= n 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
673 (if forward |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
674 (not (eobp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
675 (not (bobp)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
676 (let (done) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
677 (while (and (not done) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
678 (if forward |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
679 (not (eobp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
680 (not (bobp)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
681 ;; Advance thru summary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
682 (forward-line (if forward 1 -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
683 ;; Get msg number of this line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
684 (setq i (string-to-number |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
685 (buffer-substring (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
686 (min (point-max) (+ 6 (point)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
687 (setq done (string-equal subject (rmail-simplified-subject i)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
688 (if done (setq found i))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
689 (setq n (if forward (1- n) (1+ n))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
690 (if found |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
691 (rmail-summary-goto-msg found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
692 (error "No %s message with same subject" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
693 (if forward "following" "previous"))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
694 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
695 (defun rmail-summary-previous-same-subject (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
696 "Go to the previous message in the summary having the same subject. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
697 With prefix argument N, do this N times. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
698 If N is negative, go forwards instead." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
699 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
700 (rmail-summary-next-same-subject (- n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
701 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
702 ;; Delete and undelete summary commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
703 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
704 (defun rmail-summary-delete-forward (&optional count) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
705 "Delete this message and move to next nondeleted one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
706 Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
707 A prefix argument serves as a repeat count; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
708 a negative argument means to delete and move backward." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
709 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
710 (unless (numberp count) (setq count 1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
711 (let (end del-msg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
712 (backward (< count 0))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
713 (while (/= count 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
714 (rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
715 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
716 (rmail-delete-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
717 (setq del-msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
718 (rmail-summary-mark-deleted del-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
719 (while (and (not (if backward (bobp) (eobp))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
720 (save-excursion (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
721 (looking-at " *[0-9]+D"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
722 (forward-line (if backward -1 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
723 ;; It looks ugly to move to the empty line at end of buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
724 (and (eobp) (not backward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
725 (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
726 (setq count |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
727 (if (> count 0) (1- count) (1+ count)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
728 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
729 (defun rmail-summary-delete-backward (&optional count) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
730 "Delete this message and move to previous nondeleted one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
731 Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
732 A prefix argument serves as a repeat count; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
733 a negative argument means to delete and move forward." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
734 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
735 (rmail-summary-delete-forward (- count))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
736 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
737 (defun rmail-summary-mark-deleted (&optional n undel) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
738 ;; Since third arg is t, this only alters the summary, not the Rmail buf. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
739 (and n (rmail-summary-goto-msg n t t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
740 (or (eobp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
741 (not (overlay-get rmail-summary-overlay 'face)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
742 (let ((buffer-read-only nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
743 (skip-chars-forward " ") |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
744 (skip-chars-forward "0-9") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
745 (if undel |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
746 (if (looking-at "D") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
747 (progn (delete-char 1) (insert " "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
748 (delete-char 1) |
101533
4f4419bca239
(rmail-summary-mark-deleted): Recache summary.
Chong Yidong <cyd@stupidchicken.com>
parents:
101416
diff
changeset
|
749 (insert "D")) |
4f4419bca239
(rmail-summary-mark-deleted): Recache summary.
Chong Yidong <cyd@stupidchicken.com>
parents:
101416
diff
changeset
|
750 ;; Register a new summary line. |
4f4419bca239
(rmail-summary-mark-deleted): Recache summary.
Chong Yidong <cyd@stupidchicken.com>
parents:
101416
diff
changeset
|
751 (with-current-buffer rmail-buffer |
4f4419bca239
(rmail-summary-mark-deleted): Recache summary.
Chong Yidong <cyd@stupidchicken.com>
parents:
101416
diff
changeset
|
752 (aset rmail-summary-vector (1- n) (rmail-create-summary-line n))))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
753 (beginning-of-line)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
754 |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
755 (defun rmail-summary-update-line (n) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
756 "Update the summary line for message N." |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
757 (when (rmail-summary-goto-msg n t t) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
758 (let* ((buffer-read-only nil) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
759 (start (line-beginning-position)) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
760 (end (line-beginning-position 2)) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
761 (overlays (overlays-in start end)) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
762 high ov) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
763 (while (and (setq ov (car overlays)) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
764 (not (setq high (overlay-get ov 'rmail-summary)))) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
765 (setq overlays (cdr overlays))) |
101662
e18d6fe1381d
(rmail-summary-update-line): Replace duplicate line-beginning-position calls.
Glenn Morris <rgm@gnu.org>
parents:
101630
diff
changeset
|
766 (delete-region start end) |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
767 (princ |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
768 (with-current-buffer rmail-buffer |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
769 (aset rmail-summary-vector (1- n) (rmail-create-summary-line n))) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
770 (current-buffer)) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
771 (when high |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
772 (forward-line -1) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
773 (rmail-summary-update-highlight nil))))) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
774 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
775 (defun rmail-summary-mark-undeleted (n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
776 (rmail-summary-mark-deleted n t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
777 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
778 (defun rmail-summary-deleted-p (&optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
779 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
780 (and n (rmail-summary-goto-msg n nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
781 (skip-chars-forward " ") |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
782 (skip-chars-forward "0-9") |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
783 (looking-at "D"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
784 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
785 (defun rmail-summary-undelete (&optional arg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
786 "Undelete current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
787 Optional prefix ARG means undelete ARG previous messages." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
788 (interactive "p") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
789 (if (/= arg 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
790 (rmail-summary-undelete-many arg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
791 (let ((buffer-read-only nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
792 (opoint (point))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
793 (end-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
794 (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
795 (replace-match "\\1 ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
796 (rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
797 (if rmail-enable-mime |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
798 (set-buffer rmail-buffer) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
799 (rmail-pop-to-buffer rmail-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
800 (and (rmail-message-deleted-p rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
801 (rmail-undelete-previous-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
802 (if rmail-enable-mime |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
803 (rmail-pop-to-buffer rmail-buffer)) |
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
804 (rmail-pop-to-buffer rmail-summary-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
805 (t (goto-char opoint)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
806 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
807 (defun rmail-summary-undelete-many (&optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
808 "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
809 (interactive "P") |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
810 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
811 (let* ((init-msg (if n rmail-current-message rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
812 (rmail-current-message init-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
813 (n (or n rmail-total-messages)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
814 (msgs-undeled 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
815 (while (and (> rmail-current-message 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
816 (< msgs-undeled n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
817 (if (rmail-message-deleted-p rmail-current-message) |
101841
2790fb0a9245
(rmail-create-summary-line): Widen the view buffer
Glenn Morris <rgm@gnu.org>
parents:
101767
diff
changeset
|
818 (progn (rmail-set-attribute rmail-deleted-attr-index nil) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
819 (setq msgs-undeled (1+ msgs-undeled)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
820 (setq rmail-current-message (1- rmail-current-message))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
821 (set-buffer rmail-summary-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
822 (setq rmail-current-message init-msg msgs-undeled 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
823 (while (and (> rmail-current-message 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
824 (< msgs-undeled n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
825 (if (rmail-summary-deleted-p rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
826 (progn (rmail-summary-mark-undeleted rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
827 (setq msgs-undeled (1+ msgs-undeled)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
828 (setq rmail-current-message (1- rmail-current-message)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
829 (rmail-summary-goto-msg))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
830 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
831 ;; Rmail Summary mode is suitable only for specially formatted data. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
832 (put 'rmail-summary-mode 'mode-class 'special) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
833 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
834 (defun rmail-summary-mode () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
835 "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary]. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
836 As commands are issued in the summary buffer, they are applied to the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
837 corresponding mail messages in the rmail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
838 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
839 All normal editing commands are turned off. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
840 Instead, nearly all the Rmail mode commands are available, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
841 though many of them move only among the messages in the summary. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
842 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
843 These additional commands exist: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
844 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
845 \\[rmail-summary-undelete-many] Undelete all or prefix arg deleted messages. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
846 \\[rmail-summary-wipe] Delete the summary and go to the Rmail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
847 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
848 Commands for sorting the summary: |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
849 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
850 \\[rmail-summary-sort-by-date] Sort by date. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
851 \\[rmail-summary-sort-by-subject] Sort by subject. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
852 \\[rmail-summary-sort-by-author] Sort by author. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
853 \\[rmail-summary-sort-by-recipient] Sort by recipient. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
854 \\[rmail-summary-sort-by-correspondent] Sort by correspondent. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
855 \\[rmail-summary-sort-by-lines] Sort by lines. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
856 \\[rmail-summary-sort-by-labels] Sort by labels." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
857 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
858 (kill-all-local-variables) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
859 (setq major-mode 'rmail-summary-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
860 (setq mode-name "RMAIL Summary") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
861 (setq truncate-lines t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
862 (setq buffer-read-only t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
863 (set-syntax-table text-mode-syntax-table) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
864 (make-local-variable 'rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
865 (make-local-variable 'rmail-total-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
866 (make-local-variable 'rmail-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
867 (setq rmail-current-message nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
868 (make-local-variable 'rmail-summary-redo) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
869 (setq rmail-summary-redo nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
870 (make-local-variable 'revert-buffer-function) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
871 (make-local-variable 'font-lock-defaults) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
872 (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
873 (rmail-summary-enable) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
874 (run-mode-hooks 'rmail-summary-mode-hook)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
875 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
876 ;; Summary features need to be disabled during edit mode. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
877 (defun rmail-summary-disable () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
878 (use-local-map text-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
879 (remove-hook 'post-command-hook 'rmail-summary-rmail-update t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
880 (setq revert-buffer-function nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
881 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
882 (defun rmail-summary-enable () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
883 (use-local-map rmail-summary-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
884 (add-hook 'post-command-hook 'rmail-summary-rmail-update nil t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
885 (setq revert-buffer-function 'rmail-update-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
886 |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
887 (defun rmail-summary-mark-seen (n &optional nomove unseen) |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
888 "Remove the unseen mark from the current message, update the summary vector. |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
889 N is the number of the current message. Optional argument NOMOVE |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
890 non-nil means we are already at the right column. Optional argument |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
891 UNSEEN non-nil means mark the message as unseen." |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
892 (save-excursion |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
893 (unless nomove |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
894 (beginning-of-line) |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
895 (skip-chars-forward " ") |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
896 (skip-chars-forward "0-9")) |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
897 (when (char-equal (following-char) (if unseen ?\s ?-)) |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
898 (let ((buffer-read-only nil)) |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
899 (delete-char 1) |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
900 (insert (if unseen "-" " "))) |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
901 (let ((line (buffer-substring-no-properties (line-beginning-position) |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
902 (line-beginning-position 2)))) |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
903 (with-current-buffer rmail-buffer |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
904 (aset rmail-summary-vector (1- n) line)))))) |
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
905 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
906 (defvar rmail-summary-put-back-unseen nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
907 "Used for communicating between calls to `rmail-summary-rmail-update'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
908 If it moves to a message within an Incremental Search, and removes |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
909 the `unseen' attribute from that message, it sets this flag |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
910 so that if the next motion between messages is in the same Incremental |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
911 Search, the `unseen' attribute is restored.") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
912 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
913 ;; Show in Rmail the message described by the summary line that point is on, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
914 ;; but only if the Rmail buffer is already visible. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
915 ;; This is a post-command-hook in summary buffers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
916 (defun rmail-summary-rmail-update () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
917 (let (buffer-read-only) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
918 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
919 ;; If at end of buffer, pretend we are on the last text line. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
920 (if (eobp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
921 (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
922 (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
923 (skip-chars-forward " ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
924 (let ((msg-num (string-to-number (buffer-substring |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
925 (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
926 (progn (skip-chars-forward "0-9") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
927 (point)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
928 ;; Always leave `unseen' removed |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
929 ;; if we get out of isearch mode. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
930 ;; Don't let a subsequent isearch restore that `unseen'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
931 (if (not isearch-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
932 (setq rmail-summary-put-back-unseen nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
933 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
934 (or (eq rmail-current-message msg-num) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
935 (let ((window (get-buffer-window rmail-buffer t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
936 (owin (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
937 (if isearch-mode |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
938 (progn |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
939 ;; If we first saw the previous message in this search, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
940 ;; and we have gone to a different message while searching, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
941 ;; put back `unseen' on the former one. |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
942 (when rmail-summary-put-back-unseen |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
943 (rmail-set-attribute rmail-unseen-attr-index t |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
944 rmail-current-message) |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
945 (save-excursion |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
946 (goto-char rmail-summary-put-back-unseen) |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
947 (rmail-summary-mark-seen rmail-current-message t t))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
948 ;; Arrange to do that later, for the new current message, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
949 ;; if it still has `unseen'. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
950 (setq rmail-summary-put-back-unseen |
102282
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
951 (if (rmail-message-unseen-p msg-num) |
a0415be90111
(rmail-summary-mark-seen): Add option to mark as unseen.
Glenn Morris <rgm@gnu.org>
parents:
102280
diff
changeset
|
952 (point)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
953 (setq rmail-summary-put-back-unseen nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
954 ;; Go to the desired message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
955 (setq rmail-current-message msg-num) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
956 ;; Update the summary to show the message has been seen. |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
957 (rmail-summary-mark-seen msg-num t) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
958 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
959 ;; Using save-window-excursion would cause the new value |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
960 ;; of point to get lost. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
961 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
962 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
963 (select-window window) |
101995
8240a7c5e099
Update for rmail-show-message-maybe name change.
Glenn Morris <rgm@gnu.org>
parents:
101990
diff
changeset
|
964 (rmail-show-message msg-num t)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
965 (select-window owin)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
966 (if (buffer-name rmail-buffer) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
967 (with-current-buffer rmail-buffer |
105888
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
968 (rmail-show-message msg-num t)))) |
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
969 ;; In linum mode, the message buffer must be specially |
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
970 ;; updated (Bug#4878). |
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
971 (and (fboundp 'linum-update) |
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
972 (buffer-name rmail-buffer) |
de6b45f6c427
* mail/rmailsum.el (rmail-summary-rmail-update): Call linum-update
Chong Yidong <cyd@stupidchicken.com>
parents:
105829
diff
changeset
|
973 (linum-update rmail-buffer)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
974 (rmail-summary-update-highlight nil))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
975 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
976 (defun rmail-summary-save-buffer () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
977 "Save the buffer associated with this RMAIL summary." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
978 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
979 (save-window-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
980 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
981 (switch-to-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
982 (save-buffer)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
983 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
984 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
985 (if rmail-summary-mode-map |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
986 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
987 (setq rmail-summary-mode-map (make-keymap)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
988 (suppress-keymap rmail-summary-mode-map) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
989 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
990 (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
991 (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
992 (define-key rmail-summary-mode-map "b" 'rmail-summary-bury) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
993 (define-key rmail-summary-mode-map "c" 'rmail-summary-continue) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
994 (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
995 (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
996 (define-key rmail-summary-mode-map "e" 'rmail-summary-edit-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
997 (define-key rmail-summary-mode-map "f" 'rmail-summary-forward) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
998 (define-key rmail-summary-mode-map "g" 'rmail-summary-get-new-mail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
999 (define-key rmail-summary-mode-map "h" 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1000 (define-key rmail-summary-mode-map "i" 'rmail-summary-input) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1001 (define-key rmail-summary-mode-map "j" 'rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1002 (define-key rmail-summary-mode-map "\C-m" 'rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1003 (define-key rmail-summary-mode-map "k" 'rmail-summary-kill-label) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1004 (define-key rmail-summary-mode-map "l" 'rmail-summary-by-labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1005 (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1006 (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1007 (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1008 (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp) |
102374
8e96a66e8df3
(rmail-summary-by-senders): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102367
diff
changeset
|
1009 ;; `f' for "from". |
8e96a66e8df3
(rmail-summary-by-senders): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102367
diff
changeset
|
1010 (define-key rmail-summary-mode-map "\e\C-f" 'rmail-summary-by-senders) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1011 (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1012 (define-key rmail-summary-mode-map "m" 'rmail-summary-mail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1013 (define-key rmail-summary-mode-map "\M-m" 'rmail-summary-retry-failure) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1014 (define-key rmail-summary-mode-map "n" 'rmail-summary-next-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1015 (define-key rmail-summary-mode-map "\en" 'rmail-summary-next-all) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1016 (define-key rmail-summary-mode-map "\e\C-n" 'rmail-summary-next-labeled-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1017 (define-key rmail-summary-mode-map "o" 'rmail-summary-output) |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
1018 (define-key rmail-summary-mode-map "\C-o" 'rmail-summary-output-as-seen) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1019 (define-key rmail-summary-mode-map "p" 'rmail-summary-previous-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1020 (define-key rmail-summary-mode-map "\ep" 'rmail-summary-previous-all) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1021 (define-key rmail-summary-mode-map "\e\C-p" 'rmail-summary-previous-labeled-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1022 (define-key rmail-summary-mode-map "q" 'rmail-summary-quit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1023 (define-key rmail-summary-mode-map "Q" 'rmail-summary-wipe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1024 (define-key rmail-summary-mode-map "r" 'rmail-summary-reply) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1025 (define-key rmail-summary-mode-map "s" 'rmail-summary-expunge-and-save) |
102375
6a06f943ee6d
(rmail-summary-search): Ensure the selected message shows.
Glenn Morris <rgm@gnu.org>
parents:
102374
diff
changeset
|
1026 ;; See rms's comment in rmail.el |
6a06f943ee6d
(rmail-summary-search): Ensure the selected message shows.
Glenn Morris <rgm@gnu.org>
parents:
102374
diff
changeset
|
1027 ;;; (define-key rmail-summary-mode-map "\er" 'rmail-summary-search-backward) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1028 (define-key rmail-summary-mode-map "\es" 'rmail-summary-search) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1029 (define-key rmail-summary-mode-map "t" 'rmail-summary-toggle-header) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1030 (define-key rmail-summary-mode-map "u" 'rmail-summary-undelete) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1031 (define-key rmail-summary-mode-map "\M-u" 'rmail-summary-undelete-many) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1032 (define-key rmail-summary-mode-map "x" 'rmail-summary-expunge) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1033 (define-key rmail-summary-mode-map "w" 'rmail-summary-output-body) |
102316
752b3f4e7686
(rmail-summary-mode-map): Bind rmail-mime to `v'.
Glenn Morris <rgm@gnu.org>
parents:
102282
diff
changeset
|
1034 (define-key rmail-summary-mode-map "v" 'rmail-mime) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1035 (define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1036 (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1037 (define-key rmail-summary-mode-map "<" 'rmail-summary-first-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1038 (define-key rmail-summary-mode-map ">" 'rmail-summary-last-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1039 (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1040 (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1041 (define-key rmail-summary-mode-map "?" 'describe-mode) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1042 (define-key rmail-summary-mode-map "\C-c\C-n" 'rmail-summary-next-same-subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1043 (define-key rmail-summary-mode-map "\C-c\C-p" 'rmail-summary-previous-same-subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1044 (define-key rmail-summary-mode-map "\C-c\C-s\C-d" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1045 'rmail-summary-sort-by-date) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1046 (define-key rmail-summary-mode-map "\C-c\C-s\C-s" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1047 'rmail-summary-sort-by-subject) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1048 (define-key rmail-summary-mode-map "\C-c\C-s\C-a" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1049 'rmail-summary-sort-by-author) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1050 (define-key rmail-summary-mode-map "\C-c\C-s\C-r" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1051 'rmail-summary-sort-by-recipient) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1052 (define-key rmail-summary-mode-map "\C-c\C-s\C-c" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1053 'rmail-summary-sort-by-correspondent) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1054 (define-key rmail-summary-mode-map "\C-c\C-s\C-l" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1055 'rmail-summary-sort-by-lines) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1056 (define-key rmail-summary-mode-map "\C-c\C-s\C-k" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1057 'rmail-summary-sort-by-labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1058 (define-key rmail-summary-mode-map "\C-x\C-s" 'rmail-summary-save-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1059 ) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1060 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1061 ;;; Menu bar bindings. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1062 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1063 (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1064 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1065 (define-key rmail-summary-mode-map [menu-bar classify] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1066 (cons "Classify" (make-sparse-keymap "Classify"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1067 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1068 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1069 '("Output (Rmail Menu)..." . rmail-summary-output-menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1070 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1071 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1072 '("Input Rmail File (menu)..." . rmail-input-menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1073 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1074 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1075 '(nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1076 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1077 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1078 '(nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1079 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1080 (define-key rmail-summary-mode-map [menu-bar classify output-body] |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
1081 '("Output body..." . rmail-summary-output-body)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1082 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1083 (define-key rmail-summary-mode-map [menu-bar classify output-inbox] |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
1084 '("Output..." . rmail-summary-output)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1085 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1086 (define-key rmail-summary-mode-map [menu-bar classify output] |
102367
ee6244c46da3
(rmail-summary-scroll-between-messages)
Glenn Morris <rgm@gnu.org>
parents:
102316
diff
changeset
|
1087 '("Output as seen..." . rmail-summary-output-as-seen)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1088 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1089 (define-key rmail-summary-mode-map [menu-bar classify kill-label] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1090 '("Kill Label..." . rmail-summary-kill-label)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1091 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1092 (define-key rmail-summary-mode-map [menu-bar classify add-label] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1093 '("Add Label..." . rmail-summary-add-label)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1094 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1095 (define-key rmail-summary-mode-map [menu-bar summary] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1096 (cons "Summary" (make-sparse-keymap "Summary"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1097 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1098 (define-key rmail-summary-mode-map [menu-bar summary senders] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1099 '("By Senders..." . rmail-summary-by-senders)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1100 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1101 (define-key rmail-summary-mode-map [menu-bar summary labels] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1102 '("By Labels..." . rmail-summary-by-labels)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1103 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1104 (define-key rmail-summary-mode-map [menu-bar summary recipients] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1105 '("By Recipients..." . rmail-summary-by-recipients)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1106 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1107 (define-key rmail-summary-mode-map [menu-bar summary topic] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1108 '("By Topic..." . rmail-summary-by-topic)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1109 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1110 (define-key rmail-summary-mode-map [menu-bar summary regexp] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1111 '("By Regexp..." . rmail-summary-by-regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1112 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1113 (define-key rmail-summary-mode-map [menu-bar summary all] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1114 '("All" . rmail-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1115 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1116 (define-key rmail-summary-mode-map [menu-bar mail] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1117 (cons "Mail" (make-sparse-keymap "Mail"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1118 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1119 (define-key rmail-summary-mode-map [menu-bar mail rmail-summary-get-new-mail] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1120 '("Get New Mail" . rmail-summary-get-new-mail)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1121 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1122 (define-key rmail-summary-mode-map [menu-bar mail lambda] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1123 '("----")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1124 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1125 (define-key rmail-summary-mode-map [menu-bar mail continue] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1126 '("Continue" . rmail-summary-continue)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1127 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1128 (define-key rmail-summary-mode-map [menu-bar mail resend] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1129 '("Re-send..." . rmail-summary-resend)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1130 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1131 (define-key rmail-summary-mode-map [menu-bar mail forward] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1132 '("Forward" . rmail-summary-forward)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1133 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1134 (define-key rmail-summary-mode-map [menu-bar mail retry] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1135 '("Retry" . rmail-summary-retry-failure)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1136 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1137 (define-key rmail-summary-mode-map [menu-bar mail reply] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1138 '("Reply" . rmail-summary-reply)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1139 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1140 (define-key rmail-summary-mode-map [menu-bar mail mail] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1141 '("Mail" . rmail-summary-mail)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1142 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1143 (define-key rmail-summary-mode-map [menu-bar delete] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1144 (cons "Delete" (make-sparse-keymap "Delete"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1145 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1146 (define-key rmail-summary-mode-map [menu-bar delete expunge/save] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1147 '("Expunge/Save" . rmail-summary-expunge-and-save)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1148 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1149 (define-key rmail-summary-mode-map [menu-bar delete expunge] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1150 '("Expunge" . rmail-summary-expunge)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1151 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1152 (define-key rmail-summary-mode-map [menu-bar delete undelete] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1153 '("Undelete" . rmail-summary-undelete)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1154 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1155 (define-key rmail-summary-mode-map [menu-bar delete delete] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1156 '("Delete" . rmail-summary-delete-forward)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1157 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1158 (define-key rmail-summary-mode-map [menu-bar move] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1159 (cons "Move" (make-sparse-keymap "Move"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1160 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1161 (define-key rmail-summary-mode-map [menu-bar move search-back] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1162 '("Search Back..." . rmail-summary-search-backward)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1163 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1164 (define-key rmail-summary-mode-map [menu-bar move search] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1165 '("Search..." . rmail-summary-search)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1166 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1167 (define-key rmail-summary-mode-map [menu-bar move previous] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1168 '("Previous Nondeleted" . rmail-summary-previous-msg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1169 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1170 (define-key rmail-summary-mode-map [menu-bar move next] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1171 '("Next Nondeleted" . rmail-summary-next-msg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1172 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1173 (define-key rmail-summary-mode-map [menu-bar move last] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1174 '("Last" . rmail-summary-last-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1175 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1176 (define-key rmail-summary-mode-map [menu-bar move first] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1177 '("First" . rmail-summary-first-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1178 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1179 (define-key rmail-summary-mode-map [menu-bar move previous] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1180 '("Previous" . rmail-summary-previous-all)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1181 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1182 (define-key rmail-summary-mode-map [menu-bar move next] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1183 '("Next" . rmail-summary-next-all)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1184 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1185 (defun rmail-summary-mouse-goto-message (event) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1186 "Select the message whose summary line you click on." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1187 (interactive "@e") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1188 (goto-char (posn-point (event-end event))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1189 (rmail-summary-goto-msg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1190 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1191 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1192 "Go to message N in the summary buffer and the Rmail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1193 If N is nil, use the message corresponding to point in the summary |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1194 and move to that message in the Rmail buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1195 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1196 If NOWARN, don't say anything if N is out of range. |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1197 If SKIP-RMAIL, don't do anything to the Rmail buffer. |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1198 Returns non-nil if message N was found." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1199 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1200 (if (consp n) (setq n (prefix-numeric-value n))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1201 (if (eobp) (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1202 (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1203 (let* ((obuf (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1204 (buf rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1205 (cur (point)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1206 message-not-found |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1207 (curmsg (string-to-number |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1208 (buffer-substring (point) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1209 (min (point-max) (+ 6 (point)))))) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1210 (total (with-current-buffer buf rmail-total-messages))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1211 ;; If message number N was specified, find that message's line |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1212 ;; or set message-not-found. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1213 ;; If N wasn't specified or that message can't be found. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1214 ;; set N by default. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1215 (if (not n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1216 (setq n curmsg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1217 (if (< n 1) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1218 (progn (message "No preceding message") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1219 (setq n 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1220 (if (and (> n total) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1221 (> total 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1222 (progn (message "No following message") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1223 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1224 (rmail-summary-goto-msg nil nowarn skip-rmail))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1225 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1226 (if (not (re-search-forward (format "^%5d[^0-9]" n) nil t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1227 (progn (or nowarn (message "Message %d not found" n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1228 (setq n curmsg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1229 (setq message-not-found t) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1230 (goto-char cur)))) |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
1231 (rmail-summary-mark-seen n) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1232 (rmail-summary-update-highlight message-not-found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1233 (beginning-of-line) |
101990
aaaaf30ab036
(msgnum): Remove declaration.
Glenn Morris <rgm@gnu.org>
parents:
101950
diff
changeset
|
1234 (unless skip-rmail |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1235 (let ((selwin (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1236 (unwind-protect |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1237 (progn (rmail-pop-to-buffer buf) |
101995
8240a7c5e099
Update for rmail-show-message-maybe name change.
Glenn Morris <rgm@gnu.org>
parents:
101990
diff
changeset
|
1238 (rmail-show-message n)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1239 (select-window selwin) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1240 ;; The actions above can alter the current buffer. Preserve it. |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1241 (set-buffer obuf)))) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1242 (not message-not-found))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1243 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1244 ;; Update the highlighted line in an rmail summary buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1245 ;; That should be current. We highlight the line point is on. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1246 ;; If NOT-FOUND is non-nil, we turn off highlighting. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1247 (defun rmail-summary-update-highlight (not-found) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1248 ;; Make sure we have an overlay to use. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1249 (or rmail-summary-overlay |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1250 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1251 (make-local-variable 'rmail-summary-overlay) |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1252 (setq rmail-summary-overlay (make-overlay (point) (point))) |
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1253 (overlay-put rmail-summary-overlay 'rmail-summary t))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1254 ;; If this message is in the summary, use the overlay to highlight it. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1255 ;; Otherwise, don't highlight anything. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1256 (if not-found |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1257 (overlay-put rmail-summary-overlay 'face nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1258 (move-overlay rmail-summary-overlay |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1259 (save-excursion (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1260 (skip-chars-forward " ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1261 (point)) |
101630
064248de0e1b
(rmail-summary-update-line): New function.
Glenn Morris <rgm@gnu.org>
parents:
101594
diff
changeset
|
1262 (line-end-position)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1263 (overlay-put rmail-summary-overlay 'face 'highlight))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1264 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1265 (defun rmail-summary-scroll-msg-up (&optional dist) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1266 "Scroll the Rmail window forward. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1267 If the Rmail window is displaying the end of a message, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1268 advance to the next message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1269 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1270 (if (eq dist '-) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1271 (rmail-summary-scroll-msg-down nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1272 (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1273 (if rmail-buffer-window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1274 (if (let ((rmail-summary-window (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1275 (select-window rmail-buffer-window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1276 (prog1 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1277 ;; Is EOB visible in the buffer? |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1278 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1279 (let ((ht (window-height (selected-window)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1280 (move-to-window-line (- ht 2)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1281 (end-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1282 (eobp))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1283 (select-window rmail-summary-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1284 (if (not rmail-summary-scroll-between-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1285 (error "End of buffer") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1286 (rmail-summary-next-msg (or dist 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1287 (let ((other-window-scroll-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1288 (scroll-other-window dist))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1289 ;; If it isn't visible at all, show the beginning. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1290 (rmail-summary-beginning-of-message))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1291 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1292 (defun rmail-summary-scroll-msg-down (&optional dist) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1293 "Scroll the Rmail window backward. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1294 If the Rmail window is now displaying the beginning of a message, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1295 move to the previous message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1296 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1297 (if (eq dist '-) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1298 (rmail-summary-scroll-msg-up nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1299 (let ((rmail-buffer-window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1300 (if rmail-buffer-window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1301 (if (let ((rmail-summary-window (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1302 (select-window rmail-buffer-window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1303 (prog1 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1304 ;; Is BOB visible in the buffer? |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1305 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1306 (move-to-window-line 0) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1307 (beginning-of-line) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1308 (bobp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1309 (select-window rmail-summary-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1310 (if (not rmail-summary-scroll-between-messages) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1311 (error "Beginning of buffer") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1312 (rmail-summary-previous-msg (or dist 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1313 (let ((other-window-scroll-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1314 (scroll-other-window-down dist))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1315 ;; If it isn't visible at all, show the beginning. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1316 (rmail-summary-beginning-of-message))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1317 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1318 (defun rmail-summary-beginning-of-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1319 "Show current message from the beginning." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1320 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1321 (rmail-summary-show-message 'BEG)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1322 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1323 (defun rmail-summary-end-of-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1324 "Show bottom of current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1325 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1326 (rmail-summary-show-message 'END)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1327 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1328 (defun rmail-summary-show-message (where) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1329 "Show current mail message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1330 Position it according to WHERE which can be BEG or END" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1331 (if (and (one-window-p) (not pop-up-frames)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1332 ;; If there is just one window, put the summary on the top. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1333 (let ((buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1334 (split-window (selected-window) rmail-summary-window-size) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1335 (select-window (frame-first-window)) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1336 (rmail-pop-to-buffer rmail-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1337 ;; If pop-to-buffer did not use that window, delete that |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1338 ;; window. (This can happen if it uses another frame.) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1339 (or (eq buffer (window-buffer (next-window (frame-first-window)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1340 (delete-other-windows))) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1341 (rmail-pop-to-buffer rmail-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1342 (cond |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1343 ((eq where 'BEG) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1344 (goto-char (point-min)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1345 (search-forward "\n\n")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1346 ((eq where 'END) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1347 (goto-char (point-max)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1348 (recenter (1- (window-height)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1349 ) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1350 (rmail-pop-to-buffer rmail-summary-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1351 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1352 (defun rmail-summary-bury () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1353 "Bury the Rmail buffer and the Rmail summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1354 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1355 (let ((buffer-to-bury (current-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1356 (let (window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1357 (while (setq window (get-buffer-window rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1358 (set-window-buffer window (other-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1359 (bury-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1360 (switch-to-buffer (other-buffer buffer-to-bury)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1361 (bury-buffer buffer-to-bury))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1362 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1363 (defun rmail-summary-quit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1364 "Quit out of Rmail and Rmail summary." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1365 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1366 (rmail-summary-wipe) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1367 (rmail-quit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1368 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1369 (defun rmail-summary-wipe () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1370 "Kill and wipe away Rmail summary, remaining within Rmail." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1371 (interactive) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1372 (with-current-buffer rmail-buffer (setq rmail-summary-buffer nil)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1373 (let ((local-rmail-buffer rmail-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1374 (kill-buffer (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1375 ;; Delete window if not only one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1376 (if (not (eq (selected-window) (next-window nil 'no-minibuf))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1377 (delete-window)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1378 ;; Switch windows to the rmail buffer, or switch to it in this window. |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1379 (rmail-pop-to-buffer local-rmail-buffer))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1380 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1381 (defun rmail-summary-expunge () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1382 "Actually erase all deleted messages and recompute summary headers." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1383 (interactive) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1384 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1385 (when (rmail-expunge-confirmed) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1386 (rmail-only-expunge))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1387 (rmail-update-summary)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1388 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1389 (defun rmail-summary-expunge-and-save () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1390 "Expunge and save RMAIL file." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1391 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1392 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1393 (rmail-expunge-and-save)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1394 (rmail-update-summary) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1395 (set-buffer-modified-p nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1396 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1397 (defun rmail-summary-get-new-mail (&optional file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1398 "Get new mail and recompute summary headers. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1399 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1400 Optionally you can specify the file to get new mail from. In this case, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1401 the file of new mail is not changed or deleted. Noninteractively, you can |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1402 pass the inbox file name as an argument. Interactively, a prefix |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1403 argument says to read a file name and use that file as the inbox." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1404 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1405 (list (if current-prefix-arg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1406 (read-file-name "Get new mail from file: ")))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1407 (let (msg) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1408 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1409 (rmail-get-new-mail file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1410 ;; Get the proper new message number. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1411 (setq msg rmail-current-message)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1412 ;; Make sure that message is displayed. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1413 (or (zerop msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1414 (rmail-summary-goto-msg msg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1415 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1416 (defun rmail-summary-input (filename) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1417 "Run Rmail on file FILENAME." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1418 (interactive "FRun rmail on RMAIL file: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1419 ;; We switch windows here, then display the other Rmail file there. |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1420 (rmail-pop-to-buffer rmail-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1421 (rmail filename)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1422 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1423 (defun rmail-summary-first-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1424 "Show first message in Rmail file from summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1425 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1426 (with-no-warnings |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1427 (beginning-of-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1428 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1429 (defun rmail-summary-last-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1430 "Show last message in Rmail file from summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1431 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1432 (with-no-warnings |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1433 (end-of-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1434 (forward-line -1)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1435 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1436 (declare-function rmail-abort-edit "rmailedit" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1437 (declare-function rmail-cease-edit "rmailedit"()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1438 (declare-function rmail-set-label "rmailkwd" (l state &optional n)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1439 (declare-function rmail-output-read-file-name "rmailout" ()) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1440 (declare-function mail-send-and-exit "sendmail" (&optional arg)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1441 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1442 (defvar rmail-summary-edit-map nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1443 (if rmail-summary-edit-map |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1444 nil |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1445 (setq rmail-summary-edit-map |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1446 (nconc (make-sparse-keymap) text-mode-map)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1447 (define-key rmail-summary-edit-map "\C-c\C-c" 'rmail-cease-edit) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1448 (define-key rmail-summary-edit-map "\C-c\C-]" 'rmail-abort-edit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1449 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1450 (defun rmail-summary-edit-current-message () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1451 "Edit the contents of this message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1452 (interactive) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1453 (rmail-pop-to-buffer rmail-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1454 (rmail-edit-current-message) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1455 (use-local-map rmail-summary-edit-map)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1456 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1457 (defun rmail-summary-cease-edit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1458 "Finish editing message, then go back to Rmail summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1459 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1460 (rmail-cease-edit) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1461 (rmail-pop-to-buffer rmail-summary-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1462 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1463 (defun rmail-summary-abort-edit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1464 "Abort edit of current message; restore original contents. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1465 Go back to summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1466 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1467 (rmail-abort-edit) |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1468 (rmail-pop-to-buffer rmail-summary-buffer)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1469 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1470 (defun rmail-summary-search-backward (regexp &optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1471 "Show message containing next match for REGEXP. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1472 Prefix argument gives repeat count; negative argument means search |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1473 backwards (through earlier messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1474 Interactively, empty argument means use same regexp used last time." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1475 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1476 (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1477 (prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1478 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1479 regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1480 (setq prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1481 (concat prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1482 (if rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1483 (concat ", default " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1484 rmail-search-last-regexp "): ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1485 "): "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1486 (setq regexp (read-string prompt)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1487 (cond ((not (equal regexp "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1488 (setq rmail-search-last-regexp regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1489 ((not rmail-search-last-regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1490 (error "No previous Rmail search string"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1491 (list rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1492 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1493 ;; Don't use save-excursion because that prevents point from moving |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1494 ;; properly in the summary buffer. |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1495 (with-current-buffer rmail-buffer |
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1496 (rmail-search regexp (- n)))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1497 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1498 (defun rmail-summary-search (regexp &optional n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1499 "Show message containing next match for REGEXP. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1500 Prefix argument gives repeat count; negative argument means search |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1501 backwards (through earlier messages). |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1502 Interactively, empty argument means use same regexp used last time." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1503 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1504 (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1505 (prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1506 (concat (if reversep "Reverse " "") "Rmail search (regexp")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1507 regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1508 (setq prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1509 (concat prompt |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1510 (if rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1511 (concat ", default " |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1512 rmail-search-last-regexp "): ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1513 "): "))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1514 (setq regexp (read-string prompt)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1515 (cond ((not (equal regexp "")) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1516 (setq rmail-search-last-regexp regexp)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1517 ((not rmail-search-last-regexp) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1518 (error "No previous Rmail search string"))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1519 (list rmail-search-last-regexp |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1520 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1521 ;; Don't use save-excursion because that prevents point from moving |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1522 ;; properly in the summary buffer. |
102375
6a06f943ee6d
(rmail-summary-search): Ensure the selected message shows.
Glenn Morris <rgm@gnu.org>
parents:
102374
diff
changeset
|
1523 (let ((buffer (current-buffer)) |
6a06f943ee6d
(rmail-summary-search): Ensure the selected message shows.
Glenn Morris <rgm@gnu.org>
parents:
102374
diff
changeset
|
1524 (selwin (selected-window))) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1525 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1526 (progn |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1527 (rmail-pop-to-buffer rmail-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1528 (rmail-search regexp n)) |
102375
6a06f943ee6d
(rmail-summary-search): Ensure the selected message shows.
Glenn Morris <rgm@gnu.org>
parents:
102374
diff
changeset
|
1529 (select-window selwin) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1530 (set-buffer buffer)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1531 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1532 (defun rmail-summary-toggle-header () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1533 "Show original message header if pruned header currently shown, or vice versa." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1534 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1535 (save-window-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1536 (set-buffer rmail-buffer) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1537 (rmail-toggle-header)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1538 ;; Inside save-excursion, some changes to point in the RMAIL buffer are lost. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1539 ;; Set point to point-min in the RMAIL buffer, if it is visible. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1540 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1541 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1542 ;; Using save-window-excursion would lose the new value of point. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1543 (let ((owin (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1544 (unwind-protect |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1545 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1546 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1547 (goto-char (point-min))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1548 (select-window owin)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1549 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1550 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1551 (defun rmail-summary-add-label (label) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1552 "Add LABEL to labels associated with current Rmail message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1553 Completion is performed over known labels when reading." |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1554 (interactive (list (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1555 (rmail-read-label "Add label")))) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1556 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1557 (rmail-add-label label))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1558 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1559 (defun rmail-summary-kill-label (label) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1560 "Remove LABEL from labels associated with current Rmail message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1561 Completion is performed over known labels when reading." |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1562 (interactive (list (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1563 (rmail-read-label "Kill label")))) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1564 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1565 (rmail-set-label label nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1566 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1567 ;;;; *** Rmail Summary Mailing Commands *** |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1568 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1569 (defun rmail-summary-override-mail-send-and-exit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1570 "Replace bindings to `mail-send-and-exit' with `rmail-summary-send-and-exit'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1571 (use-local-map (copy-keymap (current-local-map))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1572 (dolist (key (where-is-internal 'mail-send-and-exit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1573 (define-key (current-local-map) key 'rmail-summary-send-and-exit))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1574 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1575 (defun rmail-summary-mail () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1576 "Send mail in another window. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1577 While composing the message, use \\[mail-yank-original] to yank the |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1578 original message into it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1579 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1580 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1581 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1582 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1583 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1584 (rmail-start-mail nil nil nil nil nil (current-buffer)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1585 (rmail-summary-override-mail-send-and-exit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1586 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1587 (defun rmail-summary-continue () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1588 "Continue composing outgoing message previously being composed." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1589 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1590 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1591 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1592 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1593 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1594 (rmail-start-mail t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1595 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1596 (defun rmail-summary-reply (just-sender) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1597 "Reply to the current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1598 Normally include CC: to all other recipients of original message; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1599 prefix argument means ignore them. While composing the reply, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1600 use \\[mail-yank-original] to yank the original message into it." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1601 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1602 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1603 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1604 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1605 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1606 (rmail-reply just-sender) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1607 (rmail-summary-override-mail-send-and-exit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1608 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1609 (defun rmail-summary-retry-failure () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1610 "Edit a mail message which is based on the contents of the current message. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1611 For a message rejected by the mail system, extract the interesting headers and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1612 the body of the original message; otherwise copy the current message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1613 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1614 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1615 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1616 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1617 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1618 (rmail-retry-failure) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1619 (rmail-summary-override-mail-send-and-exit)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1620 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1621 (defun rmail-summary-send-and-exit () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1622 "Send mail reply and return to summary buffer." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1623 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1624 (mail-send-and-exit t)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1625 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1626 (defun rmail-summary-forward (resend) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1627 "Forward the current message to another user. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1628 With prefix argument, \"resend\" the message instead of forwarding it; |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1629 see the documentation of `rmail-resend'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1630 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1631 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1632 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1633 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1634 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1635 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1636 (rmail-forward resend) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1637 (rmail-summary-override-mail-send-and-exit))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1638 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1639 (defun rmail-summary-resend () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1640 "Resend current message using `rmail-resend'." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1641 (interactive) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1642 (save-excursion |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1643 (let ((window (get-buffer-window rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1644 (if window |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1645 (select-window window) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1646 (set-buffer rmail-buffer))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1647 (call-interactively 'rmail-resend))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1648 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1649 ;; Summary output commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1650 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1651 (defun rmail-summary-output (&optional file-name n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1652 "Append this message to mail file FILE-NAME. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1653 This works with both mbox format and Babyl format files, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1654 outputting in the appropriate format for each. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1655 The default file name comes from `rmail-default-file', |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1656 which is updated to the name you use in this command. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1657 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1658 A prefix argument N says to output that many consecutive messages |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1659 from those in the summary, starting with the current one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1660 Deleted messages are skipped and don't count. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1661 When called from Lisp code, N may be omitted and defaults to 1. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1662 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1663 This command always outputs the complete message header, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1664 even the header display is currently pruned." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1665 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1666 (progn (require 'rmailout) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1667 (list (rmail-output-read-file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1668 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1669 (let ((i 0) prev-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1670 (while |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1671 (and (< i n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1672 (progn (rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1673 (not (eq prev-msg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1674 (setq prev-msg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1675 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1676 rmail-current-message)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1677 (setq i (1+ i)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1678 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1679 (let ((rmail-delete-after-output nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1680 (rmail-output file-name 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1681 (if rmail-delete-after-output |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1682 (rmail-summary-delete-forward nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1683 (if (< i n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1684 (rmail-summary-next-msg 1)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1685 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1686 (defalias 'rmail-summary-output-to-rmail-file 'rmail-summary-output) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1687 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1688 (declare-function rmail-output-as-seen "rmailout" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1689 (file-name &optional count noattribute from-gnus)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1690 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1691 (defun rmail-summary-output-as-seen (&optional file-name n) |
102049
37d66cffaf97
(rmail-summary-output-as-seen): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
101995
diff
changeset
|
1692 "Append this message to mbox file named FILE-NAME. |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1693 A prefix argument N says to output that many consecutive messages, |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1694 from the summary, starting with the current one. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1695 Deleted messages are skipped and don't count. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1696 When called from Lisp code, N may be omitted and defaults to 1. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1697 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1698 This outputs the message header as you see it (or would see it) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1699 displayed in Rmail. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1700 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1701 The default file name comes from `rmail-default-file', |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1702 which is updated to the name you use in this command." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1703 (interactive |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1704 (progn (require 'rmailout) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1705 (list (rmail-output-read-file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1706 (prefix-numeric-value current-prefix-arg)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1707 (require 'rmailout) ; for rmail-output-as-seen in non-interactive case |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1708 (let ((i 0) prev-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1709 (while |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1710 (and (< i n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1711 (progn (rmail-summary-goto-msg) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1712 (not (eq prev-msg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1713 (setq prev-msg |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1714 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1715 rmail-current-message)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1716 (setq i (1+ i)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1717 (with-current-buffer rmail-buffer |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1718 (let ((rmail-delete-after-output nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1719 (rmail-output-as-seen file-name 1))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1720 (if rmail-delete-after-output |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1721 (rmail-summary-delete-forward nil) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1722 (if (< i n) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1723 (rmail-summary-next-msg 1)))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1724 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1725 (defun rmail-summary-output-menu () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1726 "Output current message to another Rmail file, chosen with a menu. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1727 Also set the default for subsequent \\[rmail-output-to-babyl-file] commands. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1728 The variables `rmail-secondary-file-directory' and |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1729 `rmail-secondary-file-regexp' control which files are offered in the menu." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1730 (interactive) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1731 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1732 (let ((rmail-delete-after-output nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1733 (call-interactively 'rmail-output-menu))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1734 (if rmail-delete-after-output |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1735 (rmail-summary-delete-forward nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1736 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1737 (defun rmail-summary-construct-io-menu () |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1738 (let ((files (rmail-find-all-files rmail-secondary-file-directory))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1739 (if files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1740 (progn |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1741 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1742 (cons "Input Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1743 (rmail-list-to-menu "Input Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1744 files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1745 'rmail-summary-input))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1746 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1747 (cons "Output Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1748 (rmail-list-to-menu "Output Rmail File" |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1749 files |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1750 'rmail-summary-output)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1751 (define-key rmail-summary-mode-map [menu-bar classify input-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1752 '("Input Rmail File" . rmail-disable-menu)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1753 (define-key rmail-summary-mode-map [menu-bar classify output-menu] |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1754 '("Output Rmail File" . rmail-disable-menu))))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1755 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1756 (defun rmail-summary-output-body (&optional file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1757 "Write this message body to the file FILE-NAME. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1758 FILE-NAME defaults, interactively, from the Subject field of the message." |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1759 (interactive) |
105829
328150f0cf76
* url-util.el (url-insert-entities-in-string):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
104908
diff
changeset
|
1760 (with-current-buffer rmail-buffer |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1761 (let ((rmail-delete-after-output nil)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1762 (if file-name |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1763 (rmail-output-body-to-file file-name) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1764 (call-interactively 'rmail-output-body-to-file)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1765 (if rmail-delete-after-output |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1766 (rmail-summary-delete-forward nil))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1767 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1768 ;; Sorting messages in Rmail Summary buffer. |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1769 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1770 (defun rmail-summary-sort-by-date (reverse) |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1771 "Sort messages of current Rmail summary by \"Date\" header. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1772 If prefix argument REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1773 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1774 (rmail-sort-from-summary (function rmail-sort-by-date) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1775 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1776 (defun rmail-summary-sort-by-subject (reverse) |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1777 "Sort messages of current Rmail summary by \"Subject\" header. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1778 Ignores any \"Re: \" prefix. If prefix argument REVERSE is |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1779 non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1780 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1781 (rmail-sort-from-summary (function rmail-sort-by-subject) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1782 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1783 (defun rmail-summary-sort-by-author (reverse) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1784 "Sort messages of current Rmail summary by author. |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1785 This uses either the \"From\" or \"Sender\" header, downcased. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1786 If prefix argument REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1787 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1788 (rmail-sort-from-summary (function rmail-sort-by-author) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1789 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1790 (defun rmail-summary-sort-by-recipient (reverse) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1791 "Sort messages of current Rmail summary by recipient. |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1792 This uses either the \"To\" or \"Apparently-To\" header, downcased. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1793 If prefix argument REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1794 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1795 (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1796 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1797 (defun rmail-summary-sort-by-correspondent (reverse) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1798 "Sort messages of current Rmail summary by other correspondent. |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1799 This uses either the \"From\", \"Sender\", \"To\", or |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1800 \"Apparently-To\" header, downcased. Uses the first header not |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1801 excluded by `rmail-dont-reply-to-names'. If prefix argument |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1802 REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1803 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1804 (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1805 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1806 (defun rmail-summary-sort-by-lines (reverse) |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1807 "Sort messages of current Rmail summary by the number of lines. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1808 If prefix argument REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1809 (interactive "P") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1810 (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1811 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1812 (defun rmail-summary-sort-by-labels (reverse labels) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1813 "Sort messages of current Rmail summary by labels. |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1814 LABELS is a comma-separated list of labels. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1815 If prefix argument REVERSE is non-nil, sorts in reverse order." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1816 (interactive "P\nsSort by labels: ") |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1817 (rmail-sort-from-summary |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1818 (lambda (reverse) (rmail-sort-by-labels reverse labels)) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1819 reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1820 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1821 (defun rmail-sort-from-summary (sortfun reverse) |
102386
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1822 "Sort the Rmail buffer using sorting function SORTFUN. |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1823 Passes REVERSE to SORTFUN as its sole argument. Then regenerates |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1824 the summary. Note that the whole Rmail buffer is sorted, even if |
5850b3824f16
(rmail-get-create-summary-buffer): Doc fix.
Glenn Morris <rgm@gnu.org>
parents:
102375
diff
changeset
|
1825 the summary is only showing a subset of messages." |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1826 (require 'rmailsort) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1827 (let ((selwin (selected-window))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1828 (unwind-protect |
106371
089e310803a4
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
Glenn Morris <rgm@gnu.org>
parents:
105888
diff
changeset
|
1829 (progn (rmail-pop-to-buffer rmail-buffer) |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1830 (funcall sortfun reverse)) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1831 (select-window selwin)))) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1832 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1833 (provide 'rmailsum) |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1834 |
104908
ddac02100686
(rmail-user-mail-address-regexp): Move to rmail.el.
Glenn Morris <rgm@gnu.org>
parents:
104119
diff
changeset
|
1835 ;; Local Variables: |
ddac02100686
(rmail-user-mail-address-regexp): Move to rmail.el.
Glenn Morris <rgm@gnu.org>
parents:
104119
diff
changeset
|
1836 ;; generated-autoload-file: "rmail.el" |
ddac02100686
(rmail-user-mail-address-regexp): Move to rmail.el.
Glenn Morris <rgm@gnu.org>
parents:
104119
diff
changeset
|
1837 ;; End: |
ddac02100686
(rmail-user-mail-address-regexp): Move to rmail.el.
Glenn Morris <rgm@gnu.org>
parents:
104119
diff
changeset
|
1838 |
101360
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1839 ;; arch-tag: 80b0a27a-a50d-4f37-9466-83d32d1e0ca8 |
b10df8502c4a
Renamed all pmail* files to rmail*.
Bastien Guerry <bzg@altern.org>
parents:
diff
changeset
|
1840 ;;; rmailsum.el ends here |