annotate lisp/mh-e/mh-e.el @ 64482:62fe32ed4496

(find-auto-coding): New function created by modifying the body of set-auto-coding. (set-auto-coding): Use find-auto-coding to find a coding.
author Kenichi Handa <handa@m17n.org>
date Tue, 19 Jul 2005 02:30:29 +0000
parents 18a818a2ee7c
children 120985a68bd9 f9a65d7ebd29
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1 ;;; mh-e.el --- GNU Emacs interface to the MH mail system
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
3 ;; Copyright (C) 1985, 1986, 1987, 1988,
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
4 ;; 1990, 1992, 1993, 1994, 1995, 1997, 1999,
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
5 ;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Author: Bill Wohler <wohler@newt.com>
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; Maintainer: Bill Wohler <wohler@newt.com>
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
9 ;; Version: 7.84
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; Keywords: mail
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16 ;; the Free Software Foundation; either version 2, or (at your option)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; any later version.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; GNU General Public License for more details.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
27 ;; Boston, MA 02110-1301, USA.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
29 ;;; Commentary:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
30
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
31 ;; How to Use:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32 ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33 ;; C-u M-x mh-rmail to visit any folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
34 ;; M-x mh-smail to send mail. From within the mail reader, "m" works, too.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36 ;; Your .emacs might benefit from these bindings:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
37 ;; (global-set-key "\C-cr" 'mh-rmail)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
38 ;; (global-set-key "\C-xm" 'mh-smail)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39 ;; (global-set-key "\C-x4m" 'mh-smail-other-window)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
41 ;; MH (Message Handler) is a powerful mail reader.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
43 ;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44 ;; (send to mh-users-request to be added). See the monthly Frequently Asked
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 ;; Questions posting there for information on getting MH and MH-E:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46 ;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
47
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48 ;; N.B. MH must have been compiled with the MHE compiler flag or several
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
49 ;; features necessary for MH-E will be missing from MH commands, specifically
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
50 ;; the -build switch to repl and forw.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
51
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
52 ;; MH-E is an Emacs interface to the MH mail system.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
53
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
54 ;; MH-E is supported in GNU Emacs 20 and 21, with MH 6.8.4 and nmh 1.0.4.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
55
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
56 ;; Mailing Lists:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
57 ;; mh-e-users@lists.sourceforge.net
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
58 ;; mh-e-announce@lists.sourceforge.net
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
59 ;; mh-e-devel@lists.sourceforge.net
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
60 ;;
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
61 ;; Subscribe by sending a "subscribe" message to
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
62 ;; <list>-request@lists.sourceforge.net, or by using the web interface at
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
63 ;; https://sourceforge.net/mail/?group_id=13357
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
64
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65 ;; Bug Reports:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 ;; https://sourceforge.net/tracker/?group_id=13357&atid=113357
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
67 ;; Include the output of M-x mh-version in any bug report.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69 ;; Feature Requests:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70 ;; https://sourceforge.net/tracker/?atid=363357&group_id=13357&func=browse
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
72 ;; Support:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
73 ;; https://sourceforge.net/tracker/?group_id=13357&atid=213357
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
74
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75 ;;; Change Log:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77 ;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
78 ;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
79 ;; Rewritten for GNU Emacs, James Larus, 1985.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
80 ;; Modified by Stephen Gildea, 1988.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
81 ;; Maintenance picked up by Bill Wohler and the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
82 ;; SourceForge Crew <http://mh-e.sourceforge.net/>, 2001.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
83
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
84 ;;; Code:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
85
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
86 (provide 'mh-e)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
87
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
88 (eval-when-compile (require 'mh-acros))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
89 (mh-require-cl)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
90 (require 'mh-utils)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
91 (require 'mh-init)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
92 (require 'mh-inc)
56787
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
93 (require 'mh-seq)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
94 (require 'gnus-util)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
95 (require 'easymenu)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
96
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
97 ;; Shush the byte-compiler
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
98 (defvar font-lock-auto-fontify)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
99 (defvar font-lock-defaults)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
100
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
101 (defconst mh-version "7.84" "Version number of MH-E.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
102
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
103 (defvar mh-partial-folder-mode-line-annotation "select"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
104 "Annotation when displaying part of a folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
105 The string is displayed after the folder's name. nil for no annotation.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
106
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
107
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
108 ;;; Scan Line Formats
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
109
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
110 ;;; Parameterize MH-E to work with different scan formats. The defaults work
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
111 ;;; with the standard MH scan listings, in which the first 4 characters on
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
112 ;;; the line are the message number, followed by two places for notations.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
113
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
114 ;; The following scan formats are passed to the scan program if the setting of
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
115 ;; `mh-scan-format-file' is t. They are identical except the later one makes
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
116 ;; use of the nmh `decode' function to decode RFC 2047 encodings. If you just
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
117 ;; want to change the width of the msg number, use the `mh-set-cmd-note'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
118 ;; function.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
119
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
120 (defvar mh-scan-format-mh
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
121 (concat
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
122 "%4(msg)"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
123 "%<(cur)+%| %>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
124 "%<{replied}-"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
125 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
126 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
127 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
128 "%?(nonnull(comp{newsgroups}))n%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
129 "%<(zero) %>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
130 "%02(mon{date})/%02(mday{date})%<{date} %|*%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
131 "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
132 "%<(zero)%17(friendly{from})%> "
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
133 "%{subject}%<{body}<<%{body}%>")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
134 "*Scan format string for MH, provided to the scan program via the -format arg.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
135 This format is identical to the default except that additional hints for
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
136 fontification have been added to the fifth column (remember that in Emacs, the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
137 first column is 0).
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
138
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
139 The values of the fifth column, in priority order, are: `-' if the message has
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
140 been replied to, t if an address on the To: line matches one of the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
141 mailboxes of the current user, `c' if the Cc: line matches, `b' if the Bcc:
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
142 line matches, and `n' if a non-empty Newsgroups: header is present.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
143
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
144 (defvar mh-scan-format-nmh
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
145 (concat
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
146 "%4(msg)"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
147 "%<(cur)+%| %>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
148 "%<{replied}-"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
149 "%?(nonnull(comp{to}))%<(mymbox{to})t%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
150 "%?(nonnull(comp{cc}))%<(mymbox{cc})c%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
151 "%?(nonnull(comp{bcc}))%<(mymbox{bcc})b%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
152 "%?(nonnull(comp{newsgroups}))n%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
153 "%<(zero) %>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
154 "%02(mon{date})/%02(mday{date})%<{date} %|*%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
155 "%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
156 "%<(zero)%17(decode(friendly{from}))%> "
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
157 "%(decode{subject})%<{body}<<%{body}%>")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
158 "*Scan format string for nmh.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
159 This string is passed to the scan program via the -format arg.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
160 This format is identical to the default except that additional hints for
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
161 fontification have been added to the fifth column (remember that in Emacs, the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
162 first column is 0).
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
163
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
164 The values of the fifth column, in priority order, are: `-' if the message has
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
165 been replied to, t if an address on the To: field matches one of the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
166 mailboxes of the current user, `c' if the Cc: field matches, `b' if the Bcc:
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
167 field matches, and `n' if a non-empty Newsgroups: field is present.")
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
168
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
169 (defvar mh-note-deleted ?D
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
170 "Deleted messages are marked by this character.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
171 See also `mh-scan-deleted-msg-regexp'.")
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
172
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
173 (defvar mh-note-refiled ?^
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
174 "Refiled messages are marked by this character.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
175 See also `mh-scan-refiled-msg-regexp'.")
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
176
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
177 (defvar mh-note-cur ?+
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
178 "The current message (in MH) is marked by this character.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
179 See also `mh-scan-cur-msg-number-regexp'.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
180
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
181 (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
182 "This regexp specifies the scan lines that are 'good' messages.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
183 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
184 expression to contain at least one parenthesized expression which matches the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
185 message number as in the default of \"^\\\\( *[0-9]+\\\\)[^D^0-9]\".")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
186
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
187 (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
188 "This regexp matches deleted messages.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
189 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
190 expression to contain at least one parenthesized expression which matches the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
191 message number as in the default of \"^\\\\( *[0-9]+\\\\)D\".
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
192 See also `mh-note-deleted'.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
193
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
194 (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
195 "This regexp matches refiled messages.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
196 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
197 expression to contain at least one parenthesized expression which matches the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
198 message number as in the default of \"^\\\\( *[0-9]+\\\\)\\\\^\".
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
199 See also `mh-note-refiled'.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
200
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
201 (defvar mh-scan-valid-regexp "^ *[0-9]"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
202 "This regexp matches scan lines for messages (not error messages).")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
203
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
204 (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
205 "This regexp matches the current message.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
206 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
207 expression to contain at least one parenthesized expression which matches the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
208 message number as in the default of \"^\\\\( *[0-9]+\\\\+\\\\).*\". Don't
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
209 disable this regexp as it's needed by non-fontifying functions.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
210 See also `mh-note-cur'.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
211
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
212 (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
213 "This regexp matches a valid date.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
214 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
215 expression to contain only one parenthesized expression which matches the date
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
216 field as in the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
217 See also `mh-scan-format-regexp'.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
218
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
219 (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
220 "This regexp specifies the recipient in messages you sent.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
221 Note that the default setting of `mh-folder-font-lock-keywords'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
222 expects this expression to contain two parenthesized expressions. The
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
223 first is expected to match the `To:' that the default scan format
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
224 file generates. The second is expected to match the recipient's name
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
225 as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\".")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
226
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
227 (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
228 "This regexp matches the message body fragment displayed in scan lines.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
229 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
230 expression to contain at least one parenthesized expression which matches the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
231 body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\".")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
232
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
233 (defvar mh-scan-subject-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
234 "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
235 "This regexp matches the subject.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
236 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
237 expression to contain at least three parenthesized expressions. The first is
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
238 expected to match the `Re:' string, if any. The second matches an optional
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
239 bracketed number after `Re:', such as in `Re[2]:' (and is thus a
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
240 sub-expression of the first expression) and the third is expected to match
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
241 the subject line itself as in the default of \"^ *[0-9]+........[ ]*...................\\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)*\\\\([^<\\n]*\\\\)\".")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
242
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
243 (defvar mh-scan-format-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
244 (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)")
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
245 "This regexp matches the output of scan.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
246 Note that the default setting of `mh-folder-font-lock-keywords' expects this
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
247 expression to contain at least three parenthesized expressions. The first
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
248 should match the fontification hint, the second is found in
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
249 `mh-scan-date-regexp', and the third should match the user name as in the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
250 default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
251 \"*\\\\(..................\\\\)\")\".")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
252
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
253
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
254
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
255 (defvar mh-folder-font-lock-keywords
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
256 (list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
257 ;; Folders when displaying index buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
258 (list "^\\+.*"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
259 '(0 mh-index-folder-face))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
260 ;; Marked for deletion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
261 (list (concat mh-scan-deleted-msg-regexp ".*")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
262 '(0 mh-folder-deleted-face))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
263 ;; Marked for refile
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
264 (list (concat mh-scan-refiled-msg-regexp ".*")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
265 '(0 mh-folder-refiled-face))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
266 ;;after subj
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
267 (list mh-scan-body-regexp '(1 mh-folder-body-face nil t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
268 '(mh-folder-font-lock-subject
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
269 (1 mh-folder-followup-face append t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
270 (2 mh-folder-subject-face append t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
271 ;;current msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
272 (list mh-scan-cur-msg-number-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
273 '(1 mh-folder-cur-msg-number-face))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
274 (list mh-scan-good-msg-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
275 '(1 mh-folder-msg-number-face)) ;; Msg number
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
276 (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
277 (list mh-scan-rcpt-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
278 '(1 mh-folder-to-face) ;; To:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
279 '(2 mh-folder-address-face)) ;; address
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
280 ;; scan font-lock name
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
281 (list mh-scan-format-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
282 '(1 mh-folder-date-face)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
283 '(3 mh-folder-scan-format-face)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
284 "Regexp keywords used to fontify the MH-Folder buffer.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
285
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
286 (defvar mh-scan-cmd-note-width 1
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
287 "Number of columns consumed by the cmd-note field in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
288 This column will have one of the values: ` ', `D', `^', `+' and where
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
289 ` ' is the default value,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
290 `D' is the `mh-note-deleted' character,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
291 `^' is the `mh-note-refiled' character, and
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
292 `+' is the `mh-note-cur' character.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
293
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
294 (defvar mh-scan-destination-width 1
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
295 "Number of columns consumed by the destination field in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
296 This column will have one of ' ', '%', '-', 't', 'c', 'b', or `n' in it.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
297 A ' ' blank space is the default character.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
298 A '%' indicates that the message in in a named MH sequence.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
299 A '-' indicates that the message has been annotated with a replied field.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
300 A 't' indicates that the message contains mymbox in the To: field.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
301 A 'c' indicates that the message contains mymbox in the Cc: field.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
302 A 'b' indicates that the message contains mymbox in the Bcc: field.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
303 A 'n' indicates that the message contains a Newsgroups: field.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
304
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
305 (defvar mh-scan-date-width 5
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
306 "Number of columns consumed by the date field in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
307 This column will typically be of the form mm/dd.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
308
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
309 (defvar mh-scan-date-flag-width 1
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
310 "Number of columns consumed to flag (in)valid dates in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
311 This column will have ` ' for valid and `*' for invalid or missing dates.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
312
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
313 (defvar mh-scan-from-mbox-width 17
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
314 "Number of columns consumed with the \"From:\" line in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
315 This column will have a friendly name or e-mail address of the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
316 originator, or a \"To: address\" for outgoing e-mail messages.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
317
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
318 (defvar mh-scan-from-mbox-sep-width 2
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
319 "Number of columns consumed by whitespace after from-mbox in `mh-scan-format'.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
320 This column will only ever have spaces in it.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
321
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
322 (defvar mh-scan-field-from-start-offset
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
323 (+ mh-scan-cmd-note-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
324 mh-scan-destination-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
325 mh-scan-date-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
326 mh-scan-date-flag-width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
327 "The offset from the `mh-cmd-note' to find the start of \"From:\" address.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
328
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
329 (defvar mh-scan-field-from-end-offset
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
330 (+ mh-scan-field-from-start-offset mh-scan-from-mbox-width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
331 "The offset from the `mh-cmd-note' to find the end of \"From:\" address.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
332
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
333 (defvar mh-scan-field-subject-start-offset
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
334 (+ mh-scan-cmd-note-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
335 mh-scan-destination-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
336 mh-scan-date-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
337 mh-scan-date-flag-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
338 mh-scan-from-mbox-width
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
339 mh-scan-from-mbox-sep-width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
340 "The offset from the `mh-cmd-note' to find the start of the subject.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
341
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
342 (defun mh-folder-font-lock-subject (limit)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
343 "Return MH-E scan subject strings to font-lock between point and LIMIT."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
344 (if (not (re-search-forward mh-scan-subject-regexp limit t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
345 nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
346 (if (match-beginning 1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
347 (set-match-data (list (match-beginning 1) (match-end 3)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
348 (match-beginning 1) (match-end 3) nil nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
349 (set-match-data (list (match-beginning 3) (match-end 3)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
350 nil nil (match-beginning 3) (match-end 3))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
351 t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
352
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
353
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
354
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
355 ;; Fontifify unseen mesages in bold.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
356
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
357 (defmacro mh-generate-sequence-font-lock (seq prefix face)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
358 "Generate the appropriate code to fontify messages in SEQ.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
359 PREFIX is used to generate unique names for the variables and functions
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
360 defined by the macro. So a different prefix should be provided for every
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
361 invocation.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
362 FACE is the font-lock face used to display the matching scan lines."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
363 (let ((cache (intern (format "mh-folder-%s-seq-cache" prefix)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
364 (func (intern (format "mh-folder-font-lock-%s" prefix))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
365 `(progn
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
366 (defvar ,cache nil
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
367 "Internal cache variable used for font-lock in MH-E.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
368 Should only be non-nil through font-lock stepping, and nil once font-lock
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
369 is done highlighting.")
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
370 (make-variable-buffer-local ',cache)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
371
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
372 (defun ,func (limit)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
373 "Return unseen message lines to font-lock between point and LIMIT."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
374 (if (not ,cache) (setq ,cache (mh-seq-msgs (mh-find-seq ,seq))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
375 (let ((cur-msg (mh-get-msg-num nil)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
376 (cond ((not ,cache)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
377 nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
378 ((>= (point) limit) ;Presumably at end of buffer
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
379 (setq ,cache nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
380 nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
381 ((member cur-msg ,cache)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
382 (let ((bpoint (progn (beginning-of-line)(point)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
383 (epoint (progn (forward-line 1)(point))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
384 (if (<= limit (point)) (setq ,cache nil))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
385 (set-match-data (list bpoint epoint bpoint epoint))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
386 t))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
387 (t
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
388 ;; move forward one line at a time, checking each message
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
389 (while (and (= 0 (forward-line 1))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
390 (> limit (point))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
391 (not (member (mh-get-msg-num nil) ,cache))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
392 ;; Examine how we must have exited the loop...
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
393 (let ((cur-msg (mh-get-msg-num nil)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
394 (cond ((or (<= limit (point))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
395 (not (member cur-msg ,cache)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
396 (setq ,cache nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
397 nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
398 ((member cur-msg ,cache)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
399 (let ((bpoint (progn (beginning-of-line) (point)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
400 (epoint (progn (forward-line 1) (point))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
401 (if (<= limit (point)) (setq ,cache nil))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
402 (set-match-data
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
403 (list bpoint epoint bpoint epoint))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
404 t))))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
405
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
406 (setq mh-folder-font-lock-keywords
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
407 (append mh-folder-font-lock-keywords
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
408 (list (list ',func (list 1 '',face 'prepend t))))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
409
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
410 (mh-generate-sequence-font-lock mh-unseen-seq unseen bold)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
411 (mh-generate-sequence-font-lock mh-tick-seq tick mh-folder-tick-face)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
412
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
413
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
414
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
415 ;;; Internal variables:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
416
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
417 (defvar mh-last-destination nil) ;Destination of last refile or write
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
418 ;command.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
419 (defvar mh-last-destination-folder nil) ;Destination of last refile command.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
420 (defvar mh-last-destination-write nil) ;Destination of last write command.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
421
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
422 (defvar mh-folder-mode-map (make-keymap)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
423 "Keymap for MH folders.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
424
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
425 (defvar mh-arrow-marker nil) ;Marker for arrow display in fringe.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
426
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
427 (defvar mh-delete-list nil) ;List of msg numbers to delete.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
428
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
429 (defvar mh-refile-list nil) ;List of folder names in mh-seq-list.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
430
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
431 (defvar mh-next-direction 'forward) ;Direction to move to next message.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
432
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
433 (defvar mh-view-ops ()) ;Stack of ops that change the folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
434 ;view (such as narrowing or threading).
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
435 (defvar mh-folder-view-stack ()) ;Stack of previous folder views.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
436
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
437 (defvar mh-index-data nil) ;Info about index search results
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
438 (defvar mh-index-previous-search nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
439 (defvar mh-index-msg-checksum-map nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
440 (defvar mh-index-checksum-origin-map nil)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
441 (defvar mh-index-sequence-search-flag nil)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
442
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
443 (defvar mh-first-msg-num nil) ;Number of first msg in buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
444
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
445 (defvar mh-last-msg-num nil) ;Number of last msg in buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
446
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
447 (defvar mh-mode-line-annotation nil) ;Message range displayed in buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
448
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
449 (defvar mh-sequence-notation-history nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
450 ;Rememeber original notation that
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
451 ;is overwritten by `mh-note-seq'.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
452
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
453 (defvar mh-colors-available-flag nil) ;Are colors available?
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
454
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
455 ;;; Macros and generic functions:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
456
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
457 (defun mh-mapc (function list)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
458 "Apply FUNCTION to each element of LIST for side effects only."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
459 (while list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
460 (funcall function (car list))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
461 (setq list (cdr list))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
462
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
463 (defun mh-scan-format ()
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
464 "Return the output format argument for the scan program."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
465 (if (equal mh-scan-format-file t)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
466 (list "-format" (if (mh-variant-p 'nmh 'mu-mh)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
467 (list (mh-update-scan-format
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
468 mh-scan-format-nmh mh-cmd-note))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
469 (list (mh-update-scan-format
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
470 mh-scan-format-mh mh-cmd-note))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
471 (if (not (equal mh-scan-format-file nil))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
472 (list "-form" mh-scan-format-file))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
473
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
474
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
475
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
476 ;;; Entry points:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
477
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
478 ;;;###autoload
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
479 (defun mh-rmail (&optional arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
480 "Inc(orporate) new mail with MH.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
481 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E,
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
482 the Emacs interface to the MH mail system."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
483 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
484 (mh-find-path)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
485 (if arg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
486 (call-interactively 'mh-visit-folder)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
487 (unless (get-buffer mh-inbox)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
488 (mh-visit-folder mh-inbox (symbol-name mh-unseen-seq)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
489 (mh-inc-folder)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
490
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
491 ;;;###autoload
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
492 (defun mh-nmail (&optional arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
493 "Check for new mail in inbox folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
494 Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E,
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
495 the Emacs interface to the MH mail system."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
496 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
497 (mh-find-path) ; init mh-inbox
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
498 (if arg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
499 (call-interactively 'mh-visit-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
500 (mh-visit-folder mh-inbox)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
501
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
502
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
503
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
504 ;;; User executable MH-E commands:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
505
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
506 (defun mh-delete-msg (range)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
507 "Mark the specified RANGE for subsequent deletion and move to the next.
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
508 Default is the displayed message.
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
509
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
510 Check the documentation of `mh-interactive-range' to see how RANGE is read in
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
511 interactive use."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
512 (interactive (list (mh-interactive-range "Delete")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
513 (mh-delete-msg-no-motion range)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
514 (if (looking-at mh-scan-deleted-msg-regexp) (mh-next-msg)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
515
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
516 (defun mh-delete-msg-no-motion (range)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
517 "Mark the specified RANGE for subsequent deletion.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
518
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
519 Check the documentation of `mh-interactive-range' to see how RANGE is read in
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
520 interactive use."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
521 (interactive (list (mh-interactive-range "Delete")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
522 (mh-iterate-on-range () range
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
523 (mh-delete-a-msg nil)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
524
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
525 (defun mh-execute-commands ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
526 "Process outstanding delete and refile requests."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
527 (interactive)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
528 (if mh-folder-view-stack (mh-widen t))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
529 (mh-process-commands mh-current-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
530 (mh-set-scan-mode)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
531 (mh-goto-cur-msg) ; after mh-set-scan-mode for efficiency
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
532 (mh-make-folder-mode-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
533 t) ; return t for write-file-functions
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
534
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
535 (defun mh-first-msg ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
536 "Move to the first message."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
537 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
538 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
539 (while (and (not (eobp)) (not (looking-at mh-scan-valid-regexp)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
540 (forward-line 1)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
541
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
542 (defun mh-header-display ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
543 "Show the current message with all its headers.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
544 Displays headers that might have been suppressed by setting the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
545 variables `mh-clean-message-header-flag' or `mhl-formfile', or by the fallback
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
546 behavior of scrolling uninteresting headers off the top of the window.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
547 Type \"\\[mh-show]\" to show the message normally again."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
548 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
549 (and (not mh-showing-with-headers)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
550 (or mhl-formfile mh-clean-message-header-flag)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
551 (mh-invalidate-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
552 (let ((mh-decode-mime-flag nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
553 (mhl-formfile nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
554 (mh-clean-message-header-flag nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
555 (mh-show-msg nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
556 (mh-in-show-buffer (mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
557 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
558 (mh-recenter 0))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
559 (setq mh-showing-with-headers t)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
560
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
561 (defun mh-inc-folder (&optional maildrop-name folder)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
562 "Inc(orporate)s new mail into the Inbox folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
563 Optional argument MAILDROP-NAME specifies an alternate maildrop from the
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
564 default. The optional argument FOLDER specifies where to incorporate mail
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
565 instead of the default named by `mh-inbox'.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
566 The value of `mh-inc-folder-hook' is a list of functions to be called, with no
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
567 arguments, after incorporating new mail.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
568 Do not call this function from outside MH-E; use \\[mh-rmail] instead."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
569 (interactive (list (if current-prefix-arg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
570 (expand-file-name
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
571 (read-file-name "inc mail from file: "
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
572 mh-user-path)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
573 (if current-prefix-arg
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
574 (mh-prompt-for-folder "inc mail into" mh-inbox t))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
575 (if (not folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
576 (setq folder mh-inbox))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
577 (let ((threading-needed-flag nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
578 (let ((config (current-window-configuration)))
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
579 (when (and mh-show-buffer (get-buffer mh-show-buffer))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
580 (delete-windows-on mh-show-buffer))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
581 (cond ((not (get-buffer folder))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
582 (mh-make-folder folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
583 (setq threading-needed-flag mh-show-threads-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
584 (setq mh-previous-window-config config))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
585 ((not (eq (current-buffer) (get-buffer folder)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
586 (switch-to-buffer folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
587 (setq mh-previous-window-config config))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
588 (mh-get-new-mail maildrop-name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
589 (when (and threading-needed-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
590 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
591 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
592 (or (null mh-large-folder)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
593 (not (equal (forward-line (1+ mh-large-folder)) 0))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
594 (and (message "Not threading since the number of messages exceeds `mh-large-folder'")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
595 nil))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
596 (mh-toggle-threads))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
597 (beginning-of-line)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
598 (if (and mh-showing-mode (looking-at mh-scan-valid-regexp)) (mh-show))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
599 (run-hooks 'mh-inc-folder-hook)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
600
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
601 (defun mh-last-msg ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
602 "Move to the last message."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
603 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
604 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
605 (while (and (not (bobp)) (not (looking-at mh-scan-valid-regexp)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
606 (forward-line -1))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
607 (mh-recenter nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
608
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
609 (defun mh-next-undeleted-msg (&optional arg wait-after-complaining-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
610 "Move to the next undeleted message ARG in window.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
611 If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
612 last undeleted message then pause for a second after printing message."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
613 (interactive "p")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
614 (setq mh-next-direction 'forward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
615 (forward-line 1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
616 (cond ((re-search-forward mh-scan-good-msg-regexp nil t arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
617 (beginning-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
618 (mh-maybe-show))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
619 (t (forward-line -1)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
620 (message "No more undeleted messages")
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
621 (if wait-after-complaining-flag (sit-for 1)))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
622
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
623 (defun mh-folder-from-address ()
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
624 "Derive folder name from sender.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
625
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
626 The name of the folder is derived as follows:
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
627
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
628 a) The folder name associated with the first address found in the list
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
629 `mh-default-folder-list' is used. Each element in this list contains a
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
630 `Check Recipient' item. If this item is turned on, then the address is
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
631 checked against the recipient instead of the sender. This is useful for
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
632 mailing lists.
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
633
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
634 b) An alias prefixed by `mh-default-folder-prefix' corresponding to the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
635 address is used. The prefix is used to prevent clutter in your mail
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
636 directory.
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
637
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
638 Return nil if a folder name was not derived, or if the variable
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
639 `mh-default-folder-must-exist-flag' is t and the folder does not exist."
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
640 ;; Loop for all entries in mh-default-folder-list
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
641 (save-restriction
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
642 (goto-char (point-min))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
643 (re-search-forward "\n\n" nil 'limit)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
644 (narrow-to-region (point-min) (point))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
645 (let ((to/cc (concat (or (message-fetch-field "to") "") ", "
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
646 (or (message-fetch-field "cc") "")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
647 (from (or (message-fetch-field "from") ""))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
648 folder-name)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
649 (setq folder-name
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
650 (loop for list in mh-default-folder-list
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
651 when (string-match (nth 0 list) (if (nth 2 list) to/cc from))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
652 return (nth 1 list)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
653 finally return nil))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
654
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
655 ;; Make sure a result from `mh-default-folder-list' begins with "+"
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
656 ;; since 'mh-expand-file-name below depends on it
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
657 (when (and folder-name (not (eq (aref folder-name 0) ?+)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
658 (setq folder-name (concat "+" folder-name)))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
659
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
660 ;; If not, is there an alias for the address?
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
661 (when (not folder-name)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
662 (let* ((from-header (mh-extract-from-header-value))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
663 (address (and from-header
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
664 (nth 1 (mail-extract-address-components
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
665 from-header))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
666 (alias (and address (mh-alias-address-to-alias address))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
667 (when alias
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
668 (setq folder-name
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
669 (and alias (concat "+" mh-default-folder-prefix alias))))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
670
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
671 ;; If mh-default-folder-must-exist-flag set, check that folder exists.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
672 (if (and folder-name
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
673 (or (not mh-default-folder-must-exist-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
674 (file-exists-p (mh-expand-file-name folder-name))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
675 folder-name))))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
676
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
677 (defun mh-prompt-for-refile-folder ()
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
678 "Prompt the user for a folder in which the message should be filed.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
679 The folder is returned as a string.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
680
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
681 The default folder name is generated by the option
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
682 `mh-default-folder-for-message-function' if it is non-nil or
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
683 `mh-folder-from-address'."
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
684 (mh-prompt-for-folder
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
685 "Destination"
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
686 (let ((refile-file (ignore-errors (mh-msg-filename (mh-get-msg-num t)))))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
687 (if (null refile-file) ""
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
688 (save-excursion
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
689 (set-buffer (get-buffer-create mh-temp-buffer))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
690 (erase-buffer)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
691 (insert-file-contents refile-file)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
692 (or (and mh-default-folder-for-message-function
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
693 (let ((buffer-file-name refile-file))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
694 (funcall mh-default-folder-for-message-function)))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
695 (mh-folder-from-address)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
696 (and (eq 'refile (car mh-last-destination-folder))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
697 (symbol-name (cdr mh-last-destination-folder)))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
698 ""))))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
699 t))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
700
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
701 (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
702 "Refile RANGE into FOLDER.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
703
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
704 Check the documentation of `mh-interactive-range' to see how RANGE is read in
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
705 interactive use.
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
706
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
707 If optional argument DONT-UPDATE-LAST-DESTINATION-FLAG is non-nil then the
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
708 variables `mh-last-destination' and `mh-last-destination-folder' are not
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
709 updated."
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
710 (interactive (list (mh-interactive-range "Refile")
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
711 (intern (mh-prompt-for-refile-folder))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
712 (unless dont-update-last-destination-flag
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
713 (setq mh-last-destination (cons 'refile folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
714 mh-last-destination-folder mh-last-destination))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
715 (mh-iterate-on-range () range
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
716 (mh-refile-a-msg nil folder))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
717 (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
718
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
719 (defun mh-refile-or-write-again (range &optional interactive-flag)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
720 "Re-execute the last refile or write command on the given RANGE.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
721 Default is the displayed message. Use the same folder or file as the previous
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
722 refile or write command.
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
723 If INTERACTIVE-FLAG is non-nil then the function was called interactively."
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
724 (interactive (list (mh-interactive-range "Redo") t))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
725 (if (null mh-last-destination)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
726 (error "No previous refile or write"))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
727 (let (output)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
728 (setq output
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
729 (cond ((eq (car mh-last-destination) 'refile)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
730 (mh-refile-msg range (cdr mh-last-destination))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
731 (format "Destination folder: %s" (cdr mh-last-destination)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
732 (t
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
733 (mh-iterate-on-range msg range
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
734 (apply 'mh-write-msg-to-file msg (cdr mh-last-destination)))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
735 (mh-next-msg interactive-flag)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
736 (format "Destination: %s" (cdr mh-last-destination)))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
737 (message output)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
738
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
739 (defun mh-quit ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
740 "Quit the current MH-E folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
741 Restore the previous window configuration, if one exists.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
742 The value of `mh-before-quit-hook' is a list of functions to be called, with
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
743 no arguments, immediately upon entry to this function.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
744 The value of `mh-quit-hook' is a list of functions to be called, with no
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
745 arguments, upon exit of this function.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
746 MH-E working buffers (whose name begins with \" *mh-\" or \"*MH-E \") are
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
747 killed."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
748 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
749 (run-hooks 'mh-before-quit-hook)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
750 (let ((show-buffer (get-buffer mh-show-buffer)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
751 (when show-buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
752 (kill-buffer show-buffer)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
753 (mh-update-sequences)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
754 (mh-destroy-postponed-handles)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
755 (bury-buffer (current-buffer))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
756
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
757 ;; Delete all MH-E temporary and working buffers.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
758 (dolist (buffer (buffer-list))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
759 (when (or (string-match "^ \\*mh-" (buffer-name buffer))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
760 (string-match "^\\*MH-E " (buffer-name buffer)))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
761 (kill-buffer buffer)))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
762
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
763 (if mh-previous-window-config
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
764 (set-window-configuration mh-previous-window-config))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
765 (run-hooks 'mh-quit-hook))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
766
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
767 (defun mh-page-msg (&optional arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
768 "Page the displayed message forwards.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
769 Scrolls ARG lines or a full screen if no argument is supplied. Show buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
770 first if not displayed. Show the next undeleted message if looking at the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
771 bottom of the current message."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
772 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
773 (if mh-showing-mode
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
774 (if mh-page-to-next-msg-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
775 (if (equal mh-next-direction 'backward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
776 (mh-previous-undeleted-msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
777 (mh-next-undeleted-msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
778 (if (mh-in-show-buffer (mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
779 (pos-visible-in-window-p (point-max)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
780 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
781 (message (format
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
782 "End of message (Type %s to read %s undeleted message)"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
783 (single-key-description last-input-event)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
784 (if (equal mh-next-direction 'backward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
785 "previous"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
786 "next")))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
787 (setq mh-page-to-next-msg-flag t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
788 (scroll-other-window arg)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
789 (mh-show)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
790
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
791 (defun mh-previous-page (&optional arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
792 "Page the displayed message backwards.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
793 Scrolls ARG lines or a full screen if no argument is supplied."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
794 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
795 (mh-in-show-buffer (mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
796 (scroll-down arg)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
797
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
798 (defun mh-previous-undeleted-msg (&optional arg wait-after-complaining-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
799 "Move to the previous undeleted message ARG in window.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
800 If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
801 first undeleted message then pause for a second after printing message."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
802 (interactive "p")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
803 (setq mh-next-direction 'backward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
804 (beginning-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
805 (cond ((re-search-backward mh-scan-good-msg-regexp nil t arg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
806 (mh-maybe-show))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
807 (t (message "No previous undeleted message")
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
808 (if wait-after-complaining-flag (sit-for 1)))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
809
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
810 (defun mh-previous-unread-msg (&optional count)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
811 "Move to previous unread message.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
812 With optional argument COUNT, COUNT-1 unread messages before current message
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
813 are skipped."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
814 (interactive "p")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
815 (unless (> count 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
816 (error "The function mh-previous-unread-msg expects positive argument"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
817 (setq count (1- count))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
818 (let ((unread-sequence (cdr (assoc mh-unseen-seq mh-seq-list)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
819 (cur-msg (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
820 (cond ((and (not cur-msg) (not (bobp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
821 ;; If we are at the end of the buffer back up one line and go
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
822 ;; to unread message after that.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
823 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
824 (forward-line -1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
825 (setq cur-msg (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
826 nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
827 ((or (null unread-sequence) (not cur-msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
828 ;; No unread message or there aren't any messages in buffer...
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
829 (message "No more unread messages"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
830 ((progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
831 ;; Skip count messages...
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
832 (while (and unread-sequence (>= (car unread-sequence) cur-msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
833 (setq unread-sequence (cdr unread-sequence)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
834 (while (> count 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
835 (setq unread-sequence (cdr unread-sequence))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
836 (setq count (1- count)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
837 (not (car unread-sequence)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
838 (message "No more unread messages"))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
839 (t (loop for msg in unread-sequence
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
840 when (mh-goto-msg msg t) return nil
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
841 finally (message "No more unread messages"))))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
842
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
843 (defun mh-goto-next-button (backward-flag &optional criterion)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
844 "Search for next button satisfying criterion.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
845 If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
846 CRITERION is a function or a symbol which has a function binding then that
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
847 function must return non-nil at the button we stop."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
848 (unless (or (and (symbolp criterion) (fboundp criterion))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
849 (functionp criterion))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
850 (setq criterion (lambda (x) t)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
851 ;; Move to the next button in the buffer satisfying criterion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
852 (goto-char (or (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
853 (beginning-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
854 ;; Find point before current button
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
855 (let ((point-before-current-button
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
856 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
857 (while (get-text-property (point) 'mh-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
858 (unless (= (forward-line
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
859 (if backward-flag 1 -1))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
860 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
861 (if backward-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
862 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
863 (goto-char (point-max)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
864 (point))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
865 ;; Skip over current button
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
866 (while (and (get-text-property (point) 'mh-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
867 (not (if backward-flag (bobp) (eobp))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
868 (forward-line (if backward-flag -1 1)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
869 ;; Stop at next MIME button if any exists.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
870 (block loop
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
871 (while (/= (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
872 (unless (= (forward-line
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
873 (if backward-flag -1 1))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
874 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
875 (if backward-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
876 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
877 (goto-char (point-min)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
878 (beginning-of-line))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
879 (point))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
880 point-before-current-button)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
881 (when (and (get-text-property (point) 'mh-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
882 (funcall criterion (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
883 (return-from loop (point))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
884 nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
885 (point))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
886
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
887 (defun mh-next-button (&optional backward-flag)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
888 "Go to the next MIME button.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
889 Advance point to the next MIME button in the show buffer. If the end
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
890 of buffer is reached then the search wraps over to the start of the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
891 buffer. With prefix argument, BACKWARD-FLAG the point will move to the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
892 previous MIME button."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
893 (interactive (list current-prefix-arg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
894 (unless mh-showing-mode
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
895 (mh-show))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
896 (mh-in-show-buffer (mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
897 (mh-goto-next-button backward-flag)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
898
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
899 (defun mh-prev-button ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
900 "Go to the prev MIME button.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
901 Move point to the previous MIME button in the show buffer. If the beginning
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
902 of the buffer is reached then the search wraps over to the end of the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
903 buffer."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
904 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
905 (mh-next-button t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
906
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
907 (defun mh-folder-mime-action (part-index action include-security-flag)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
908 "Go to PART-INDEX and carry out ACTION.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
909 If PART-INDEX is nil then go to the next part in the buffer. The search for
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
910 the next buffer wraps around if end of buffer is reached. If argument
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
911 INCLUDE-SECURITY-FLAG is non-nil then include security info buttons when
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
912 searching for a suitable parts."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
913 (unless mh-showing-mode
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
914 (mh-show))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
915 (mh-in-show-buffer (mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
916 (let ((criterion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
917 (cond (part-index
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
918 (lambda (p)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
919 (let ((part (get-text-property p 'mh-part)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
920 (and (integerp part) (= part part-index)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
921 (t (lambda (p)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
922 (if include-security-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
923 (get-text-property p 'mh-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
924 (integerp (get-text-property p 'mh-part)))))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
925 (point (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
926 (cond ((and (get-text-property point 'mh-part)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
927 (or (null part-index)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
928 (= (get-text-property point 'mh-part) part-index)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
929 (funcall action))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
930 ((and (get-text-property point 'mh-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
931 include-security-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
932 (null part-index))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
933 (funcall action))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
934 (t
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
935 (mh-goto-next-button nil criterion)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
936 (if (= (point) point)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
937 (message "No matching MIME part found")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
938 (funcall action)))))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
939
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
940 (defun mh-folder-toggle-mime-part (part-index)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
941 "Toggle display of button.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
942 If point in show buffer is at a button then that part is toggled.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
943 If not at a button and PART-INDEX is non-nil point is moved to that part.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
944 With nil PART-INDEX find the first button after point (search wraps around if
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
945 end of buffer is reached) and toggle it."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
946 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
947 (when (consp part-index) (setq part-index (car part-index)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
948 (mh-folder-mime-action part-index #'mh-press-button t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
949
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
950 (defun mh-folder-inline-mime-part (part-index)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
951 "Show the raw bytes of MIME part inline.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
952 If point in show buffer is at a mime part then that part is inlined.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
953 If not at a mime-part and PART-INDEX is non-nil point is moved to that part.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
954 With nil PART-INDEX find the first button after point (search wraps around if
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
955 end of buffer is reached) and inline it."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
956 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
957 (when (consp part-index) (setq part-index (car part-index)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
958 (mh-folder-mime-action part-index #'mh-mime-inline-part nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
959
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
960 (defun mh-folder-save-mime-part (part-index)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
961 "Save MIME part.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
962 If point in show buffer is at a mime part then that part is saved.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
963 If not at a mime-part and PART-INDEX is non-nil point is moved to that part.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
964 With nil PART-INDEX find the first button after point (search wraps around if
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
965 end of buffer is reached) and save it."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
966 (interactive "P")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
967 (when (consp part-index) (setq part-index (car part-index)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
968 (mh-folder-mime-action part-index #'mh-mime-save-part nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
969
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
970 (defvar mh-thread-scan-line-map-stack)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
971
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
972 (defun mh-reset-threads-and-narrowing ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
973 "Reset all variables pertaining to threads and narrowing.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
974 Also removes all content from the folder buffer."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
975 (setq mh-view-ops ())
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
976 (setq mh-folder-view-stack ())
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
977 (setq mh-thread-scan-line-map-stack ())
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
978 (let ((buffer-read-only nil)) (erase-buffer)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
979
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
980 (defun mh-rescan-folder (&optional range dont-exec-pending)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
981 "Rescan a folder after optionally processing the outstanding commands.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
982 If optional prefix argument RANGE is provided, prompt for the range of
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
983 messages to display. Otherwise show the entire folder.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
984 If optional argument DONT-EXEC-PENDING is non-nil then pending deletes and
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
985 refiles aren't carried out."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
986 (interactive (list (if current-prefix-arg
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
987 (mh-read-range "Rescan" mh-current-folder t nil t
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
988 mh-interpret-number-as-range-flag)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
989 nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
990 (setq mh-next-direction 'forward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
991 (let ((threaded-flag (memq 'unthread mh-view-ops)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
992 (mh-scan-folder mh-current-folder (or range "all") dont-exec-pending)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
993 (cond (threaded-flag (mh-toggle-threads))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
994 (mh-index-data (mh-index-insert-folder-headers)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
995
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
996 (defun mh-write-msg-to-file (msg file no-headers)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
997 "Append MSG to the end of a FILE.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
998 If prefix argument NO-HEADERS is provided, write only the message body.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
999 Otherwise send the entire message including the headers."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1000 (interactive
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1001 (list (mh-get-msg-num t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1002 (let ((default-dir (if (eq 'write (car mh-last-destination-write))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1003 (file-name-directory
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1004 (car (cdr mh-last-destination-write)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1005 default-directory)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1006 (read-file-name (format "Save message%s in file: "
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1007 (if current-prefix-arg " body" ""))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1008 default-dir
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1009 (if (eq 'write (car mh-last-destination-write))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1010 (car (cdr mh-last-destination-write))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1011 (expand-file-name "mail.out" default-dir))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1012 current-prefix-arg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1013 (let ((msg-file-to-output (mh-msg-filename msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1014 (output-file (mh-expand-file-name file)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1015 (setq mh-last-destination (list 'write file (if no-headers 'no-headers))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1016 mh-last-destination-write mh-last-destination)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1017 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1018 (set-buffer (get-buffer-create mh-temp-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1019 (erase-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1020 (insert-file-contents msg-file-to-output)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1021 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1022 (if no-headers (search-forward "\n\n"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1023 (append-to-file (point) (point-max) output-file))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1024
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1025 (defun mh-toggle-showing ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1026 "Toggle the scanning mode/showing mode of displaying messages."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1027 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1028 (if mh-showing-mode
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1029 (mh-set-scan-mode)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1030 (mh-show)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1031
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1032 (defun mh-undo (range)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1033 "Undo the pending deletion or refile of the specified RANGE.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1034
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1035 Check the documentation of `mh-interactive-range' to see how RANGE is read in
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1036 interactive use."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1037 (interactive (list (mh-interactive-range "Undo")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1038 (cond ((numberp range)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1039 (let ((original-position (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1040 (beginning-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1041 (while (not (or (looking-at mh-scan-deleted-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1042 (looking-at mh-scan-refiled-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1043 (and (eq mh-next-direction 'forward) (bobp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1044 (and (eq mh-next-direction 'backward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1045 (save-excursion (forward-line) (eobp)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1046 (forward-line (if (eq mh-next-direction 'forward) -1 1)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1047 (if (or (looking-at mh-scan-deleted-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1048 (looking-at mh-scan-refiled-msg-regexp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1049 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1050 (mh-undo-msg (mh-get-msg-num t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1051 (mh-maybe-show))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1052 (goto-char original-position)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1053 (error "Nothing to undo"))))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1054 (t (mh-iterate-on-range () range
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1055 (mh-undo-msg nil))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1056 (if (not (mh-outstanding-commands-p))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1057 (mh-set-folder-modified-p nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1058
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1059
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1060 (defun mh-folder-line-matches-show-buffer-p ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1061 "Return t if the message under point in folder-mode is in the show buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1062 Return nil in any other circumstance (no message under point, no show buffer,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1063 the message in the show buffer doesn't match."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1064 (and (eq major-mode 'mh-folder-mode)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1065 (mh-get-msg-num nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1066 mh-show-buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1067 (get-buffer mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1068 (buffer-file-name (get-buffer mh-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1069 (string-match ".*/\\([0-9]+\\)$"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1070 (buffer-file-name (get-buffer mh-show-buffer)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1071 (string-equal
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1072 (match-string 1 (buffer-file-name (get-buffer mh-show-buffer)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1073 (int-to-string (mh-get-msg-num nil)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1074
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1075 (eval-when-compile (require 'gnus))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1076
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1077 (defmacro mh-macro-expansion-time-gnus-version ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1078 "Return Gnus version available at macro expansion time.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1079 The macro evaluates the Gnus version at macro expansion time. If MH-E was
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1080 compiled then macro expansion happens at compile time."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1081 gnus-version)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1082
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1083 (defun mh-run-time-gnus-version ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1084 "Return Gnus version available at run time."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1085 (require 'gnus)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1086 gnus-version)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1087
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1088 ;;;###autoload
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1089 (defun mh-version ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1090 "Display version information about MH-E and the MH mail handling system."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1091 (interactive)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1092 (set-buffer (get-buffer-create mh-info-buffer))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1093 (erase-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1094 ;; MH-E version.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1095 (insert "MH-E " mh-version "\n\n")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1096 ;; MH-E compilation details.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1097 (insert "MH-E compilation details:\n")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1098 (let* ((compiled-mhe (byte-code-function-p (symbol-function 'mh-version)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1099 (gnus-compiled-version (if compiled-mhe
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1100 (mh-macro-expansion-time-gnus-version)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1101 "N/A")))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1102 (insert " Byte compiled:\t\t" (if compiled-mhe "yes" "no") "\n"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1103 " Gnus (compile-time):\t" gnus-compiled-version "\n"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1104 " Gnus (run-time):\t" (mh-run-time-gnus-version) "\n\n"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1105 ;; Emacs version.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1106 (insert (emacs-version) "\n\n")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1107 ;; MH version.
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1108 (if mh-variant-in-use
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1109 (insert mh-variant-in-use "\n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1110 " mh-progs:\t" mh-progs "\n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1111 " mh-lib:\t" mh-lib "\n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1112 " mh-lib-progs:\t" mh-lib-progs "\n\n")
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1113 (insert "No MH variant detected\n"))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1114 ;; Linux version.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1115 (condition-case ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1116 (call-process "uname" nil t nil "-a")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1117 (file-error))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1118 (goto-char (point-min))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1119 (display-buffer mh-info-buffer))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1120
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1121 (defun mh-parse-flist-output-line (line &optional current-folder)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1122 "Parse LINE to generate folder name, unseen messages and total messages.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1123 If CURRENT-FOLDER is non-nil then it contains the current folder name and it is
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1124 used to avoid problems in corner cases involving folders whose names end with a
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1125 '+' character."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1126 (with-temp-buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1127 (insert line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1128 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1129 (let (folder unseen total p)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1130 (when (search-backward " out of " (point-min) t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1131 (setq total (read-from-string
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1132 (buffer-substring-no-properties
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1133 (match-end 0) (line-end-position))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1134 (when (search-backward " in sequence " (point-min) t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1135 (setq p (point))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1136 (when (search-backward " has " (point-min) t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1137 (setq unseen (read-from-string (buffer-substring-no-properties
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1138 (match-end 0) p)))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1139 (while (eq (char-after) ? )
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1140 (backward-char))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1141 (setq folder (buffer-substring-no-properties
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1142 (point-min) (1+ (point))))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1143 (when (and (equal (aref folder (1- (length folder))) ?+)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1144 (equal current-folder folder))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1145 (setq folder (substring folder 0 (1- (length folder)))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1146 (values (format "+%s" folder) (car unseen) (car total))))))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1147
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1148 (defun mh-folder-size-folder (folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1149 "Find size of FOLDER using `folder'."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1150 (with-temp-buffer
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1151 (let ((u (length (cdr (assoc mh-unseen-seq
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1152 (mh-read-folder-sequences folder nil))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1153 (call-process (expand-file-name "folder" mh-progs) nil t nil
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1154 "-norecurse" folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1155 (goto-char (point-min))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1156 (if (re-search-forward " has \\([0-9]+\\) " nil t)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1157 (values (car (read-from-string (match-string 1))) u folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1158 (values 0 u folder)))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1159
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1160 (defun mh-folder-size-flist (folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1161 "Find size of FOLDER using `flist'."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1162 (with-temp-buffer
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1163 (call-process (expand-file-name "flist" mh-progs) nil t nil "-showzero"
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1164 "-norecurse" folder "-sequence" (symbol-name mh-unseen-seq))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1165 (goto-char (point-min))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1166 (multiple-value-bind (folder unseen total)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1167 (mh-parse-flist-output-line
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1168 (buffer-substring (point) (line-end-position)))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1169 (values total unseen folder))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1170
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1171 (defun mh-folder-size (folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1172 "Find size of FOLDER."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1173 (if mh-flists-present-flag
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1174 (mh-folder-size-flist folder)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1175 (mh-folder-size-folder folder)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1176
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1177 (defun mh-visit-folder (folder &optional range index-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1178 "Visit FOLDER and display RANGE of messages.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1179 Do not call this function from outside MH-E; see \\[mh-rmail] instead.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1180
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1181 If RANGE is nil (the default if it is omitted when called non-interactively),
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1182 then all messages in FOLDER are displayed.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1183
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1184 If an index buffer is being created then INDEX-DATA is used to initialize the
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1185 index buffer specific data structures.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1186
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1187 A prefix argument will cause a prompt for the RANGE of messages
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1188 regardless of the size of the `mh-large-folder' variable."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1189 (interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t)))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1190 (list folder-name
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1191 (mh-read-range "Scan" folder-name t nil
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1192 current-prefix-arg
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1193 mh-interpret-number-as-range-flag))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1194 (let ((config (current-window-configuration))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1195 (current-buffer (current-buffer))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1196 (threaded-view-flag mh-show-threads-flag))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1197 (delete-other-windows)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1198 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1199 (when (get-buffer folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1200 (set-buffer folder)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1201 (setq threaded-view-flag (memq 'unthread mh-view-ops))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1202 (when index-data
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1203 (mh-make-folder folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1204 (setq mh-index-data (car index-data)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1205 mh-index-msg-checksum-map (make-hash-table :test #'equal)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1206 mh-index-checksum-origin-map (make-hash-table :test #'equal))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1207 (mh-index-update-maps folder (cadr index-data))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1208 (mh-index-create-sequences))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1209 (mh-scan-folder folder (or range "all"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1210 (cond ((and threaded-view-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1211 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1212 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1213 (or (null mh-large-folder)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1214 (not (equal (forward-line (1+ mh-large-folder)) 0))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1215 (and (message "Not threading since the number of messages exceeds `mh-large-folder'")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1216 nil))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1217 (mh-toggle-threads))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1218 (mh-index-data
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1219 (mh-index-insert-folder-headers)))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1220 (unless (eq current-buffer (current-buffer))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1221 (setq mh-previous-window-config config)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1222 nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1223
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1224
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1225 (defun mh-update-sequences ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1226 "Update MH's Unseen-Sequence and current folder and message.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1227 Flush MH-E's state out to MH. The message at the cursor becomes current."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1228 (interactive)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1229 ;; mh-update-sequences is the opposite of mh-read-folder-sequences,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1230 ;; which updates MH-E's state from MH.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1231 (let ((folder-set (mh-update-unseen))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1232 (new-cur (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1233 (if new-cur
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1234 (let ((seq-entry (mh-find-seq 'cur)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1235 (mh-remove-cur-notation)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1236 (setcdr seq-entry
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1237 (list new-cur)) ;delete-seq-locally, add-msgs-to-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1238 (mh-define-sequence 'cur (list new-cur))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1239 (beginning-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1240 (if (looking-at mh-scan-good-msg-regexp)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1241 (mh-notate-cur)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1242 (or folder-set
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1243 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1244 ;; psg - mh-current-folder is nil if mh-summary-height < 4 !
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1245 ;; So I added this sanity check.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1246 (if (stringp mh-current-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1247 (mh-exec-cmd-quiet t "folder" mh-current-folder "-fast")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1248 (mh-exec-cmd-quiet t "folder" "-fast")))))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1249
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1250
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1251
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1252 ;;; Support routines.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1253
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1254 (defun mh-delete-a-msg (msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1255 "Delete the MSG.
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1256 If MSG is nil then the message at point is deleted.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1257
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1258 The value of `mh-delete-msg-hook' is a list of functions to be called, with no
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1259 arguments, after the message has been deleted."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1260 (save-excursion
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1261 (if (numberp msg)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1262 (mh-goto-msg msg nil t)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1263 (beginning-of-line)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1264 (setq msg (mh-get-msg-num t)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1265 (if (looking-at mh-scan-refiled-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1266 (error "Message %d is refiled. Undo refile before deleting" msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1267 (if (looking-at mh-scan-deleted-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1268 nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1269 (mh-set-folder-modified-p t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1270 (setq mh-delete-list (cons msg mh-delete-list))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1271 (mh-notate nil mh-note-deleted mh-cmd-note)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1272 (run-hooks 'mh-delete-msg-hook))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1273
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1274 (defun mh-refile-a-msg (msg folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1275 "Refile MSG in FOLDER.
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1276 If MSG is nil then the message at point is refiled.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1277
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1278 Folder is a symbol, not a string.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1279 The value of `mh-refile-msg-hook' is a list of functions to be called, with no
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1280 arguments, after the message has been refiled."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1281 (save-excursion
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1282 (if (numberp msg)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1283 (mh-goto-msg msg nil t)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1284 (beginning-of-line)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1285 (setq msg (mh-get-msg-num t)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1286 (cond ((looking-at mh-scan-deleted-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1287 (error "Message %d is deleted. Undo delete before moving" msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1288 ((looking-at mh-scan-refiled-msg-regexp)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1289 (if (y-or-n-p
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1290 (format "Message %d already refiled. Copy to %s as well? "
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1291 msg folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1292 (mh-exec-cmd "refile" (mh-get-msg-num t) "-link"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1293 "-src" mh-current-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1294 (symbol-name folder))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1295 (message "Message not copied")))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1296 (t
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1297 (mh-set-folder-modified-p t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1298 (cond ((null (assoc folder mh-refile-list))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1299 (push (list folder msg) mh-refile-list))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1300 ((not (member msg (cdr (assoc folder mh-refile-list))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1301 (push msg (cdr (assoc folder mh-refile-list)))))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1302 (mh-notate nil mh-note-refiled mh-cmd-note)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1303 (run-hooks 'mh-refile-msg-hook)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1304
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1305 (defun mh-next-msg (&optional wait-after-complaining-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1306 "Move backward or forward to the next undeleted message in the buffer.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1307 If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1308 last message, then wait for a second after telling the user that there aren't
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1309 any more unread messages."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1310 (if (eq mh-next-direction 'forward)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1311 (mh-next-undeleted-msg 1 wait-after-complaining-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1312 (mh-previous-undeleted-msg 1 wait-after-complaining-flag)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1313
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1314 (defun mh-next-unread-msg (&optional count)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1315 "Move to next unread message.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1316 With optional argument COUNT, COUNT-1 unread messages are skipped."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1317 (interactive "p")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1318 (unless (> count 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1319 (error "The function mh-next-unread-msg expects positive argument"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1320 (setq count (1- count))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1321 (let ((unread-sequence (reverse (cdr (assoc mh-unseen-seq mh-seq-list))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1322 (cur-msg (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1323 (cond ((and (not cur-msg) (not (bobp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1324 ;; If we are at the end of the buffer back up one line and go
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1325 ;; to unread message after that.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1326 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1327 (forward-line -1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1328 (setq cur-msg (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1329 nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1330 ((or (null unread-sequence) (not cur-msg))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1331 ;; No unread message or there aren't any messages in buffer...
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1332 (message "No more unread messages"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1333 ((progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1334 ;; Skip messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1335 (while (and unread-sequence (>= cur-msg (car unread-sequence)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1336 (setq unread-sequence (cdr unread-sequence)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1337 (while (> count 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1338 (setq unread-sequence (cdr unread-sequence))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1339 (setq count (1- count)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1340 (not (car unread-sequence)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1341 (message "No more unread messages"))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1342 (t (loop for msg in unread-sequence
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1343 when (mh-goto-msg msg t) return nil
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1344 finally (message "No more unread messages"))))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1345
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1346 (defun mh-set-scan-mode ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1347 "Display the scan listing buffer, but do not show a message."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1348 (if (get-buffer mh-show-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1349 (delete-windows-on mh-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1350 (mh-showing-mode 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1351 (force-mode-line-update)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1352 (if mh-recenter-summary-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1353 (mh-recenter nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1354
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1355 (defun mh-undo-msg (msg)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1356 "Undo the deletion or refile of one MSG.
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1357 If MSG is nil then act on the message at point"
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1358 (save-excursion
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1359 (if (numberp msg)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1360 (mh-goto-msg msg t t)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1361 (beginning-of-line)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1362 (setq msg (mh-get-msg-num t)))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1363 (cond ((memq msg mh-delete-list)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1364 (setq mh-delete-list (delq msg mh-delete-list)))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1365 (t
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1366 (dolist (folder-msg-list mh-refile-list)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1367 (setf (cdr folder-msg-list) (remove msg (cdr folder-msg-list))))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1368 (setq mh-refile-list (loop for x in mh-refile-list
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1369 unless (null (cdr x)) collect x))))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1370 (mh-notate nil ? mh-cmd-note)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1371
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1372
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1373
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1374 ;;; The folder data abstraction.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1375
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1376 (defvar mh-index-data-file ".mhe_index"
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1377 "MH-E specific file where index seach info is stored.")
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1378
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1379 (defun mh-make-folder (name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1380 "Create a new mail folder called NAME.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1381 Make it the current folder."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1382 (switch-to-buffer name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1383 (setq buffer-read-only nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1384 (erase-buffer)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1385 (if mh-adaptive-cmd-note-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1386 (mh-set-cmd-note (mh-message-number-width name)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1387 (setq buffer-read-only t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1388 (mh-folder-mode)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1389 (mh-set-folder-modified-p nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1390 (setq buffer-file-name mh-folder-filename)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1391 (when (and (not mh-index-data)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1392 (file-exists-p (concat buffer-file-name mh-index-data-file)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1393 (mh-index-read-data))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1394 (mh-make-folder-mode-line))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1395
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1396 ;;; Ensure new buffers won't get this mode if default-major-mode is nil.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1397 (put 'mh-folder-mode 'mode-class 'special)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1398
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1399
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1400
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1401 ;;; Menu extracted from mh-menubar.el V1.1 (31 July 2001)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1402 ;;; Menus for folder mode: folder, message, sequence (in that order)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1403 ;;; folder-mode "Sequence" menu
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1404 (easy-menu-define
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1405 mh-folder-sequence-menu mh-folder-mode-map "Menu for MH-E folder-sequence."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1406 '("Sequence"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1407 ["Add Message to Sequence..." mh-put-msg-in-seq (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1408 ["List Sequences for Message" mh-msg-is-in-seq (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1409 ["Delete Message from Sequence..." mh-delete-msg-from-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1410 (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1411 ["List Sequences in Folder..." mh-list-sequences t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1412 ["Delete Sequence..." mh-delete-seq t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1413 ["Narrow to Sequence..." mh-narrow-to-seq t]
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1414 ["Widen from Sequence" mh-widen mh-folder-view-stack]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1415 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1416 ["Narrow to Subject Sequence" mh-narrow-to-subject t]
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1417 ["Narrow to Tick Sequence" mh-narrow-to-tick
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1418 (and mh-tick-seq (mh-seq-msgs (mh-find-seq mh-tick-seq)))]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1419 ["Delete Rest of Same Subject" mh-delete-subject t]
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1420 ["Toggle Tick Mark" mh-toggle-tick t]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1421 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1422 ["Push State Out to MH" mh-update-sequences t]))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1423
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1424 ;;; folder-mode "Message" menu
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1425 (easy-menu-define
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1426 mh-folder-message-menu mh-folder-mode-map "Menu for MH-E folder-message."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1427 '("Message"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1428 ["Show Message" mh-show (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1429 ["Show Message with Header" mh-header-display (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1430 ["Next Message" mh-next-undeleted-msg t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1431 ["Previous Message" mh-previous-undeleted-msg t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1432 ["Go to First Message" mh-first-msg t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1433 ["Go to Last Message" mh-last-msg t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1434 ["Go to Message by Number..." mh-goto-msg t]
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1435 ["Modify Message" mh-modify t]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1436 ["Delete Message" mh-delete-msg (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1437 ["Refile Message" mh-refile-msg (mh-get-msg-num nil)]
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1438 ["Undo Delete/Refile" mh-undo (mh-outstanding-commands-p)]
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1439 ["Execute Delete/Refile" mh-execute-commands
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1440 (mh-outstanding-commands-p)]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1441 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1442 ["Compose a New Message" mh-send t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1443 ["Reply to Message..." mh-reply (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1444 ["Forward Message..." mh-forward (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1445 ["Redistribute Message..." mh-redistribute (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1446 ["Edit Message Again" mh-edit-again (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1447 ["Re-edit a Bounced Message" mh-extract-rejected-mail t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1448 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1449 ["Copy Message to Folder..." mh-copy-msg (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1450 ["Print Message" mh-print-msg (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1451 ["Write Message to File..." mh-write-msg-to-file
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1452 (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1453 ["Pipe Message to Command..." mh-pipe-msg (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1454 ["Unpack Uuencoded Message..." mh-store-msg (mh-get-msg-num nil)]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1455 ["Burst Digest Message" mh-burst-digest (mh-get-msg-num nil)]))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1456
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1457 ;;; folder-mode "Folder" menu
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1458 (easy-menu-define
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1459 mh-folder-folder-menu mh-folder-mode-map "Menu for MH-E folder."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1460 '("Folder"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1461 ["Incorporate New Mail" mh-inc-folder t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1462 ["Toggle Show/Folder" mh-toggle-showing t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1463 ["Execute Delete/Refile" mh-execute-commands
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1464 (mh-outstanding-commands-p)]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1465 ["Rescan Folder" mh-rescan-folder t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1466 ["Thread Folder" mh-toggle-threads
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1467 (not (memq 'unthread mh-view-ops))]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1468 ["Pack Folder" mh-pack-folder t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1469 ["Sort Folder" mh-sort-folder t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1470 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1471 ["List Folders" mh-list-folders t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1472 ["Visit a Folder..." mh-visit-folder t]
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1473 ["View New Messages" mh-index-new-messages t]
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1474 ["Search a Folder..." mh-search-folder t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1475 ["Indexed Search..." mh-index-search t]
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1476 "--"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1477 ["Quit MH-E" mh-quit t]))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1478
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1479
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1480
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1481 (defmacro mh-remove-xemacs-horizontal-scrollbar ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1482 "Get rid of the horizontal scrollbar that XEmacs insists on putting in."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1483 (when mh-xemacs-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1484 `(if (and (featurep 'scrollbar)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1485 (fboundp 'set-specifier))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1486 (set-specifier horizontal-scrollbar-visible-p nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1487 (cons (current-buffer) nil)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1488
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1489 (defmacro mh-write-file-functions-compat ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1490 "Return `write-file-functions' if it exists.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1491 Otherwise return `local-write-file-hooks'. This macro exists purely for
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1492 compatibility. The former symbol is used in Emacs 21.4 onward while the latter
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1493 is used in previous versions and XEmacs."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1494 (if (boundp 'write-file-functions)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1495 ''write-file-functions ;Emacs 21.4
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1496 ''local-write-file-hooks)) ;<Emacs 21.4, XEmacs
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1497
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1498 ;; Avoid compiler warnings in non-bleeding edge versions of Emacs.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1499 (eval-when-compile
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1500 (defvar tool-bar-mode)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1501 (defvar tool-bar-map)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1502 (defvar desktop-save-buffer)) ;Emacs 21.4
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1503
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1504 ;; Register mh-folder-mode as supporting which-function-mode...
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1505 (load "which-func" t t)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1506 (when (and (boundp 'which-func-modes)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1507 (not (member 'mh-folder-mode which-func-modes)))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1508 (push 'mh-folder-mode which-func-modes))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1509
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1510 (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1511 "Major MH-E mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map>
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1512
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1513 You can show the message the cursor is pointing to, and step through the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1514 messages. Messages can be marked for deletion or refiling into another
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1515 folder; these commands are executed all at once with a separate command.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1516
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1517 Options that control this mode can be changed with \\[customize-group];
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1518 specify the \"mh\" group. In particular, please see the `mh-scan-format-file'
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1519 option if you wish to modify scan's format.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1520
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1521 When a folder is visited, the hook `mh-folder-mode-hook' is run.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1522
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1523 Ranges
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1524 ======
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1525 Many commands that operate on individual messages, such as `mh-forward' or
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1526 `mh-refile-msg' take a RANGE argument. This argument can be used in several
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1527 ways.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1528
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1529 If you provide the prefix argument (\\[universal-argument]) to these commands,
60921
78e08044a734 * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'.
Werner LEMBERG <wl@gnu.org>
parents: 60910
diff changeset
1530 then you will be prompted for the message range. This can be any valid MH
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1531 range which can include messages, sequences, and the abbreviations (described
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1532 in the mh(1) man page):
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1533
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1534 <num1>-<num2>
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1535 Indicates all messages in the range <num1> to <num2>, inclusive. The range
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1536 must be nonempty.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1537
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1538 `<num>:N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1539 `<num>:+N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1540 `<num>:-N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1541 Up to N messages beginning with (or ending with) message num. Num may be
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1542 any of the pre-defined symbols: first, prev, cur, next or last.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1543
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1544 `first:N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1545 `prev:N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1546 `next:N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1547 `last:N'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1548 The first, previous, next or last messages, if they exist.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1549
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1550 `all'
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1551 All of the messages.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1552
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1553 For example, a range that shows all of these things is `1 2 3 5-10 last:5
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1554 unseen'.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1555
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1556 If the option `transient-mark-mode' is set to t and you set a region in the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1557 MH-Folder buffer, then the MH-E command will perform the operation on all
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1558 messages in that region.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1559
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1560 \\{mh-folder-mode-map}"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1561
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1562 (make-local-variable 'font-lock-defaults)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1563 (setq font-lock-defaults '(mh-folder-font-lock-keywords t))
55151
b702b580608d (mh-folder-mode): Bind desktop-save-buffer to t.
Lars Hansen <larsh@soem.dk>
parents: 55083
diff changeset
1564 (make-local-variable 'desktop-save-buffer)
b702b580608d (mh-folder-mode): Bind desktop-save-buffer to t.
Lars Hansen <larsh@soem.dk>
parents: 55083
diff changeset
1565 (setq desktop-save-buffer t)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1566 (mh-make-local-vars
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1567 'mh-colors-available-flag (mh-colors-available-p)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1568 ; Do we have colors available
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1569 'mh-current-folder (buffer-name) ; Name of folder, a string
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1570 'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1571 'mh-folder-filename ; e.g. "/usr/foobar/Mail/inbox/"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1572 (file-name-as-directory (mh-expand-file-name (buffer-name)))
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1573 'mh-display-buttons-for-inline-parts-flag
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1574 mh-display-buttons-for-inline-parts-flag ; Allow for display of buttons to
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1575 ; be toggled.
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1576 'mh-arrow-marker (make-marker) ; Marker where arrow is displayed
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1577 'overlay-arrow-position nil ; Allow for simultaneous display in
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1578 'overlay-arrow-string ">" ; different MH-E buffers.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1579 'mh-showing-mode nil ; Show message also?
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1580 'mh-delete-list nil ; List of msgs nums to delete
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1581 'mh-refile-list nil ; List of folder names in mh-seq-list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1582 'mh-seq-list nil ; Alist of (seq . msgs) nums
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1583 'mh-seen-list nil ; List of displayed messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1584 'mh-next-direction 'forward ; Direction to move to next message
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1585 'mh-view-ops () ; Stack that keeps track of the order
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1586 ; in which narrowing/threading has been
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1587 ; carried out.
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1588 'mh-folder-view-stack () ; Stack of previous views of the
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1589 ; folder.
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1590 'mh-index-data nil ; If the folder was created by a call
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1591 ; to mh-index-search this contains info
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1592 ; about the search results.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1593 'mh-index-previous-search nil ; Previous folder and search-regexp
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1594 'mh-index-msg-checksum-map nil ; msg -> checksum map
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1595 'mh-index-checksum-origin-map nil ; checksum -> ( orig-folder, orig-msg )
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1596 'mh-index-sequence-search-flag nil ; folder resulted from sequence search
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1597 'mh-first-msg-num nil ; Number of first msg in buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1598 'mh-last-msg-num nil ; Number of last msg in buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1599 'mh-msg-count nil ; Number of msgs in buffer
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1600 'mh-mode-line-annotation nil ; Indicates message range
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1601 'mh-sequence-notation-history (make-hash-table)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1602 ; Remember what is overwritten by
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1603 ; mh-note-seq.
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1604 'imenu-create-index-function 'mh-index-create-imenu-index
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1605 ; Setup imenu support
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1606 'mh-previous-window-config nil) ; Previous window configuration
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1607 (mh-remove-xemacs-horizontal-scrollbar)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1608 (setq truncate-lines t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1609 (auto-save-mode -1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1610 (setq buffer-offer-save t)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1611 (mh-make-local-hook (mh-write-file-functions-compat))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1612 (add-hook (mh-write-file-functions-compat) 'mh-execute-commands nil t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1613 (make-local-variable 'revert-buffer-function)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1614 (make-local-variable 'hl-line-mode) ; avoid pollution
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1615 (mh-funcall-if-exists hl-line-mode 1)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1616 (setq revert-buffer-function 'mh-undo-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1617 (or (assq 'mh-showing-mode minor-mode-alist)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1618 (setq minor-mode-alist
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1619 (cons '(mh-showing-mode " Show") minor-mode-alist)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1620 (easy-menu-add mh-folder-sequence-menu)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1621 (easy-menu-add mh-folder-message-menu)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1622 (easy-menu-add mh-folder-folder-menu)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1623 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1624 (mh-funcall-if-exists mh-toolbar-init :folder)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1625 (if (and mh-xemacs-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1626 font-lock-auto-fontify)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1627 (turn-on-font-lock))) ; Force font-lock in XEmacs.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1628
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1629 (defun mh-toggle-mime-buttons ()
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1630 "Toggle display of buttons for inline MIME parts."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1631 (interactive)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1632 (setq mh-display-buttons-for-inline-parts-flag
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1633 (not mh-display-buttons-for-inline-parts-flag))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1634 (mh-show nil t))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1635
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1636 (defun mh-colors-available-p ()
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1637 "Check if colors are available in the Emacs being used."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1638 (or mh-xemacs-flag
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1639 (let ((color-cells
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1640 (or (ignore-errors (mh-funcall-if-exists display-color-cells))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1641 (ignore-errors (mh-funcall-if-exists
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1642 x-display-color-cells)))))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1643 (and (numberp color-cells) (>= color-cells 8)))))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1644
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1645 (defun mh-colors-in-use-p ()
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1646 "Check if colors are being used in the folder buffer."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1647 (and mh-colors-available-flag font-lock-mode))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1648
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1649 (defun mh-make-local-vars (&rest pairs)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1650 "Initialize local variables according to the variable-value PAIRS."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1651
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1652 (while pairs
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1653 (set (make-local-variable (car pairs)) (car (cdr pairs)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1654 (setq pairs (cdr (cdr pairs)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1655
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1656 ;;;###autoload
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1657 (defun mh-restore-desktop-buffer (desktop-buffer-file-name
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1658 desktop-buffer-name
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1659 desktop-buffer-misc)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1660 "Restore an MH folder buffer specified in a desktop file.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1661 When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the file name to
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1662 visit, DESKTOP-BUFFER-NAME holds the desired buffer name, and
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1663 DESKTOP-BUFFER-MISC holds a list of miscellaneous info used by the
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1664 `desktop-buffer-handlers' functions."
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1665 (mh-find-path)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1666 (mh-visit-folder desktop-buffer-name)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1667 (current-buffer))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1668
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1669 (defun mh-scan-folder (folder range &optional dont-exec-pending)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1670 "Scan the FOLDER over the RANGE.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1671 If the optional argument DONT-EXEC-PENDING is non-nil then pending deletes and
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1672 refiles aren't carried out.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1673 Return in the folder's buffer."
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1674 (when (stringp range)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1675 (setq range (delete "" (split-string range "[ \t\n]"))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1676 (cond ((null (get-buffer folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1677 (mh-make-folder folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1678 (t
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1679 (unless dont-exec-pending
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1680 (mh-process-or-undo-commands folder)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1681 (mh-reset-threads-and-narrowing))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1682 (switch-to-buffer folder)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1683 (mh-regenerate-headers range)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1684 (if (zerop (buffer-size))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1685 (if (equal range "all")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1686 (message "Folder %s is empty" folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1687 (message "No messages in %s, range %s" folder range))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1688 (mh-goto-cur-msg))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1689 (when (mh-outstanding-commands-p)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1690 (mh-notate-deleted-and-refiled)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1691
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1692 (defun mh-set-cmd-note (width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1693 "Set `mh-cmd-note' to WIDTH characters (minimum of 2).
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1694
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1695 If `mh-scan-format-file' specifies nil or a filename, then this function
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1696 will NOT update `mh-cmd-note'."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1697 ;; Add one to the width to always have whitespace in column zero.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1698 (setq width (max (1+ width) 2))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1699 (if (and (equal mh-scan-format-file t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1700 (not (eq mh-cmd-note width)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1701 (setq mh-cmd-note width))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1702 mh-cmd-note)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1703
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1704 (defun mh-regenerate-headers (range &optional update)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1705 "Scan folder over range RANGE.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1706 If UPDATE, append the scan lines, otherwise replace."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1707 (let ((folder mh-current-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1708 (range (if (and range (atom range)) (list range) range))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1709 scan-start)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1710 (message "Scanning %s..." folder)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1711 (mh-remove-all-notation)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1712 (with-mh-folder-updating (nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1713 (if update
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1714 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1715 (delete-region (point-min) (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1716 (if mh-adaptive-cmd-note-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1717 (mh-set-cmd-note (mh-message-number-width folder))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1718 (setq scan-start (point))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1719 (apply #'mh-exec-cmd-output
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1720 mh-scan-prog nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1721 (mh-scan-format)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1722 "-noclear" "-noheader"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1723 "-width" (window-width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1724 folder range)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1725 (goto-char scan-start)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1726 (cond ((looking-at "scan: no messages in")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1727 (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1728 ((looking-at (if (mh-variant-p 'mu-mh)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1729 "scan: message set .* does not exist"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1730 "scan: bad message list "))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1731 (keep-lines mh-scan-valid-regexp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1732 ((looking-at "scan: ")) ; Keep error messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1733 (t
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1734 (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1735 (setq mh-seq-list (mh-read-folder-sequences folder nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1736 (mh-notate-user-sequences)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1737 (or update
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1738 (setq mh-mode-line-annotation
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1739 (if (equal range '("all"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1740 nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1741 mh-partial-folder-mode-line-annotation)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1742 (mh-make-folder-mode-line))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1743 (message "Scanning %s...done" folder)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1744
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1745 (defun mh-generate-new-cmd-note (folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1746 "Fix the `mh-cmd-note' value for this FOLDER.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1747
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1748 After doing an `mh-get-new-mail' operation in this FOLDER, at least
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1749 one line that looks like a truncated message number was found.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1750
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1751 Remove the text added by the last `mh-inc' command. It should be the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1752 messages cur-last. Call `mh-set-cmd-note' with the widest message number
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1753 in FOLDER.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1754
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1755 Reformat the message number width on each line in the buffer and trim
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1756 the line length to fit in the window.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1757
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1758 Rescan the FOLDER in the range cur-last in order to display the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1759 messages that were removed earlier. They should all fit in the scan
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1760 line now with no message truncation."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1761 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1762 (let ((maxcol (1- (window-width)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1763 (old-cmd-note mh-cmd-note)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1764 mh-cmd-note-fmt
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1765 msgnum)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1766 ;; Nuke all of the lines just added by the last inc
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1767 (delete-char (- (point-max) (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1768 ;; Update the current buffer to reflect the new mh-cmd-note
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1769 ;; value needed to display messages.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1770 (mh-set-cmd-note (mh-message-number-width folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1771 (setq mh-cmd-note-fmt (concat "%" (format "%d" mh-cmd-note) "d"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1772 ;; Cleanup the messages that are in the buffer right now
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1773 (goto-char (point-min))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1774 (cond ((memq 'unthread mh-view-ops)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1775 (mh-thread-add-spaces (- mh-cmd-note old-cmd-note)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1776 (t (while (re-search-forward mh-scan-msg-number-regexp nil 0 1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1777 ;; reformat the number to fix in mh-cmd-note columns
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1778 (setq msgnum (string-to-number
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1779 (buffer-substring
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1780 (match-beginning 1) (match-end 1))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1781 (replace-match (format mh-cmd-note-fmt msgnum))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1782 ;; trim the line to fix in the window
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1783 (end-of-line)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1784 (let ((eol (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1785 (move-to-column maxcol)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1786 (if (<= (point) eol)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1787 (delete-char (- eol (point))))))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1788 ;; now re-read the lost messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1789 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1790 (prog1 (point)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1791 (mh-regenerate-headers "cur-last" t)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1792
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1793 (defun mh-get-new-mail (maildrop-name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1794 "Read new mail from MAILDROP-NAME into the current buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1795 Return in the current buffer."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1796 (let ((point-before-inc (point))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1797 (folder mh-current-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1798 (new-mail-flag nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1799 (with-mh-folder-updating (t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1800 (if maildrop-name
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1801 (message "inc %s -file %s..." folder maildrop-name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1802 (message "inc %s..." folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1803 (setq mh-next-direction 'forward)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1804 (goto-char (point-max))
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1805 (mh-remove-cur-notation)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1806 (let ((start-of-inc (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1807 (if maildrop-name
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1808 ;; I think MH 5 used "-ms-file" instead of "-file",
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1809 ;; which would make inc'ing from maildrops fail.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1810 (mh-exec-cmd-output mh-inc-prog nil folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1811 (mh-scan-format)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1812 "-file" (expand-file-name maildrop-name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1813 "-width" (window-width)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1814 "-truncate")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1815 (mh-exec-cmd-output mh-inc-prog nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1816 (mh-scan-format)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1817 "-width" (window-width)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1818 (if maildrop-name
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1819 (message "inc %s -file %s...done" folder maildrop-name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1820 (message "inc %s...done" folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1821 (goto-char start-of-inc)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1822 (cond ((save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1823 (re-search-forward "^inc: no mail" nil t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1824 (message "No new mail%s%s" (if maildrop-name " in " "")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1825 (if maildrop-name maildrop-name "")))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1826 ((and (when mh-folder-view-stack
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1827 (let ((saved-text (buffer-substring-no-properties
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1828 start-of-inc (point-max))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1829 (delete-region start-of-inc (point-max))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1830 (unwind-protect (mh-widen t)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1831 (mh-remove-cur-notation)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1832 (goto-char (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1833 (setq start-of-inc (point))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1834 (insert saved-text)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1835 (goto-char start-of-inc))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1836 nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1837 ((re-search-forward "^inc:" nil t) ; Error messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1838 (error "Error incorporating mail"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1839 ((and
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1840 (equal mh-scan-format-file t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1841 mh-adaptive-cmd-note-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1842 ;; Have we reached an edge condition?
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1843 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1844 (re-search-forward mh-scan-msg-overflow-regexp nil 0 1))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1845 (setq start-of-inc (mh-generate-new-cmd-note folder))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1846 nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1847 (t
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1848 (setq new-mail-flag t)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1849 (keep-lines mh-scan-valid-regexp) ; Flush random scan lines
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1850 (let* ((sequences (mh-read-folder-sequences folder t))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1851 (new-cur (assoc 'cur sequences))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1852 (new-unseen (assoc mh-unseen-seq sequences)))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1853 (unless (assoc 'cur mh-seq-list)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1854 (push (list 'cur) mh-seq-list))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1855 (unless (assoc mh-unseen-seq mh-seq-list)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1856 (push (list mh-unseen-seq) mh-seq-list))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1857 (setcdr (assoc 'cur mh-seq-list) (cdr new-cur))
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1858 (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1859 (when (equal (point-max) start-of-inc)
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1860 (mh-notate-cur))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1861 (if new-mail-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1862 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1863 (mh-make-folder-mode-line)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1864 (when (mh-speed-flists-active-p)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1865 (mh-speed-flists t mh-current-folder))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1866 (when (memq 'unthread mh-view-ops)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1867 (mh-thread-inc folder start-of-inc))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1868 (mh-goto-cur-msg))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1869 (goto-char point-before-inc))
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
1870 (mh-notate-user-sequences (cons start-of-inc (point-max)))))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1871
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1872 (defun mh-make-folder-mode-line (&optional ignored)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1873 "Set the fields of the mode line for a folder buffer.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1874 The optional argument is now obsolete and IGNORED. It used to be used to pass
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1875 in what is now stored in the buffer-local variable `mh-mode-line-annotation'."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1876 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1877 (save-window-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1878 (mh-first-msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1879 (let ((new-first-msg-num (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1880 (when (or (not (memq 'unthread mh-view-ops))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1881 (null mh-first-msg-num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1882 (null new-first-msg-num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1883 (< new-first-msg-num mh-first-msg-num))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1884 (setq mh-first-msg-num new-first-msg-num)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1885 (mh-last-msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1886 (let ((new-last-msg-num (mh-get-msg-num nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1887 (when (or (not (memq 'unthread mh-view-ops))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1888 (null mh-last-msg-num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1889 (null new-last-msg-num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1890 (> new-last-msg-num mh-last-msg-num))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1891 (setq mh-last-msg-num new-last-msg-num)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1892 (setq mh-msg-count (if mh-first-msg-num
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1893 (count-lines (point-min) (point-max))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1894 0))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1895 (setq mode-line-buffer-identification
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1896 (list (format " {%%b%s} %s msg%s"
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1897 (if mh-mode-line-annotation
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1898 (format "/%s" mh-mode-line-annotation)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1899 "")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1900 (if (zerop mh-msg-count)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1901 "no"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1902 (format "%d" mh-msg-count))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1903 (if (zerop mh-msg-count)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1904 "s"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1905 (cond ((> mh-msg-count 1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1906 (format "s (%d-%d)" mh-first-msg-num
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1907 mh-last-msg-num))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1908 (mh-first-msg-num
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1909 (format " (%d)" mh-first-msg-num))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1910 (""))))))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1911 (mh-logo-display))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1912
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1913 (defun mh-add-sequence-notation (msg internal-seq-flag)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1914 "Add sequence notation to the MSG on the current line.
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1915 If INTERNAL-SEQ-FLAG is non-nil, then refontify the scan line if font-lock is
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1916 turned on."
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1917 (with-mh-folder-updating (t)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1918 (save-excursion
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1919 (beginning-of-line)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1920 (if internal-seq-flag
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1921 (progn
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1922 ;; Change the buffer so that if transient-mark-mode is active
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1923 ;; and there is an active region it will get deactivated as in
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1924 ;; the case of user sequences.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1925 (mh-notate nil nil mh-cmd-note)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1926 (when font-lock-mode
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1927 (font-lock-fontify-region (point) (line-end-position))))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1928 (forward-char (1+ mh-cmd-note))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1929 (let ((stack (gethash msg mh-sequence-notation-history)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1930 (setf (gethash msg mh-sequence-notation-history)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1931 (cons (char-after) stack)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1932 (mh-notate nil mh-note-seq (1+ mh-cmd-note))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1933
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1934 (defun mh-remove-sequence-notation (msg internal-seq-flag &optional all)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1935 "Remove sequence notation from the MSG on the current line.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1936 If INTERNAL-SEQ-FLAG is non-nil, then `font-lock' was used to highlight the
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1937 sequence. In that case, no notation needs to be removed. Otherwise the effect
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1938 of inserting `mh-note-seq' needs to be reversed.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1939 If ALL is non-nil, then all sequence marks on the scan line are removed."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1940 (with-mh-folder-updating (t)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1941 ;; This takes care of internal sequences...
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1942 (mh-notate nil nil mh-cmd-note)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1943 (unless internal-seq-flag
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1944 ;; ... and this takes care of user sequences.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1945 (let ((stack (gethash msg mh-sequence-notation-history)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1946 (while (and all (cdr stack))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1947 (setq stack (cdr stack)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1948 (when stack
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1949 (save-excursion
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1950 (beginning-of-line)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1951 (forward-char (1+ mh-cmd-note))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1952 (delete-char 1)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1953 (insert (car stack))))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1954 (setf (gethash msg mh-sequence-notation-history) (cdr stack))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1955
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1956 (defun mh-remove-cur-notation ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1957 "Remove old cur notation."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1958 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1959 (save-excursion
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1960 (when (and cur-msg
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1961 (mh-goto-msg cur-msg t t)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1962 (looking-at mh-scan-cur-msg-number-regexp))
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1963 (mh-notate nil ? mh-cmd-note)
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1964 (setq overlay-arrow-position nil)))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1965
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1966 (defun mh-remove-all-notation ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1967 "Remove all notations on all scan lines that MH-E introduces."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1968 (save-excursion
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1969 (setq overlay-arrow-position nil)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1970 (goto-char (point-min))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1971 (mh-iterate-on-range msg (cons (point-min) (point-max))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1972 (mh-notate nil ? mh-cmd-note)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1973 (mh-remove-sequence-notation msg nil t))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
1974 (clrhash mh-sequence-notation-history)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1975
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
1976
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1977 (defun mh-goto-cur-msg (&optional minimal-changes-flag)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1978 "Position the cursor at the current message.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1979 When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1980 recenter the folder buffer."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1981 (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1982 (cond ((and cur-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1983 (mh-goto-msg cur-msg t t))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1984 (unless minimal-changes-flag
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1985 (mh-notate-cur)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1986 (mh-recenter 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1987 (mh-maybe-show cur-msg)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1988 (t
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
1989 (setq overlay-arrow-position nil)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1990 (message "No current message")))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1991
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1992 (defun mh-process-or-undo-commands (folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1993 "If FOLDER has outstanding commands, then either process or discard them.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1994 Called by functions like `mh-sort-folder', so also invalidate show buffer."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1995 (set-buffer folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1996 (if (mh-outstanding-commands-p)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1997 (if (or mh-do-not-confirm-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1998 (y-or-n-p
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
1999 "Process outstanding deletes and refiles? "))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2000 (mh-process-commands folder)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2001 (set-buffer folder)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2002 (mh-undo-folder)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2003 (mh-update-unseen)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2004 (mh-invalidate-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2005
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2006 (defun mh-process-commands (folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2007 "Process outstanding commands for FOLDER.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2008 The value of `mh-folder-updated-hook' is a list of functions to be called,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2009 with no arguments, before the commands are processed."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2010 (message "Processing deletes and refiles for %s..." folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2011 (set-buffer folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2012 (with-mh-folder-updating (nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2013 ;; Run the hook while the lists are still valid
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2014 (run-hooks 'mh-folder-updated-hook)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2015
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2016 ;; Update the unseen sequence if it exists
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2017 (mh-update-unseen)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2018
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2019 (let ((redraw-needed-flag mh-index-data)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2020 (folders-changed (list mh-current-folder))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2021 (seq-map (and mh-refile-list mh-refile-preserves-sequences-flag
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2022 (mh-create-sequence-map mh-seq-list)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2023 (dest-map (and mh-refile-list mh-refile-preserves-sequences-flag
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2024 (make-hash-table))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2025 ;; Remove invalid scan lines if we are in an index folder and then remove
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2026 ;; the real messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2027 (when mh-index-data
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2028 (mh-index-delete-folder-headers)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2029 (setq folders-changed
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2030 (append folders-changed (mh-index-execute-commands))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2031
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2032 ;; Then refile messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2033 (mh-mapc #'(lambda (folder-msg-list)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2034 (let* ((dest-folder (symbol-name (car folder-msg-list)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2035 (last (car (mh-translate-range dest-folder "last")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2036 (msgs (cdr folder-msg-list)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2037 (push dest-folder folders-changed)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2038 (setq redraw-needed-flag t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2039 (apply #'mh-exec-cmd
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2040 "refile" "-src" folder dest-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2041 (mh-coalesce-msg-list msgs))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2042 (mh-delete-scan-msgs msgs)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2043 ;; Preserve sequences in destination folder...
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2044 (when mh-refile-preserves-sequences-flag
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2045 (clrhash dest-map)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2046 (loop for i from (1+ (or last 0))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2047 for msg in (sort (copy-sequence msgs) #'<)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2048 do (loop for seq-name in (gethash msg seq-map)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2049 do (push i (gethash seq-name dest-map))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2050 (maphash
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2051 #'(lambda (seq msgs)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2052 ;; Can't be run in the background, since the
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2053 ;; current folder is changed by mark this could
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2054 ;; lead to a race condition with the next refile.
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2055 (apply #'mh-exec-cmd "mark"
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2056 "-sequence" (symbol-name seq) dest-folder
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2057 "-add" (mapcar #'(lambda (x) (format "%s" x))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2058 (mh-coalesce-msg-list msgs))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2059 dest-map))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2060 mh-refile-list)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2061 (setq mh-refile-list ())
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2062
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2063 ;; Now delete messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2064 (cond (mh-delete-list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2065 (setq redraw-needed-flag t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2066 (apply 'mh-exec-cmd "rmm" folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2067 (mh-coalesce-msg-list mh-delete-list))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2068 (mh-delete-scan-msgs mh-delete-list)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2069 (setq mh-delete-list nil)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2070
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2071 ;; Don't need to remove sequences since delete and refile do so.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2072 ;; Mark cur message
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2073 (if (> (buffer-size) 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2074 (mh-define-sequence 'cur (list (or (mh-get-msg-num nil) "last"))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2075
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2076 ;; Redraw folder buffer if needed
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2077 (when (and redraw-needed-flag)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2078 (when (mh-speed-flists-active-p)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2079 (apply #'mh-speed-flists t folders-changed))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2080 (cond ((memq 'unthread mh-view-ops) (mh-thread-inc folder (point-max)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2081 (mh-index-data (mh-index-insert-folder-headers)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2082
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2083 (and (buffer-file-name (get-buffer mh-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2084 (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2085 ;; If "inc" were to put a new msg in this file,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2086 ;; we would not notice, so mark it invalid now.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2087 (mh-invalidate-show-buffer))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2088
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2089 (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2090 (mh-remove-all-notation)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2091 (mh-notate-user-sequences)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2092 (message "Processing deletes and refiles for %s...done" folder)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2093
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2094 (defun mh-update-unseen ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2095 "Synchronize the unseen sequence with MH.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2096 Return non-nil iff the MH folder was set.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2097 The value of `mh-unseen-updated-hook' is a list of functions to be called,
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2098 with no arguments, after the unseen sequence is updated."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2099 (if mh-seen-list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2100 (let* ((unseen-seq (mh-find-seq mh-unseen-seq))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2101 (unseen-msgs (mh-seq-msgs unseen-seq)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2102 (if unseen-msgs
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2103 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2104 (mh-undefine-sequence mh-unseen-seq mh-seen-list)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2105 (run-hooks 'mh-unseen-updated-hook)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2106 (while mh-seen-list
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2107 (setq unseen-msgs (delq (car mh-seen-list) unseen-msgs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2108 (setq mh-seen-list (cdr mh-seen-list)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2109 (setcdr unseen-seq unseen-msgs)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2110 t) ;since we set the folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2111 (setq mh-seen-list nil)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2112
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2113 (defun mh-delete-scan-msgs (msgs)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2114 "Delete the scan listing lines for MSGS."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2115 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2116 (while msgs
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2117 (when (mh-goto-msg (car msgs) t t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2118 (when (memq 'unthread mh-view-ops)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2119 (mh-thread-forget-message (car msgs)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2120 (mh-delete-line 1))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2121 (setq msgs (cdr msgs)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2122
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2123 (defun mh-outstanding-commands-p ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2124 "Return non-nil if there are outstanding deletes or refiles."
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2125 (save-excursion
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2126 (when (eq major-mode 'mh-show-mode)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2127 (set-buffer mh-show-folder-buffer))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2128 (or mh-delete-list mh-refile-list)))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2129
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2130 (defun mh-coalesce-msg-list (messages)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2131 "Given a list of MESSAGES, return a list of message number ranges.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2132 This is the inverse of `mh-read-msg-list', which expands ranges.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2133 Message lists passed to MH programs should be processed by this function
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2134 to avoid exceeding system command line argument limits."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2135 (let ((msgs (sort (copy-sequence messages) 'mh-greaterp))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2136 (range-high nil)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2137 (prev -1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2138 (ranges nil))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2139 (while prev
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2140 (if range-high
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2141 (if (or (not (numberp prev))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2142 (not (equal (car msgs) (1- prev))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2143 (progn ;non-sequential, flush old range
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2144 (if (eq prev range-high)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2145 (setq ranges (cons range-high ranges))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2146 (setq ranges (cons (format "%s-%s" prev range-high) ranges)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2147 (setq range-high nil))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2148 (or range-high
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2149 (setq range-high (car msgs))) ;start new or first range
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2150 (setq prev (car msgs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2151 (setq msgs (cdr msgs)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2152 ranges))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2153
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2154 (defun mh-greaterp (msg1 msg2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2155 "Return the greater of two message indicators MSG1 and MSG2.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2156 Strings are \"smaller\" than numbers.
60921
78e08044a734 * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'.
Werner LEMBERG <wl@gnu.org>
parents: 60910
diff changeset
2157 Valid values are things like \"cur\", \"last\", 1, and 1820."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2158 (if (numberp msg1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2159 (if (numberp msg2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2160 (> msg1 msg2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2161 t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2162 (if (numberp msg2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2163 nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2164 (string-lessp msg2 msg1))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2165
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2166 (defun mh-lessp (msg1 msg2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2167 "Return the lesser of two message indicators MSG1 and MSG2.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2168 Strings are \"smaller\" than numbers.
60921
78e08044a734 * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'.
Werner LEMBERG <wl@gnu.org>
parents: 60910
diff changeset
2169 Valid values are things like \"cur\", \"last\", 1, and 1820."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2170 (not (mh-greaterp msg1 msg2)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2171
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2172
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2173
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2174 ;;; Basic sequence handling
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2175
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2176 (defun mh-delete-seq-locally (seq)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2177 "Remove MH-E's record of SEQ."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2178 (let ((entry (mh-find-seq seq)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2179 (setq mh-seq-list (delq entry mh-seq-list))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2180
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2181 (defun mh-read-folder-sequences (folder save-refiles)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2182 "Read and return the predefined sequences for a FOLDER.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2183 If SAVE-REFILES is non-nil, then keep the sequences
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2184 that note messages to be refiled."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2185 (let ((seqs ()))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2186 (cond (save-refiles
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2187 (mh-mapc (function (lambda (seq) ; Save the refiling sequences
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2188 (if (mh-folder-name-p (mh-seq-name seq))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2189 (setq seqs (cons seq seqs)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2190 mh-seq-list)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2191 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2192 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2193 (progn
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2194 ;; look for name in line of form "cur: 4" or "myseq (private): 23"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2195 (while (re-search-forward "^[^: ]+" nil t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2196 (setq seqs (cons (mh-make-seq (intern (buffer-substring
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2197 (match-beginning 0)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2198 (match-end 0)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2199 (mh-read-msg-list))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2200 seqs)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2201 (delete-region (point-min) (point))))) ; avoid race with
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2202 ; mh-process-daemon
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2203 seqs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2204
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2205 (defun mh-read-msg-list ()
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2206 "Return a list of message numbers from point to the end of the line.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2207 Expands ranges into set of individual numbers."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2208 (let ((msgs ())
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2209 (end-of-line (save-excursion (end-of-line) (point)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2210 num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2211 (while (re-search-forward "[0-9]+" end-of-line t)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2212 (setq num (string-to-number (buffer-substring (match-beginning 0)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2213 (match-end 0))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2214 (cond ((looking-at "-") ; Message range
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2215 (forward-char 1)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2216 (re-search-forward "[0-9]+" end-of-line t)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2217 (let ((num2 (string-to-number
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2218 (buffer-substring (match-beginning 0)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
2219 (match-end 0)))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2220 (if (< num2 num)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2221 (error "Bad message range: %d-%d" num num2))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2222 (while (<= num num2)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2223 (setq msgs (cons num msgs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2224 (setq num (1+ num)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2225 ((not (zerop num)) ;"pick" outputs "0" to mean no match
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2226 (setq msgs (cons num msgs)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2227 msgs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2228
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2229 (defun mh-notate-user-sequences (&optional range)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2230 "Mark user-defined sequences in the messages specified by RANGE.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2231 The optional argument RANGE can be a message number, a list of message
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2232 numbers, a sequence, a region in a cons cell. If nil all messages are notated."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2233 (unless range
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2234 (setq range (cons (point-min) (point-max))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2235 (let ((seqs mh-seq-list)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2236 (msg-hash (make-hash-table)))
49578
b35587af8747 Upgraded to MH-E version 7.2.
Bill Wohler <wohler@newt.com>
parents: 49459
diff changeset
2237 (dolist (seq seqs)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2238 (dolist (msg (mh-seq-msgs seq))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2239 (push (car seq) (gethash msg msg-hash))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2240 (mh-iterate-on-range msg range
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2241 (loop for seq in (gethash msg msg-hash)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2242 do (mh-add-sequence-notation msg (mh-internal-seq seq))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2243
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2244 (defvar mh-internal-seqs '(answered cur deleted forwarded printed))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2245
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2246 (defun mh-internal-seq (name)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2247 "Return non-nil if NAME is the name of an internal MH-E sequence."
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2248 (or (memq name mh-internal-seqs)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2249 (eq name mh-unseen-seq)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2250 (and (mh-colors-in-use-p) mh-tick-seq (eq name mh-tick-seq))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2251 (eq name mh-previous-seq)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2252 (mh-folder-name-p name)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2253
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2254 (defun mh-valid-seq-p (name)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2255 "Return non-nil if NAME is a valid MH sequence name."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2256 (and (symbolp name)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2257 (string-match "^[a-zA-Z][a-zA-Z0-9]*$" (symbol-name name))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2258
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2259 (defun mh-delete-msg-from-seq (range sequence &optional internal-flag)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2260 "Delete RANGE from SEQUENCE.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2261
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2262 Check the documentation of `mh-interactive-range' to see how RANGE is read in
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2263 interactive use.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2264
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2265 Optional third arg INTERNAL-FLAG non-nil means do not inform MH of the
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2266 change."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2267 (interactive (list (mh-interactive-range "Delete")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2268 (mh-read-seq-default "Delete from" t)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2269 nil))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2270 (let ((entry (mh-find-seq sequence))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2271 (user-sequence-flag (not (mh-internal-seq sequence)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2272 (folders-changed (list mh-current-folder))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2273 (msg-list ()))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2274 (when entry
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2275 (mh-iterate-on-range msg range
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2276 (push msg msg-list)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2277 ;; Calling "mark" repeatedly takes too long. So we will pretend here
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2278 ;; that we are just modifying an internal sequence...
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2279 (when (memq msg (cdr entry))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2280 (mh-remove-sequence-notation msg (not user-sequence-flag)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2281 (mh-delete-a-msg-from-seq msg sequence t))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2282 ;; ... and here we will "mark" all the messages at one go.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2283 (unless internal-flag (mh-undefine-sequence sequence msg-list))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2284 (when (and mh-index-data (not internal-flag))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2285 (setq folders-changed
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2286 (append folders-changed
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2287 (mh-index-delete-from-sequence sequence msg-list))))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2288 (when (and (eq sequence mh-unseen-seq) (mh-speed-flists-active-p))
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2289 (apply #'mh-speed-flists t folders-changed)))))
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2290
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2291 (defun mh-catchup (range)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2292 "Delete RANGE from the `mh-unseen-seq' sequence.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2293
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2294 Check the document of `mh-interactive-range' to see how RANGE is read in
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2295 interactive use."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2296 (interactive (list (mh-interactive-range "Catchup"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2297 (cons (point-min) (point-max)))))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2298 (mh-delete-msg-from-seq range mh-unseen-seq))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2299
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2300 (defun mh-delete-a-msg-from-seq (msg sequence internal-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2301 "Delete MSG from SEQUENCE.
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2302 If INTERNAL-FLAG is non-nil, then do not inform MH of the change."
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2303 (let ((entry (mh-find-seq sequence)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2304 (when (and entry (memq msg (mh-seq-msgs entry)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2305 (if (not internal-flag)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2306 (mh-undefine-sequence sequence (list msg)))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2307 (setcdr entry (delq msg (mh-seq-msgs entry))))))
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2308
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2309 (defun mh-undefine-sequence (seq msgs)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2310 "Remove from the SEQ the list of MSGS."
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2311 (when (and (mh-valid-seq-p seq) msgs)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2312 (apply #'mh-exec-cmd "mark" mh-current-folder "-delete"
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2313 "-sequence" (symbol-name seq) (mh-coalesce-msg-list msgs))))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2314
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2315 (defun mh-define-sequence (seq msgs)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2316 "Define the SEQ to contain the list of MSGS.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2317 Do not mark pseudo-sequences or empty sequences.
60910
939a421a8424 * mh-e.el: Replace `illegal' with `invalid'.
Werner LEMBERG <wl@gnu.org>
parents: 56787
diff changeset
2318 Signals an error if SEQ is an invalid name."
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2319 (if (and msgs
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2320 (mh-valid-seq-p seq)
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2321 (not (mh-folder-name-p seq)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2322 (save-excursion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2323 (mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2324 "-sequence" (symbol-name seq)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2325 (mh-coalesce-msg-list msgs)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2326
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2327 (defun mh-seq-containing-msg (msg &optional include-internal-flag)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2328 "Return a list of the sequences containing MSG.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2329 If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list."
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2330 (let ((l mh-seq-list)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2331 (seqs ()))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2332 (while l
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2333 (and (memq msg (mh-seq-msgs (car l)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2334 (or include-internal-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2335 (not (mh-internal-seq (mh-seq-name (car l)))))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2336 (setq seqs (cons (mh-seq-name (car l)) seqs)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2337 (setq l (cdr l)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2338 seqs))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2339
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2340
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2341
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2342 ;;; Build the folder-mode keymap:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2343
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2344 (suppress-keymap mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2345
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2346 ;; Use defalias to make sure the documented primary key bindings
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2347 ;; appear in menu lists.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2348 (defalias 'mh-alt-show 'mh-show)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2349 (defalias 'mh-alt-refile-msg 'mh-refile-msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2350 (defalias 'mh-alt-send 'mh-send)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2351 (defalias 'mh-alt-visit-folder 'mh-visit-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2352
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2353 ;; Save the `b' binding for a future `back'. Maybe?
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2354 (gnus-define-keys mh-folder-mode-map
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2355 " " mh-page-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2356 "!" mh-refile-or-write-again
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2357 "'" mh-toggle-tick
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2358 "," mh-header-display
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2359 "." mh-alt-show
56751
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56673
diff changeset
2360 ";" mh-toggle-mh-decode-mime-flag
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2361 ">" mh-write-msg-to-file
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2362 "?" mh-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2363 "E" mh-extract-rejected-mail
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2364 "M" mh-modify
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2365 "\177" mh-previous-page
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2366 "\C-d" mh-delete-msg-no-motion
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2367 "\t" mh-index-next-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2368 [backtab] mh-index-previous-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2369 "\M-\t" mh-index-previous-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2370 "\e<" mh-first-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2371 "\e>" mh-last-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2372 "\ed" mh-redistribute
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2373 "\r" mh-show
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2374 "^" mh-alt-refile-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2375 "c" mh-copy-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2376 "d" mh-delete-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2377 "e" mh-edit-again
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2378 "f" mh-forward
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2379 "g" mh-goto-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2380 "i" mh-inc-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2381 "k" mh-delete-subject-or-thread
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2382 "m" mh-alt-send
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2383 "n" mh-next-undeleted-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2384 "\M-n" mh-next-unread-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2385 "o" mh-refile-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2386 "p" mh-previous-undeleted-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2387 "\M-p" mh-previous-unread-msg
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2388 "q" mh-quit
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2389 "r" mh-reply
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2390 "s" mh-send
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2391 "t" mh-toggle-showing
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2392 "u" mh-undo
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2393 "v" mh-index-visit-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2394 "x" mh-execute-commands
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2395 "|" mh-pipe-msg)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2396
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2397 (gnus-define-keys (mh-folder-map "F" mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2398 "?" mh-prefix-help
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2399 "'" mh-index-ticked-messages
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2400 "S" mh-sort-folder
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2401 "c" mh-catchup
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2402 "f" mh-alt-visit-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2403 "i" mh-index-search
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2404 "k" mh-kill-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2405 "l" mh-list-folders
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2406 "n" mh-index-new-messages
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2407 "o" mh-alt-visit-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2408 "p" mh-pack-folder
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2409 "q" mh-index-sequenced-messages
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2410 "r" mh-rescan-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2411 "s" mh-search-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2412 "u" mh-undo-folder
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2413 "v" mh-visit-folder)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2414
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2415 (define-key mh-folder-mode-map "I" mh-inc-spool-map)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2416
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2417 (gnus-define-keys (mh-junk-map "J" mh-folder-mode-map)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2418 "?" mh-prefix-help
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2419 "b" mh-junk-blacklist
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2420 "w" mh-junk-whitelist)
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2421
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2422 (gnus-define-keys (mh-ps-print-map "P" mh-folder-mode-map)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2423 "?" mh-prefix-help
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2424 "A" mh-ps-print-toggle-mime
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2425 "C" mh-ps-print-toggle-color
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2426 "F" mh-ps-print-toggle-faces
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2427 "M" mh-ps-print-toggle-mime
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2428 "f" mh-ps-print-msg-file
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2429 "l" mh-print-msg
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2430 "p" mh-ps-print-msg
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2431 "s" mh-ps-print-msg-show)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2432
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2433 (gnus-define-keys (mh-sequence-map "S" mh-folder-mode-map)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2434 "'" mh-narrow-to-tick
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2435 "?" mh-prefix-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2436 "d" mh-delete-msg-from-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2437 "k" mh-delete-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2438 "l" mh-list-sequences
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2439 "n" mh-narrow-to-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2440 "p" mh-put-msg-in-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2441 "s" mh-msg-is-in-seq
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2442 "w" mh-widen)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2443
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2444 (gnus-define-keys (mh-thread-map "T" mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2445 "?" mh-prefix-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2446 "u" mh-thread-ancestor
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2447 "p" mh-thread-previous-sibling
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2448 "n" mh-thread-next-sibling
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2449 "t" mh-toggle-threads
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2450 "d" mh-thread-delete
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2451 "o" mh-thread-refile)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2452
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2453 (gnus-define-keys (mh-limit-map "/" mh-folder-mode-map)
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2454 "'" mh-narrow-to-tick
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2455 "?" mh-prefix-help
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2456 "c" mh-narrow-to-cc
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2457 "f" mh-narrow-to-from
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2458 "r" mh-narrow-to-range
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2459 "s" mh-narrow-to-subject
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2460 "t" mh-narrow-to-to
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2461 "w" mh-widen)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2462
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2463 (gnus-define-keys (mh-extract-map "X" mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2464 "?" mh-prefix-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2465 "s" mh-store-msg ;shar
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2466 "u" mh-store-msg) ;uuencode
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2467
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2468 (gnus-define-keys (mh-digest-map "D" mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2469 " " mh-page-digest
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2470 "?" mh-prefix-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2471 "\177" mh-page-digest-backwards
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2472 "b" mh-burst-digest)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2473
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2474 (gnus-define-keys (mh-mime-map "K" mh-folder-mode-map)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2475 "?" mh-prefix-help
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2476 "a" mh-mime-save-parts
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2477 "e" mh-display-with-external-viewer
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2478 "i" mh-folder-inline-mime-part
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2479 "o" mh-folder-save-mime-part
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2480 "t" mh-toggle-mime-buttons
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2481 "v" mh-folder-toggle-mime-part
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2482 "\t" mh-next-button
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2483 [backtab] mh-prev-button
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2484 "\M-\t" mh-prev-button)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2485
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2486 (cond
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2487 (mh-xemacs-flag
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2488 (define-key mh-folder-mode-map [button2] 'mh-show-mouse))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2489 (t
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2490 (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2491
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2492 ;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2493
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2494
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2495
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2496 ;;; Help Messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2497
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2498 ;;; If you add a new prefix, add appropriate text to the nil key.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2499 ;;;
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2500 ;;; In general, messages are grouped logically. Taking the main commands for
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2501 ;;; example, the first line is "ways to view messages," the second line is
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2502 ;;; "things you can do with messages", and the third is "composing" messages.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2503 ;;;
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2504 ;;; When adding a new prefix, ensure that the help message contains "what" the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2505 ;;; prefix is for. For example, if the word "folder" were not present in the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2506 ;;; `F' entry, it would not be clear what these commands operated upon.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2507 (defvar mh-help-messages
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2508 '((nil "[i]nc, [.]show, [,]show all, [n]ext, [p]revious,\n"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2509 "[d]elete, [o]refile, e[x]ecute,\n"
56751
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56673
diff changeset
2510 "[s]end, [r]eply,\n"
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56673
diff changeset
2511 "[;]toggle MIME decoding.\n"
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2512 "Prefix characters:\n [F]older, [S]equence, [J]unk, MIME [K]eys,"
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2513 "\n [T]hread, [/]limit, e[X]tract, [D]igest, [I]nc spools.")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2514
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2515 (?F "[l]ist; [v]isit folder;\n"
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2516 "[n]ew messages; [']ticked messages; [s]earch; [i]ndexed search;\n"
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2517 "[p]ack; [S]ort; [r]escan; [k]ill")
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2518 (?P "PS [p]rint message; [l]non-PS print;\n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2519 "PS Print [s]how window, message to [f]ile;\n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56407
diff changeset
2520 "Toggle printing of [M]IME parts, [C]olor, [F]aces")
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2521 (?S "[p]ut message in sequence, [n]arrow, [']narrow to ticked, [w]iden,\n"
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2522 "[s]equences, [l]ist,\n"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2523 "[d]elete message from sequence, [k]ill sequence")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2524 (?T "[t]oggle, [d]elete, [o]refile thread")
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents: 55151
diff changeset
2525 (?/ "Limit to [c]c, [f]rom, [r]ange, [s]ubject, [t]o; [w]iden")
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2526 (?X "un[s]har, [u]udecode message")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2527 (?D "[b]urst digest")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2528 (?K "[v]iew, [i]nline, [o]utput/save MIME part; save [a]ll parts; \n"
50702
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2529 "[TAB] next; [SHIFT-TAB] previous")
7dd3d5eae9c7 Upgraded to MH-E version 7.3.
Bill Wohler <wohler@newt.com>
parents: 49578
diff changeset
2530 (?J "[b]lacklist, [w]hitelist message"))
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2531 "Key binding cheat sheet.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2532
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2533 This is an associative array which is used to show the most common commands.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2534 The key is a prefix char. The value is one or more strings which are
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2535 concatenated together and displayed in the minibuffer if ? is pressed after
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2536 the prefix character. The special key nil is used to display the
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2537 non-prefixed commands.
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2538
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2539 The substitutions described in `substitute-command-keys' are performed as
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2540 well.")
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2541
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2542
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2543
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2544 (dolist (mess '("^Cursor not pointing to message$"
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2545 "^There is no other window$"))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2546 (add-to-list 'debug-ignored-errors mess))
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2547
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2548 (provide 'mh-e)
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2549
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2550 ;;; Local Variables:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2551 ;;; indent-tabs-mode: nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2552 ;;; sentence-end-double-space: nil
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2553 ;;; End:
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2554
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 50711
diff changeset
2555 ;;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
49459
06b77df47802 * mh-e: Created directory. ChangeLog will appear in a week when we
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2556 ;;; mh-e.el ends here