From e495eaec9cfa70e8a392e822dad178bd86f7f9cc Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Sat, 28 May 2005 22:04:54 +0000 Subject: [PATCH] Upgraded to MH-E version 7.84. See etc/MH-E-NEWS and lisp/mh-e/ChangeLog for details. --- etc/ChangeLog | 4 + etc/MH-E-NEWS | 88 +++++++- etc/NEWS | 2 +- lisp/mh-e/ChangeLog | 363 ++++++++++++++++++++++++++++----- lisp/mh-e/mh-acros.el | 8 +- lisp/mh-e/mh-alias.el | 11 +- lisp/mh-e/mh-comp.el | 23 ++- lisp/mh-e/mh-customize.el | 409 +++++++++++++++++++++++--------------- lisp/mh-e/mh-e.el | 69 ++++--- lisp/mh-e/mh-funcs.el | 7 +- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-identity.el | 46 +++-- lisp/mh-e/mh-inc.el | 12 +- lisp/mh-e/mh-index.el | 290 +++++++++++++++------------ lisp/mh-e/mh-init.el | 2 +- lisp/mh-e/mh-junk.el | 6 +- lisp/mh-e/mh-loaddefs.el | 379 ++++++++++++++++++++++------------- lisp/mh-e/mh-mime.el | 19 +- lisp/mh-e/mh-pick.el | 75 ++++++- lisp/mh-e/mh-print.el | 2 +- lisp/mh-e/mh-seq.el | 33 ++- lisp/mh-e/mh-speed.el | 2 +- lisp/mh-e/mh-utils.el | 10 +- 23 files changed, 1281 insertions(+), 581 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 0efca03ac2..15d6f3649c 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-28 Bill Wohler + + * NEWS, MH-E-NEWS: Upgraded to MH-E version 7.84. + 2005-05-19 Nick Roberts * TODO: post-command-idle-hook has gone. diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 25f649b543..e5b408c878 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1,16 +1,94 @@ * COPYRIGHT -Copyright (C) 2003, 2004 Free Software Foundation, Inc. - +Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. +* Changes in MH-E 7.84 + +Version 7.84 contains no user-visible changes. This version +incorporates changes made in CVS Emacs such as the removal of some +deprecated software. + +* Changes in MH-E 7.83 + +Version 7.83 fixes a handful of bugs, adds colors to buttons for +signed or encrypted messages, and contains some documentation changes +related to the upcoming release of the manual. Some options were moved +to other customization groups as a result. + +While not related to this release, the MH-E mailing lists are now +gatewayed at gmane.org (closes SF #979308). + +** New Variables in MH-E 7.83 + +*** mh-show-pgg-bad-face + +Face used to highlight a bad PGG signature. + +*** mh-show-pgg-good-face + +Face used to highlight a good PGG signature. + +*** mh-show-pgg-unknown-face + +Face used to highlight a PGG signature whose status is unknown. This +face is also used for a signature when the signer is untrusted. + +** Bug Fixes in MH-E 7.83 + +*** Whitespace in pick Expressions + +The "C-u / s RET" command now works. In addition, you can now add +whitespace to any of the limiting (/) commands (closes SF #1122655). + +*** auto-mode-alist Updated + +MH-E originally updated auto-mode-alist to set the major mode of +drafts. Now that we explicitly set the mode, there is no reason to do +this, and this behavior caused problems for people who didn't use MH-E +who were editing files that looked like MH message files (closes SF +#1032353). + +*** mh-show-unquote-From Fails (read-only buffer) + +MH-E quotes the "From " header field that is inserted by MTAs. +However, it was trying to do this in a read-only buffer. This has been +fixed (closes SF #1089870). + +*** rmmproc Refile Complains No Such Message + +MH-E would get confused about which folder to delete messages from if +you were refiling and deleting messages at the same time. This has +been fixed (closes SF #1023959). + +*** ! Doesn't Do Regions + +Now it does (closes SF #1046330). + +*** Swish Fixes + +Items in swish indexes that aren't mail messages are now handled more +gracefully. + +*** Spamassassin Fixes + +If you use spamassassin, there was an error when you tried to junk +mail if the option mh-junk-background was set. This has been fixed. + +*** Mairix Support + +Indexing now compatible with Mairix version 0.12 and later. + + + * Changes in MH-E 7.82 Version 7.82 continues to address the saga surrounding the use of CL -macros in CVS Emacs and fixes the auto-detection of vanilla MH (SF -#1014781). +macros in CVS Emacs and fixes the auto-detection of vanilla MH (closes +SF #1014781). * Changes in MH-E 7.81 @@ -23,6 +101,8 @@ of "default" in `mh-identity-handlers' to avoid problems with to ":default". This release also corrects the release numbering; the previous version number was intended to be 7.80. + + * Changes in MH-E 7.4.80 Version 7.4.80 now supports GNU mailutils, S/MIME, picons, diff --git a/etc/NEWS b/etc/NEWS index 34bbf3d1a3..c21ffa85e6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2651,7 +2651,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. --- ** MH-E changes. -Upgraded to MH-E version 7.82. There have been major changes since +Upgraded to MH-E version 7.84. There have been major changes since version 5.0.2; see MH-E-NEWS for details. ** Calendar changes: diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 394331fbcd..23e7c6d44c 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,32 +1,305 @@ -2005-05-26 Lute Kamstra +2005-05-28 Bill Wohler - * mh-utils.el (mh-show-mode): - * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. + Released MH-E version 7.84. -2005-04-08 Dan Nicolaescu + * MH-E-NEWS, README: Updated for release 7.84. + + * mh-e.el (Version, mh-version): Updated for release 7.84. + +2005-05-28 Bill Wohler + + * mh-e.el, mh-comp.el: Don't autoload Info-goto-node. It's not + used, and if it were, the code should use the info function + instead. + + Use full year in copyright notices (for example, 2005, not 05). + + * Makefile (mh-loaddefs.el, mh-e-autoloads.el): Added 2005 to + copyright notice. + + * mh-inc.el: Use three ;;; to precede Local Variables to be + consistent with other files. Will have to ask Stefan Monnier why + he changed it. + + * README: This version of MH-E to appear in GNU Emacs 22.1, not + 21.5. + + * ChangeLog: The * in a ChangeLog entry must only be used before a + filename. + + Fixed compilation warnings in CVS Emacs. This included using + "public" functions instead of "private" ones (info instead of + Info-goto-node, view-mode-enter instead of view-mode), and + removing a customization group that didn't have a parent group. In + addition, string-to-int was recently deprecated; use + string-to-number instead. + + * mh-customize.el (Info-goto-node): Deleted autoload. + (mh-e): Deleted mh group. Use single mh-e group instead. + (mh-tool-bar-folder-help, mh-tool-bar-letter-help): Use info + instead of Info-goto-node. + + * mh-e.el (mh-read-msg-list): string-to-int deprecated; use + string-to-number. + + * mh-funcs.el (mh-list-folders): Use view-mode-enter instead of + view-mode. + + * mh-seq.el (mh-list-sequences): Use view-mode-enter instead of + view-mode. + + * mh-utils.el (mh-get-msg-num): string-to-int deprecated; use + string-to-number. + + Merged in changes from CVS Emacs including: + + * mh-utils.el (mh-show-mode): + * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. Lute + Kamstra 2005-05-26. + +2005-05-25 Bill Wohler + + Merged in changes from CVS Emacs including: * mh-customize.el (mh-speedbar-selected-folder-face): Special case - high number of colors displays. + high number of colors displays. Dan Nicolaescu + 2005-04-08. + + * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with + `valid'. Replace `illegal' with `invalid'. Werner Lemberg + 2005-03-25. + + * mh-inc.el (mh-inc-spool-list): Correctly declare the external + var. Stefan 2004-09-07. -2005-03-25 Werner Lemberg +2005-05-18 Bill Wohler - * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. + * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in + docstring. -2005-03-25 Werner Lemberg +2005-05-05 Bill Wohler - * mh-e.el: Replace `illegal' with `invalid'. + * mh-e.el (Version, mh-version): Added +cvs to release number. -2004-09-07 Stefan +2005-05-05 Bill Wohler - * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. + Released MH-E version 7.83. -2004-08-21 Bill Wohler + * MH-E-NEWS, README: Updated for release 7.83. + + * mh-e.el (Version, mh-version): Updated for release 7.83. + +2005-05-05 Bill Wohler + + * README: To appear in Emacs 21.5, since 21.4 was released (but + without the latest MH-E). + + * release-utils (usage): Added --variable-changes. + +2005-05-04 Bill Wohler + + * mh-customize.el (*-face): Made docstrings consistent. + + * mh-seq.el (mh-pick-args-list): Extracted function for turning + string of pick arguments to list. Fixed list so that multi-word + arguments were put in a single string (closes SF #1122655). + (mh-edit-pick-expr): Use it. + + * mh-unit.el (mh-unit): Since 21.4 snuck out but didn't contain + updated lm-verify, don't run lm-verify on versions before 21.5. + (mh-unit-test-pick-args-list): Added. + + * mh-customize.el (mh-yank-from-start-of-msg): Use headline + capitalization. Changed wording of some choices to be more consistent. + (mh-invisible-header-fields-internal): Added fields from usa.net. + +2005-04-24 Satyaki Das + + * mh-mime.el (mh-mime-security-button-face): New function which + determines the face to use to colorize encrypted or signed emails. + (mh-insert-mime-security-button): Modified to colorize the button + differently based on whether the signature was valid or not, + whether the decryption was successful or not, etc. + + * mh-customize.el (mh-show-pgg-good-face) + (mh-show-pgg-unknown-face, mh-show-pgg-bad-face): Faces added to + highlight buttons introduced for encrpted or signed MIME parts. + +2005-03-19 Bill Wohler + + * mh-customize.el (mh-mml-method-default): Sorted alphabetically. + (mh-insert-x-mailer-flag, mh-reply-show-message-flag): Moved from + mh-letter group to mh-sending-mail group. The writing of the + documentation revealed that these options were misplaced. + +2005-03-17 Bill Wohler + + * mh-customize.el (mh-junk-background): Put in alphabetical order. + Synced with manual. + (mh-junk-program): Use double-quotes on non-symbols. + + * mh-pick.el: (mh-search-folder): Synced docstrings with manual. + + * mh-index.el: (mh-index-search, mh-pick-execute-search) + (mh-grep-execute-search, mh-mairix-execute-search) + (mh-swish-execute-search, mh-swish++-execute-search) + (mh-namazu-execute-search): Synced docstrings with manual. Note + that I'm now grabbing the output of an Info buffer which is why + the indents on the examples has changed a bit. If we all use that + methodology in the future, we shouldn't produce as many gratuitous + diffs. I also noticed that `grep' and `search' became links to + unrelated things, so let's use double-quotes for quoting + non-symbols in the docstrings. + + * mh-customize.el (mh-index-new-messages-folders) + (mh-index-ticked-messages-folders): Synced docstrings with manual. + +2005-02-16 Satyaki Das + + * mh-index.el (mh-swish-execute-search): Simplify the indexing + recipe for swish. Thanks to Eric Jensen for the suggestion. + +2005-02-11 Satyaki Das + + * mh-index.el (mh-swish-execute-search) + (mh-swish++-execute-search): Make the indexing recipes better. + (mh-swish-next-result): The indexer might find matches in files + that aren't messages. Make the function handle that case + gracefully. + +2005-02-07 Bill Wohler - * Released MH-E version 7.82. + * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced + docstrings with manual. + +2005-02-06 Bill Wohler + + * mh-junk.el (mh-spamassassin-blacklist): Removed trailing + whitespace. + + * mh-e.el (mh-refile-or-write-again): Checkdoc fix. + + * mh-identity.el (mh-identity-list-set) + (mh-identity-field-handler, mh-identity-handler-gpg-identity) + (mh-identity-handler-signature) + (mh-identity-handler-attribution-verb) + (mh-identity-handler-default, mh-identity-handler-top): Docstring + editing. + + * mh-customize.el (mh-identity-list, mh-auto-fields-list) + (mh-identity-default, mh-identity-handlers): Synced docstrings + with manual. + +2005-02-03 Bill Wohler + + * mh-xemacs.el (define-behavior 'mh): Moved Ben's code here from + mh-e.el and added standard documentation. + + * mh-e.el: Received patch from Ben Wing to add + define-behavior on XEmacs. + +2005-01-28 Jeffrey C Honig + + * mh-customize.el (mh-invisible-header-fields-internal): Added + X-Evolution header added by Evolution mai client. + +2005-01-18 Bill Wohler + + * mh-customize.el (mh-invisible-header-fields-internal): Added + DomainKey-Signature (http://antispam.yahoo.com/domainkeys/). + There's a Comment field that goes with it, but I thought it was + too general to add. + +2005-01-06 Bill Wohler + + * mh-junk.el (mh-spamassassin-blacklist): Fixed typo to fix an + error when junking spamassassin mail when mh-junk-background is + turned on. + +2004-12-25 Satyaki Das + + * mh-utils.el (mh-show-unquote-From): Make the buffer writable + before trying to change it (closes SF #1089870). + + * mh-comp.el (mh-complete-word): Fix a typo in a variable + name (closes SF #1089870) + +2004-11-28 Jeffrey C Honig + + * mh-comp.el (mh-complete-word): Kill the *Completions* buffer in + any cases where we belive we are done with it. Not perfect, but + better than just leaving it around. + +2004-11-08 Satyaki Das + + * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a + function at compile time doesn't guarantee it's existence at run + time. So make the macro handle that situation better. + +2004-11-05 Satyaki Das + + * mh-acros.el (advice): Load advice, since it isn't loaded in + XEmacs causing compilation problems. + +2004-10-24 Satyaki Das + + * mh-index.el (mh-mairix-execute-search) + (mh-mairix-regexp-builder): Update the interface to mairix so that + it will work with versions of mairix 0.12 and later. + + * mh-funcs.el (mh-rmf-daemon): Avoid using + beginning-of-buffer since it clobbers the mark and it was pointed + out on the Emacs developers list to be the wrong thing to do. + + * mh-e.el (mh-inc-folder): Only remove the window on the show + buffer. This means if the user has BBDB enabled then the window + displaying BBDB information isn't clobbered. + (mh-refile-or-write-again): Don't use the function + interactive-p. There was a long thread on the Emacs developers + list where it was pointed out that it is incorrect to use this + function most of the time. + + * mh-comp.el (autoload): Don't set auto-mode-alist. This could + screw things up for users that don't use MH-E (closes SF #1032353). + +2004-10-13 Satyaki Das + + * mh-e.el (mh-refile-or-write-again): Generalize the function to + work on a range of messages (closes SF #1046330). + +2004-09-02 Satyaki Das + + * mh-e.el (mh-process-commands): The concurrent execution of mark + and refile can cause problems since both the commands change the + current folder. This change avoids that by getting rid of the + concurrency. Another change covers the corner case where we refile + messages to a previously empty folder. Before the modification + sequences weren't preserved even if the appropriate flag was + set. That is no longer the case. + +2004-08-26 Satyaki Das + + * mh-e.el (mh-get-new-mail): Also, update the unseen sequence from + disk. Otherwise, the new messages aren't highlighted. + + * mh-seq.el (mh-thread-inc): Fix a bug which appears when inc is + run in a narrowed folder. The user sequence notation was getting + lost. The change fixes that. + + * mh-e.el (mh-get-new-mail): Make inc more efficient by reusing + the existing user sequence notation and deleted/refiled notation. + +2004-08-24 Bill Wohler + + * mh-e.el (Version, mh-version): Added +cvs to release number. + +2004-08-24 Bill Wohler + + Released MH-E version 7.82. * MH-E-NEWS, README: Updated for release 7.82. - * mh-e.el (Version, mh-version): Update for release 7.82. + * mh-e.el (Version, mh-version): Updated for release 7.82. 2004-08-24 Bill Wohler @@ -57,11 +330,11 @@ 2004-08-21 Bill Wohler - * Released MH-E version 7.81. + Released MH-E version 7.81. * MH-E-NEWS, README: Updated for release 7.81. - * mh-e.el (Version, mh-version): Update for release 7.81. + * mh-e.el (Version, mh-version): Updated for release 7.81. 2004-08-21 Bill Wohler @@ -94,7 +367,7 @@ 2004-08-15 Bill Wohler - * Released MH-E version 7.4.80. + Released MH-E version 7.4.80. * MH-E-NEWS, README: Updated for release 7.4.80. @@ -324,13 +597,13 @@ are more useful than a key sequence in these cases. Use "See also" instead of "See also documentation for". - * Merged in 7.4.4 changes, described below. + Merged in 7.4.4 changes, described below. * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 2004-07-10 Bill Wohler - * Released MH-E version 7.4.4. + Released MH-E version 7.4.4. * MH-E-NEWS, README: Updated for release 7.4.4. @@ -399,9 +672,9 @@ routines in the best way possible (closes SF #930012). (require 'mouse): To shush compiler. - * Use new function mh-require-cl throughout. + Use new function mh-require-cl throughout. - * Add arch taglines (courtesy Miles Bader). + Add arch taglines (courtesy Miles Bader). * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. @@ -541,7 +814,7 @@ 2003-11-18 Bill Wohler - * Released MH-E version 7.4.3. + Released MH-E version 7.4.3. * MH-E-NEWS, README: Updated for release 7.4.3. @@ -684,8 +957,8 @@ 2003-11-04 Steve Youngs - * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el - in XEmacs. + * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate + mh-loaddefs.el in XEmacs. (XEMACS_LOADDEFS_COOKIE): Ditto. (XEMACS_LOADDEFS_PKG_NAME): Ditto. (xemacs): Add target to build mh-loaddefs.el in XEmacs @@ -1363,7 +1636,7 @@ 2003-08-19 Bill Wohler - * Released MH-E version 7.4.2. + Released MH-E version 7.4.2. * MH-E-NEWS, README: Updated for release 7.4.2. @@ -2233,7 +2506,7 @@ 2003-06-25 Bill Wohler - * Released MH-E version 7.4.1. + Released MH-E version 7.4.1. * MH-E-NEWS, README: Updated for release 7.4.1. @@ -2255,7 +2528,7 @@ 2003-06-24 Bill Wohler - * Released MH-E version 7.4. + Released MH-E version 7.4. * MH-E-NEWS, README: Updated for release 7.4. @@ -3362,7 +3635,7 @@ 2003-04-24 Bill Wohler - * Released MH-E version 7.3. + Released MH-E version 7.3. * MH-E-NEWS, README: Updated for release 7.3. @@ -4920,7 +5193,7 @@ 2003-02-03 Bill Wohler - * Released MH-E version 7.2. + Released MH-E version 7.2. * MH-E-NEWS, README: Updated for release 7.2. @@ -5584,7 +5857,7 @@ 2003-01-07 Bill Wohler - * Released MH-E version 7.1. + Released MH-E version 7.1. * MH-E-NEWS, README: Updated for release 7.1. @@ -6678,7 +6951,7 @@ 2002-11-29 Bill Wohler - * Released MH-E version 7.0. + Released MH-E version 7.0. * mh-e.el (Version, mh-version): Updated for release 7.0. @@ -6703,7 +6976,7 @@ 2002-11-21 Bill Wohler - * Released MH-E version 6.1.91. + Released MH-E version 6.1.91. * mh-e.el (Version, mh-version): Updated for release 6.1.91. @@ -6727,7 +7000,7 @@ 2002-11-15 Bill Wohler - * Released MH-E version 6.1.90. + Released MH-E version 6.1.90. * README (Compile): New section. Users must now compile MH-E due to the vagaries of the various versions of gnus. @@ -9688,7 +9961,7 @@ 2002-04-08 Bill Wohler - * Released mh-e version 6.1. + Released mh-e version 6.1. * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp @@ -9792,7 +10065,7 @@ 2001-12-16 Bill Wohler - * Released mh-e version 6.0. + Released mh-e version 6.0. * MH-E-NEWS: Be a little more specific about incompatible changes. Added info about outdated manual. @@ -9815,7 +10088,7 @@ 2001-12-14 Bill Wohler - * Released mh-e version 5.0.93. + Released mh-e version 5.0.93. * Makefile (MH-E-SRC): Added mh-xemacs-compat.el. (MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from @@ -10000,7 +10273,7 @@ 2001-12-04 Bill Wohler - * Released mh-e version 5.0.92. + Released mh-e version 5.0.92. * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to @@ -10010,7 +10283,7 @@ 2001-12-03 Bill Wohler - * Released mh-e version 5.0.91. + Released mh-e version 5.0.91. * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. @@ -10916,17 +11189,17 @@ 2001-04-14 chad brown - * rearrange the font-lock keywords a bit + Rearrange the font-lock keywords a bit. 2001-04-12 chad brown - * preliminary (somewhat boring) font-lock support for mh-e. More + Preliminary (somewhat boring) font-lock support for mh-e. More interesting font-lock support probably wants to have better support for multiple format files 2001-02-24 chad brown - * add default nmh paths to mh-find-prog in mh-utils.el. + Add default nmh paths to mh-find-prog in mh-utils.el. change to mh-kill-folder in mh-funcs.el to make it more general. 2001-02-19 Bill Wohler @@ -10939,10 +11212,10 @@ (dist): Leave release in current directory. -Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. ;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51 diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index e4921b047d..455daf687a 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el @@ -1,6 +1,6 @@ ;;; mh-acros.el --- Macros used in MH-E -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler @@ -40,6 +40,7 @@ ;;; Code: (require 'cl) +(require 'advice) ;; The Emacs coding conventions require that the cl package not be required at ;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl @@ -68,8 +69,9 @@ recognizes that and loads `cl' where appropriate." (defmacro mh-funcall-if-exists (function &rest args) "Call FUNCTION with ARGS as parameters if it exists." - (if (fboundp function) - `(funcall ',function ,@args))) + (when (fboundp function) + `(when (fboundp ',function) + (funcall ',function ,@args)))) (defmacro mh-make-local-hook (hook) "Make HOOK local if needed. diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 7f2cd2f526..0819c0a792 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -1,6 +1,7 @@ ;;; mh-alias.el --- MH-E mail alias completion and expansion ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -162,16 +163,16 @@ Exclude all aliases already in `mh-alias-alist' from `ali'" (while (< (point) (point-max)) (cond ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):") - (when (> (string-to-int (match-string 2)) 200) + (when (> (string-to-number (match-string 2)) 200) (let* ((username (match-string 1)) (gecos-name (match-string 3)) (realname (mh-alias-gecos-name gecos-name username mh-alias-passwd-gecos-comma-separator-flag)) (alias-name (if mh-alias-local-users-prefix - (concat mh-alias-local-users-prefix - (mh-alias-suggest-alias realname t)) - username)) + (concat mh-alias-local-users-prefix + (mh-alias-suggest-alias realname t)) + username)) (alias-translation (if (string-equal username realname) (concat "<" username ">") diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 4f7e413d46..82d0f5b7fd 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -1,6 +1,7 @@ ;;; mh-comp.el --- MH-E functions for composing messages -;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -52,7 +53,6 @@ (defvar mh-identity-menu) ;;; Autoloads -(autoload 'Info-goto-node "info") (autoload 'mail-mode-fill-paragraph "sendmail") (autoload 'mm-handle-displayed-p "mm-decode") @@ -490,8 +490,10 @@ to reply to: cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." (interactive (list @@ -1629,15 +1631,22 @@ This is useful in breaking up paragraphs in replies." (defun mh-complete-word (word choices begin end) "Complete WORD at from CHOICES. Any match found replaces the text from BEGIN to END." - (let ((completion (try-completion word choices))) + (let ((completion (try-completion word choices)) + (completions-buffer "*Completions*")) (cond ((eq completion t) + (ignore-errors + (kill-buffer completions-buffer)) (message "Completed: %s" word)) ((null completion) + (ignore-errors + (kill-buffer completions-buffer)) (message "No completion for `%s'" word)) ((stringp completion) (if (equal word completion) - (with-output-to-temp-buffer "*Completions*" + (with-output-to-temp-buffer completions-buffer (display-completion-list (all-completions word choices))) + (ignore-errors + (kill-buffer completions-buffer)) (delete-region begin end) (insert completion)))))) @@ -1965,8 +1974,6 @@ Otherwise return the empty string." ;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. -;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode)) - (provide 'mh-comp) ;;; Local Variables: diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index c5689afc13..5414116439 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -1,6 +1,6 @@ ;;; mh-customize.el --- MH-E customization -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -69,8 +69,6 @@ (mh-require-cl) (require 'mh-loaddefs) -(autoload 'Info-goto-node "info") - (eval-and-compile (defvar mh-xemacs-flag (featurep 'xemacs) "Non-nil means the current Emacs is XEmacs.")) @@ -102,121 +100,115 @@ the frame are removed." ;;; MH-E Customization Groups -(defgroup mh nil +(defgroup mh-e nil "Emacs interface to the MH mail system. MH is the Rand Mail Handler. Other implementations include nmh and GNU mailutils." :link '(custom-manual "(mh-e)Top") :group 'mail) -(defgroup mh-e '((mh custom-group)) ; Sort of an alias for 'mh group - "Emacs interface to the MH mail system. -MH is the Rand Mail Handler. Other implementations include nmh and GNU -mailutils." - :link '(custom-manual "(mh-e)Top")) - (defgroup mh-alias nil "Aliases." :link '(custom-manual "(mh-e)Aliases") :prefix "mh-alias-" - :group 'mh) + :group 'mh-e) (defgroup mh-folder nil "Organizing your mail with folders." :prefix "mh-" :link '(custom-manual "(mh-e)Organizing") - :group 'mh) + :group 'mh-e) (defgroup mh-folder-selection nil "Folder selection." :prefix "mh-" :link '(custom-manual "(mh-e)Folder Selection") - :group 'mh) + :group 'mh-e) (defgroup mh-identity nil "Identities." :link '(custom-manual "(mh-e)Identities") :prefix "mh-identity-" - :group 'mh) + :group 'mh-e) (defgroup mh-inc nil "Incorporating your mail." :prefix "mh-inc-" :link '(custom-manual "(mh-e)Incorporating Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-index nil "Searching." :link '(custom-manual "(mh-e)Searching") :prefix "mh-index-" - :group 'mh) + :group 'mh-e) (defgroup mh-junk nil "Dealing with junk mail." :link '(custom-manual "(mh-e)Junk") :prefix "mh-junk-" - :group 'mh) + :group 'mh-e) (defgroup mh-letter nil "Editing a draft." :prefix "mh-" :link '(custom-manual "(mh-e)Editing Drafts") - :group 'mh) + :group 'mh-e) (defgroup mh-ranges nil "Ranges." :prefix "mh-" :link '(custom-manual "(mh-e)Ranges") - :group 'mh) + :group 'mh-e) (defgroup mh-scan-line-formats nil "Scan line formats." :link '(custom-manual "(mh-e)Scan Line Formats") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-sending-mail nil "Sending mail." :prefix "mh-" :link '(custom-manual "(mh-e)Sending Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-sequences nil "Sequences." :prefix "mh-" :link '(custom-manual "(mh-e)Sequences") - :group 'mh) + :group 'mh-e) (defgroup mh-show nil "Reading your mail." :prefix "mh-" :link '(custom-manual "(mh-e)Reading Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-speed nil "The speedbar." :prefix "mh-speed-" :link '(custom-manual "(mh-e)Speedbar") - :group 'mh) + :group 'mh-e) (defgroup mh-toolbar nil "The toolbar" :link '(custom-manual "(mh-e)Toolbar") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-faces nil "Faces used in MH-E." :link '(custom-manual "(mh-e)Top") :prefix "mh-" :group 'faces - :group 'mh) + :group 'mh-e) (defgroup mh-hooks nil "MH-E hooks." :link '(custom-manual "(mh-e)Top") :prefix "mh-" - :group 'mh) + :group 'mh-e) ;;; Faces @@ -280,7 +272,7 @@ accordingly." :set (lambda (symbol value) (set-default symbol value) ;Done in mh-variant-set-variant! (mh-variant-set value)) - :group 'mh) + :group 'mh-e) @@ -448,14 +440,34 @@ information." (defcustom mh-identity-list nil "*List of identities. -Each element consists of an identity label, and a collection of header fields -and a signature to insert if the identity is selected (see -`mh-identity-default', `mh-insert-identity' and the `Identity' menu in a -MH-Letter buffer). The `Value Menu' contains the common header fields `From' -and `Organization'. Other header fields may be added using the `Other Field' -menu item. The `Signature' menu item is used to insert a signature with -`mh-insert-signature'. The `GPG Key ID' menu item is used to specify a -different key to sign or encrypt messages." +To customize this option, click on the `INS' button and enter a label such as +`Home' or `Work'. Then click on the `INS' button with the label `Add at least +one item below'. Then choose one of the items in the `Value Menu'. + +You can specify an alternate `From:' header field using the `From Field' menu +item. You must include a valid email address. A standard format is `First Last +'. If you use an initial with a period, then you must +quote your name as in `\"First I. Last\" '. People usually +list the name of the company where they work using the `Organization Field' +menu item. Set any arbitrary header field and value in the `Other Field' menu +item. Unless the header field is a standard one, precede the name of your +field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of +`Attribution Verb' overrides the setting of +`mh-extract-from-attribution-verb'. Set your signature with the `Signature' +menu item. You can specify the contents of `mh-signature-file-name', a file, +or a function. Specify a different key to sign or encrypt messages with the +`GPG Key ID' menu item. + +You can select the identities you have added via the menu called `Identity' in +the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the +fields and signature added by the identity, select the `None' identity. + +The `Identity' menu contains two other items to save you from having to set +the identity on every message. The menu item `Set Default for Session' can be +used to set the default identity to the current identity until you exit Emacs. +The menu item `Save as Default' sets the option `mh-identity-default' to the +current identity setting. You can also customize the `mh-identity-default' +option in the usual fashion." :type '(repeat (list :tag "" (string :tag "Label") (repeat :tag "Add at least one item below" @@ -489,12 +501,38 @@ different key to sign or encrypt messages." (defcustom mh-auto-fields-list nil "List of recipients for which header lines are automatically inserted. -Each element consists of the recipient, which is a regular expression, and a -collection of header fields and identities to insert if the message is sent to -this recipient. The `Value Menu' contains the common header fields `Fcc' and -`Mail-Followup-To'. Other header fields may be added using the `Other Field' -menu item. The `Identity' menu item is used to insert entire identities with -`mh-insert-identity'." + +This option can be used to set the identity depending on the recipient. To +customize this option, click on the `INS' button and enter a regular +expression for the recipient's address. Click on the `INS' button with the +`Add at least one item below' label. Then choose one of the items in the +`Value Menu'. + +The `Identity' menu item is used to select an identity from those configured +in `mh-identity-list'. All of the information for that identity will be added +if the recipient matches. The `Fcc Field' menu item is used to select a folder +that is used in the `Fcc:' header. When you send the message, MH will put a +copy of your message in this folder. The `Mail-Followup-To Field' menu item is +used to insert an `Mail-Followup-To:' header field with the recipients you +provide. If the recipient's mail user agent supports this header field (as nmh +does), then their replies will go to the addresses listed. This is useful if +their replies go both to the list and to you and you don't have a mechanism to +suppress duplicates. If you reply to someone not on the list, you must either +remove the `Mail-Followup-To:' field, or ensure the recipient is also listed +there so that he receives replies to your reply. Other header fields may be +added using the `Other Field' menu item. + +These fields can only be added after the recipient is known. Once the header +contains one or more recipients, run the \\[mh-insert-auto-fields] command or +choose the `Identity -> Insert Auto Fields' menu item to insert these fields +manually. However, you can just send the message and the fields will be added +automatically. You are given a chance to see these fields and to confirm them +before the message is actually sent. You can do away with this confirmation by +turning off the option `mh-auto-fields-prompt-flag'. + +You should avoid using the same header field in `mh-auto-fields-list' and +`mh-identity-list' definitions that may apply to the same message as the +result is undefined." :type `(repeat (list :tag "" (string :tag "Recipient") @@ -525,7 +563,8 @@ See `mh-auto-fields-list'." :group 'mh-identity) (defcustom mh-identity-default nil - "Default identity to use when `mh-letter-mode' is called." + "Default identity to use when `mh-letter-mode' is called. +See `mh-identity-list'." :type (append '(radio) (cons '(const :tag "None" nil) @@ -534,16 +573,32 @@ See `mh-auto-fields-list'." :group 'mh-identity) (defcustom mh-identity-handlers - '((":default" . mh-identity-handler-bottom) - ("from" . mh-identity-handler-top) + '(("From" . mh-identity-handler-top) + (":default" . mh-identity-handler-bottom) (":attribution-verb" . mh-identity-handler-attribution-verb) (":signature" . mh-identity-handler-signature) (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) "Handler functions for fields in `mh-identity-list'. -This is an alist of fields (strings) and handlers (functions). Strings are -lowercase. Use \":signature\" for Signature and \":pgg-default-user-id\" for -GPG Key ID. The function associated with the string \":default\" is used if no -other functions are appropriate." + +This option is used to change the way that fields, signatures, and +attributions in `mh-identity-list' are added. To customize +`mh-identity-handlers', replace the name of an existing handler function +associated with the field you want to change with the name of a function you +have written. You can also click on an `INS' button and insert a field of your +choice and the name of the function you have written to handle it. + +The `Field' field can be any field that you've used in your +`mh-identity-list'. The special fields `:attribution-verb', `:signature', or +`:pgg-default-user-id' are used for the `mh-identity-list' choices +`Attribution Verb', `Signature', and `GPG Key ID' respectively. + +The handler associated with the `:default' field is used when no other field +matches. + +The handler functions are passed two or three arguments: the FIELD itself (for +example, `From'), or one of the special fields (for example, `:signature'), +and the ACTION `'remove' or `'add'. If the action is `'add', an additional +argument containing the VALUE for the field is given." :type '(repeat (cons (string :tag "Field") function)) :group 'mh-identity) @@ -552,45 +607,45 @@ other functions are appropriate." ;;; Incorporating Your Mail (:group 'mh-inc) (defcustom mh-inc-prog "inc" - "*Program to run to incorporate new mail into a folder. -Normally \"inc\". This program is relative to the `mh-progs' directory unless -it is an absolute pathname." + "*Program to incorporate new mail into a folder. + +This program generates a one-line summary for each of the new messages. Unless +it is an absolute pathname, the file is assumed to be in the `mh-progs' +directory. You may also link a file to `inc' that uses a different format. +You'll then need to modify several scan line format variables appropriately." :type 'string :group 'mh-inc) (defcustom mh-inc-spool-list nil - "*Alist of alternate spool files, corresponding folders and keybindings. -This option will be described by example. + "*Alternate spool files. + +You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail +from arbitrary spool files other than your system mailbox, file it in folders +other than your `+inbox', and assign key bindings to incorporate this mail. -Suppose you have subscribed to the mh-e-devel mailing list and you use -procmail to filter its mail into `~/mail/mh-e' with the following -`.procmailrc' recipe: +Suppose you are subscribed to the `mh-e-devel' mailing list and you use +`procmail' to filter this mail into `~/mail/mh-e' with the following recipe in +`.procmailrc': MAILDIR=$HOME/mail :0: - * ^From mh-e-devel-admin@lists.sourceforge.net + * ^From mh-e-devel-admin@stop.mail-abuse.org mh-e -If you wanted to incorporate that spool file into an MH folder called mh-e -with the \"I m\" or \\[mh-inc-spool-mh-e] commands, you would use the -following: +In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m' +\(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS' +button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a +`Key Binding' of `m'. - Spool File: ~/mail/mh-e - Folder: mh-e - Key Binding: m - -Then, you could also install `xbuffy' and configure an extra mailbox using the -gnuserv package to run the `mh-inc-spool-mh-e' command in Emacs: +You can use `xbuffy' to automate the incorporation of this mail using the +`gnudoit' command in the `gnuserv' package as follows: box ~/mail/mh-e title mh-e origMode polltime 10 headertime 0 - command gnudoit -q '(mh-inc-spool-mh-e)' - -To incorporate the spool file, click the xbuffy box with the middle mouse -button." + command gnudoit -q '(mh-inc-spool-mh-e)'" :type '(repeat (list (file :tag "Spool File") (string :tag "Folder") (character :tag "Key Binding"))) @@ -602,10 +657,10 @@ button." ;;; Searching (:group 'mh-index) (defcustom mh-index-new-messages-folders t - "Folders searched for the `unseen' sequence. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to + "Folders searched for the \"unseen\" sequence. +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -633,9 +688,9 @@ found in the documentation of `mh-index-search'." (defcustom mh-index-ticked-messages-folders t "Folders searched for `mh-tick-seq'. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -672,6 +727,15 @@ bound to the new value of `mh-junk-program'. The function sets the variable finally return (car element))))) ;; User customizable variables +(defcustom mh-junk-background nil + "If on, spam programs are run in background. +By default, the programs are run in the foreground, but this can be slow when +junking large numbers of messages. If you have enough memory or don't junk +that many messages at the same time, you might try turning on this option." + :type '(choice (const :tag "Off" nil) + (const :tag "On" 0)) + :group 'mh-junk) + (defcustom mh-junk-disposition nil "Disposition of junk mail." :type '(choice (const :tag "Delete Spam" nil) @@ -680,10 +744,12 @@ bound to the new value of `mh-junk-program'. The function sets the variable (defcustom mh-junk-program nil "Spam program that MH-E should use. -The default setting of this option is `Auto-detect' which means that MH-E will -automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in that -order. If, for example, you have both SpamAssassin and Bogofilter installed -and you want to use BogoFilter, then you can set this option to `Bogofilter'." + +The default setting of this option is \"Auto-detect\" which means that MH-E +will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in +that order. If, for example, you have both SpamAssassin and Bogofilter +installed and you want to use BogoFilter, then you can set this option to +\"Bogofilter\"." :type '(choice (const :tag "Auto-detect" nil) (const :tag "SpamAssassin" spamassassin) (const :tag "Bogofilter" bogofilter) @@ -691,32 +757,10 @@ and you want to use BogoFilter, then you can set this option to `Bogofilter'." :set 'mh-junk-choose :group 'mh-junk) -(defcustom mh-junk-background nil - "If on, spam programs are run in background. -By default, the programs are run in the foreground, but this can be slow when -junking large numbers of messages. If you have enough memory or don't junk -that many messages at the same time, you might try turning on this option." - :type '(choice (const :tag "Off" nil) - (const :tag "On" 0)) - :group 'mh-junk) - ;;; Editing a Draft (:group 'mh-letter) -(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") - "Default method to use in security directives." - :type '(choice (const :tag "PGP (MIME)" "pgpmime") - (const :tag "PGP" "pgp") - (const :tag "S/MIME" "smime") - (const :tag "None" "none")) - :group 'mh-letter) - -(defcustom mh-compose-forward-as-mime-flag t - "Non-nil means that messages are forwarded as a MIME part." - :type 'boolean - :group 'mh-letter) - (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn) "Type of MIME message directives in messages. @@ -761,11 +805,6 @@ by \\\\[mh-insert-letter] or \\[mh-yank-cur-msg]." :type 'string :group 'mh-letter) -(defcustom mh-insert-x-mailer-flag t - "*Non-nil means append an X-Mailer field to the header." - :type 'boolean - :group 'mh-letter) - (defcustom mh-letter-complete-function 'ispell-complete-word "*Function to call when completing outside of address or folder fields. By default, this is set to `ispell-complete-word'." @@ -780,16 +819,12 @@ and it's best to avoid quoted lines that span more than 80 columns." :type 'integer :group 'mh-letter) -(defcustom mh-reply-show-message-flag t - "*Non-nil means the show buffer is displayed using \\\\[mh-reply]. - -The setting of this variable determines whether the MH `show-buffer' is -displayed with the current message when using `mh-reply' without a prefix -argument. Set it to nil if you already include the message automatically -in your draft using - repl: -filter repl.filter -in your ~/.mh_profile file." - :type 'boolean +(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") + "Default method to use in security directives." + :type '(choice (const :tag "PGP (MIME)" "pgpmime") + (const :tag "PGP" "pgp") + (const :tag "S/MIME" "smime") + (const :tag "None" "none")) :group 'mh-letter) (defcustom mh-signature-file-name "~/.signature" @@ -881,14 +916,14 @@ If nil, yank only the portion of the message following the point. If the show buffer has a region, this variable is ignored unless its value is one of `attribution' or `autoattrib' in which case the attribution is added to the yanked region." - :type '(choice (const :tag "Below point" nil) - (const :tag "Without header" body) + :type '(choice (const :tag "Body and Header" t) + (const :tag "Body" body) + (const :tag "Below Point" nil) (const :tag "Invoke supercite" supercite) - (const :tag "Invoke supercite, automatically" autosupercite) - (const :tag "Without header, with attribution" attribution) - (const :tag "Without header, with attribution, automatically" - autoattrib) - (const :tag "Entire message with headers" t)) + (const :tag "Invoke supercite, Automatically" autosupercite) + (const :tag "Body With Attribution" attribution) + (const :tag "Body With Attribution, Automatically" + autoattrib)) :group 'mh-letter) @@ -947,6 +982,11 @@ for relative to the `mh-progs' directory unless it is an absolute pathname." ;;; Sending Mail (:group 'mh-sending-mail) +(defcustom mh-compose-forward-as-mime-flag t + "Non-nil means that messages are forwarded as a MIME part." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-compose-letter-function nil "Invoked when setting up a letter draft. It is passed three arguments: TO recipients, SUBJECT, and CC recipients." @@ -965,6 +1005,11 @@ message and the original subject line." :type 'string :group 'mh-sending-mail) +(defcustom mh-insert-x-mailer-flag t + "*Non-nil means append an X-Mailer field to the header." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-reply-default-reply-to nil "*Sets the person or persons to whom a reply will be sent. If nil, prompt for recipient. If non-nil, then \\`\\[mh-reply]' will use this @@ -975,6 +1020,18 @@ The values \"cc\" and \"all\" do the same thing." (const "cc") (const "all")) :group 'mh-sending-mail) +(defcustom mh-reply-show-message-flag t + "*Non-nil means the show buffer is displayed using \\\\[mh-reply]. + +The setting of this variable determines whether the MH `show-buffer' is +displayed with the current message when using `mh-reply' without a prefix +argument. Set it to nil if you already include the message automatically +in your draft using + repl: -filter repl.filter +in your ~/.mh_profile file." + :type 'boolean + :group 'mh-sending-mail) + ;;; Sequences (:group 'mh-sequences) @@ -1120,6 +1177,7 @@ The gnus method uses a different color for each indentation." "Delivered-To:" ; Egroups/yahoogroups mailing list manager "Delivery-Date:" ; MH "Delivery:" + "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys "Encoding:" "Envelope-to:" "Errors-To:" @@ -1188,6 +1246,7 @@ The gnus method uses a different color for each indentation." "X-Envelope-From:" "X-Envelope-Sender:" "X-Envelope-To:" + "X-Evolution:" ; Evolution mail client "X-Face:" "X-Folder:" ; Spam "X-From-Line" @@ -1264,6 +1323,7 @@ The gnus method uses a different color for each indentation." "X-Trace:" "X-UID" "X-UIDL:" + "X-USANET-" ; usa.net "X-UserInfo1:" "X-VSMLoop:" ; NTMail "X-Vms-To:" @@ -1527,13 +1587,13 @@ Optional argument ARG is not used." (defun mh-tool-bar-folder-help () "Visit \"(mh-e)Top\"." (interactive) - (Info-goto-node "(mh-e)Top") + (info "(mh-e)Top") (delete-other-windows)) (defun mh-tool-bar-letter-help () "Visit \"(mh-e)Draft Editing\"." (interactive) - (Info-goto-node "(mh-e)Draft Editing") + (info "(mh-e)Draft Editing") (delete-other-windows)) (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) @@ -1907,9 +1967,9 @@ This button runs `mh-previous-undeleted-msg'") ;; Common buttons (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") (mh-tool-bar-folder-help (folder) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") (mh-tool-bar-letter-help (letter) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") ;; Folder narrowed to sequence buttons (mh-widen (sequence) "widen" "Widen from the sequence\nThis button runs `mh-widen'")) @@ -2085,7 +2145,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Scan Listing (:group 'mh-folder-faces) (defvar mh-folder-body-face 'mh-folder-body-face - "Face for highlighting body text in MH-Folder buffers.") + "Face used to highlight body text in MH-Folder buffers.") (defface mh-folder-body-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2093,11 +2153,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting body text in MH-Folder buffers." + "Face used to highlight body text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face - "Face for the current message line in MH-Folder buffers.") + "Face used for the current message line in MH-Folder buffers.") (defface mh-folder-cur-msg-face '((((type tty pc) (class color)) (:background "LightGreen")) @@ -2108,11 +2168,11 @@ will be removed from the unseen sequence." (((class color) (background dark)) (:background "DarkOliveGreen4")) (t (:underline t))) - "Face for the current message line in MH-Folder buffers." + "Face used for the current message line in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face - "Face for highlighting the current message in MH-Folder buffers.") + "Face used to highlight the current message in MH-Folder buffers.") (defface mh-folder-cur-msg-number-face '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) @@ -2120,11 +2180,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face for highlighting the current message in MH-Folder buffers." + "Face used to highlight the current message in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-date-face 'mh-folder-date-face - "Face for highlighting the date in MH-Folder buffers.") + "Face used to highlight the date in MH-Folder buffers.") (defface mh-folder-date-face '((((class color) (background light)) (:foreground "snow4")) @@ -2132,11 +2192,11 @@ will be removed from the unseen sequence." (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the date in MH-Folder buffers." + "Face used to highlight the date in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-followup-face 'mh-folder-followup-face - "Face for highlighting Re: (followup) subject text in MH-Folder buffers.") + "Face used to highlight Re: subject text in MH-Folder buffers.") (defface mh-folder-followup-face '((((class color) (background light)) (:foreground "blue3")) @@ -2144,11 +2204,11 @@ will be removed from the unseen sequence." (:foreground "LightGoldenRod")) (t (:bold t))) - "Face for highlighting Re: (followup) subject text in MH-Folder buffers." + "Face used to highlight Re: subject text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face - "Face for highlighting the message number in MH-Folder buffers.") + "Face used to highlight the message number in MH-Folder buffers.") (defface mh-folder-msg-number-face '((((class color) (background light)) (:foreground "snow4")) @@ -2156,15 +2216,15 @@ will be removed from the unseen sequence." (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the message number in MH-Folder buffers." + "Face used to highlight the message number in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-deleted-face 'mh-folder-deleted-face - "Face for highlighting deleted messages in MH-Folder buffers.") + "Face used to highlight deleted messages in MH-Folder buffers.") (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face) (defvar mh-folder-refiled-face 'mh-folder-refiled-face - "Face for highlighting refiled messages in MH-Folder buffers.") + "Face used to highlight refiled messages in MH-Folder buffers.") (defface mh-folder-refiled-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2174,11 +2234,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting refiled messages in MH-Folder buffers." + "Face used to highlight refiled messages in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-subject-face 'mh-folder-subject-face - "Face for highlighting subject text in MH-Folder buffers.") + "Face used to highlight subject text in MH-Folder buffers.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-folder")) (defface mh-folder-subject-face @@ -2188,7 +2248,7 @@ will be removed from the unseen sequence." (:foreground "yellow")) (t (:bold t))) - "Face for highlighting subject text in MH-Folder buffers." + "Face used to highlight subject text in MH-Folder buffers." :group 'mh-folder-faces) (defface mh-folder-tick-face @@ -2199,15 +2259,15 @@ will be removed from the unseen sequence." :group 'mh-folder-faces) (defvar mh-folder-address-face 'mh-folder-address-face - "Face for highlighting the address in MH-Folder buffers.") + "Face used to highlight the address in MH-Folder buffers.") (copy-face 'mh-folder-subject-face 'mh-folder-address-face) (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face - "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.") + "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.") (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face) (defvar mh-folder-to-face 'mh-folder-to-face - "Face for highlighting the To: string in MH-Folder buffers.") + "Face used to highlight the To: string in MH-Folder buffers.") (defface mh-folder-to-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2215,7 +2275,7 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting the To: string in MH-Folder buffers." + "Face used to highlight the To: string in MH-Folder buffers." :group 'mh-folder-faces) @@ -2223,7 +2283,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Searching (:group 'mh-index-faces) (defvar mh-index-folder-face 'mh-index-folder-face - "Face for highlighting folders in MH-Index buffers.") + "Face used to highlight folders in MH-Index buffers.") (defface mh-index-folder-face '((((class color) (background light)) (:foreground "dark green" :bold t)) @@ -2231,7 +2291,7 @@ will be removed from the unseen sequence." (:foreground "indian red" :bold t)) (t (:bold t))) - "Face for highlighting folders in MH-Index buffers." + "Face used to highlight folders in MH-Index buffers." :group 'mh-index-faces) @@ -2244,7 +2304,7 @@ will be removed from the unseen sequence." (((class color) (background dark)) (:background "gray10")) (t (:bold t))) - "Face for displaying header fields in draft buffers." + "Face used to display header fields in draft buffers." :group 'mh-letter-faces) @@ -2252,7 +2312,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Message Display (:group 'mh-show-faces) (defvar mh-show-cc-face 'mh-show-cc-face - "Face for highlighting cc header fields.") + "Face used to highlight cc: header fields.") (defface mh-show-cc-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2262,11 +2322,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting cc header fields." + "Face used to highlight cc: header fields." :group 'mh-show-faces) (defvar mh-show-date-face 'mh-show-date-face - "Face for highlighting the Date header field.") + "Face used to highlight the Date: header field.") (defface mh-show-date-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) @@ -2274,7 +2334,7 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "ForestGreen")) (((class color) (background dark)) (:foreground "PaleGreen")) (t (:bold t :underline t))) - "Face for highlighting the Date header field." + "Face used to highlight the Date: header field." :group 'mh-show-faces) (defvar mh-show-header-face 'mh-show-header-face @@ -2289,13 +2349,36 @@ will be removed from the unseen sequence." "Face used to deemphasize unspecified header fields." :group 'mh-show-faces) +(defvar mh-show-pgg-good-face 'mh-show-pgg-good-face + "Face used to highlight a good PGG signature.") +(defface mh-show-pgg-good-face + '((t (:bold t :foreground "LimeGreen"))) + "Face used to highlight a good PGG signature." + :group 'mh-show-faces) + +(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted.") +(defface mh-show-pgg-unknown-face + '((t (:bold t :foreground "DarkGoldenrod2"))) + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted." + :group 'mh-show-faces) + +(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face + "Face used to highlight a bad PGG signature.") +(defface mh-show-pgg-bad-face + '((t (:bold t :foreground "DeepPink1"))) + "Face used to highlight a bad PGG signature." + :group 'mh-show-faces) + (defface mh-show-signature-face '((t (:italic t))) - "Face for highlighting message signature." + "Face used to highlight the message signature." :group 'mh-show-faces) (defvar mh-show-to-face 'mh-show-to-face - "Face for highlighting the To: header field.") + "Face used to highlight the To: header field.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-show")) (defface mh-show-to-face @@ -2306,11 +2389,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "SaddleBrown")) (((class color) (background dark)) (:foreground "burlywood")) (t (:underline t))) - "Face for highlighting the To: header field." + "Face used to highlight the To: header field." :group 'mh-show-faces) (defvar mh-show-from-face 'mh-show-from-face - "Face for highlighting the From: header field.") + "Face used to highlight the From: header field.") (defface mh-show-from-face '((((class color) (background light)) (:foreground "red3")) @@ -2318,17 +2401,17 @@ will be removed from the unseen sequence." (:foreground "cyan")) (t (:bold t))) - "Face for highlighting the From: header field." + "Face used to highlight the From: header field." :group 'mh-show-faces) (defface mh-show-xface-face '((t (:foreground "black" :background "white"))) - "Face for displaying the X-Face image. + "Face used to display the X-Face image. The background and foreground is used in the image." :group 'mh-show-faces) (defvar mh-show-subject-face 'mh-show-subject-face - "Face for highlighting the Subject header field.") + "Face used to highlight the Subject: header field.") (copy-face 'mh-folder-subject-face 'mh-show-subject-face) diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index b5eea79ae1..0cfb053c88 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1,11 +1,12 @@ ;;; mh-e.el --- GNU Emacs interface to the MH mail system -;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, -;; 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1988, +;; 1990, 1992, 1993, 1994, 1995, 1997, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler -;; Version: 7.82 +;; Version: 7.84 ;; Keywords: mail ;; This file is part of GNU Emacs. @@ -97,10 +98,7 @@ (defvar font-lock-auto-fontify) (defvar font-lock-defaults) -(defconst mh-version "7.82" "Version number of MH-E.") - -;;; Autoloads -(autoload 'Info-goto-node "info") +(defconst mh-version "7.84" "Version number of MH-E.") (defvar mh-partial-folder-mode-line-annotation "select" "Annotation when displaying part of a folder. @@ -578,7 +576,8 @@ Do not call this function from outside MH-E; use \\[mh-rmail] instead." (setq folder mh-inbox)) (let ((threading-needed-flag nil)) (let ((config (current-window-configuration))) - (delete-other-windows) + (when (and mh-show-buffer (get-buffer mh-show-buffer)) + (delete-windows-on mh-show-buffer)) (cond ((not (get-buffer folder)) (mh-make-folder folder) (setq threading-needed-flag mh-show-threads-flag) @@ -717,22 +716,24 @@ updated." (mh-refile-a-msg nil folder)) (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg))) -(defun mh-refile-or-write-again (message) - "Re-execute the last refile or write command on the given MESSAGE. +(defun mh-refile-or-write-again (range &optional interactive-flag) + "Re-execute the last refile or write command on the given RANGE. Default is the displayed message. Use the same folder or file as the previous -refile or write command." - (interactive (list (mh-get-msg-num t))) +refile or write command. +If INTERACTIVE-FLAG is non-nil then the function was called interactively." + (interactive (list (mh-interactive-range "Redo") t)) (if (null mh-last-destination) (error "No previous refile or write")) (let (output) (setq output (cond ((eq (car mh-last-destination) 'refile) - (mh-refile-a-msg message (cdr mh-last-destination)) + (mh-refile-msg range (cdr mh-last-destination)) (format "Destination folder: %s" (cdr mh-last-destination))) (t - (apply 'mh-write-msg-to-file message (cdr mh-last-destination)) + (mh-iterate-on-range msg range + (apply 'mh-write-msg-to-file msg (cdr mh-last-destination))) + (mh-next-msg interactive-flag) (format "Destination: %s" (cdr mh-last-destination))))) - (mh-next-msg (interactive-p)) (message output))) (defun mh-quit () @@ -1801,7 +1802,7 @@ Return in the current buffer." (message "inc %s..." folder)) (setq mh-next-direction 'forward) (goto-char (point-max)) - (mh-remove-all-notation) + (mh-remove-cur-notation) (let ((start-of-inc (point))) (if maildrop-name ;; I think MH 5 used "-ms-file" instead of "-file", @@ -1827,7 +1828,7 @@ Return in the current buffer." start-of-inc (point-max)))) (delete-region start-of-inc (point-max)) (unwind-protect (mh-widen t) - (mh-remove-all-notation) + (mh-remove-cur-notation) (goto-char (point-max)) (setq start-of-inc (point)) (insert saved-text) @@ -1846,7 +1847,15 @@ Return in the current buffer." (t (setq new-mail-flag t))) (keep-lines mh-scan-valid-regexp) ; Flush random scan lines - (setq mh-seq-list (mh-read-folder-sequences folder t)) + (let* ((sequences (mh-read-folder-sequences folder t)) + (new-cur (assoc 'cur sequences)) + (new-unseen (assoc mh-unseen-seq sequences))) + (unless (assoc 'cur mh-seq-list) + (push (list 'cur) mh-seq-list)) + (unless (assoc mh-unseen-seq mh-seq-list) + (push (list mh-unseen-seq) mh-seq-list)) + (setcdr (assoc 'cur mh-seq-list) (cdr new-cur)) + (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen))) (when (equal (point-max) start-of-inc) (mh-notate-cur)) (if new-mail-flag @@ -1858,8 +1867,7 @@ Return in the current buffer." (mh-thread-inc folder start-of-inc)) (mh-goto-cur-msg)) (goto-char point-before-inc)) - (mh-notate-user-sequences) - (mh-notate-deleted-and-refiled))))) + (mh-notate-user-sequences (cons start-of-inc (point-max))))))) (defun mh-make-folder-mode-line (&optional ignored) "Set the fields of the mode line for a folder buffer. @@ -2033,18 +2041,18 @@ with no arguments, before the commands are processed." (mh-coalesce-msg-list msgs)) (mh-delete-scan-msgs msgs) ;; Preserve sequences in destination folder... - (when (and mh-refile-preserves-sequences-flag - (numberp last)) + (when mh-refile-preserves-sequences-flag (clrhash dest-map) - (loop for i from (1+ last) + (loop for i from (1+ (or last 0)) for msg in (sort (copy-sequence msgs) #'<) do (loop for seq-name in (gethash msg seq-map) do (push i (gethash seq-name dest-map)))) (maphash #'(lambda (seq msgs) - ;; Run it in the background, since we don't care - ;; about the results. - (apply #'mh-exec-cmd-daemon "mark" #'ignore + ;; Can't be run in the background, since the + ;; current folder is changed by mark this could + ;; lead to a race condition with the next refile. + (apply #'mh-exec-cmd "mark" "-sequence" (symbol-name seq) dest-folder "-add" (mapcar #'(lambda (x) (format "%s" x)) (mh-coalesce-msg-list msgs)))) @@ -2201,13 +2209,14 @@ Expands ranges into set of individual numbers." (end-of-line (save-excursion (end-of-line) (point))) num) (while (re-search-forward "[0-9]+" end-of-line t) - (setq num (string-to-int (buffer-substring (match-beginning 0) - (match-end 0)))) + (setq num (string-to-number (buffer-substring (match-beginning 0) + (match-end 0)))) (cond ((looking-at "-") ; Message range (forward-char 1) (re-search-forward "[0-9]+" end-of-line t) - (let ((num2 (string-to-int (buffer-substring (match-beginning 0) - (match-end 0))))) + (let ((num2 (string-to-number + (buffer-substring (match-beginning 0) + (match-end 0))))) (if (< num2 num) (error "Bad message range: %d-%d" num num2)) (while (<= num num2) diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index a632efc785..126fd84ce9 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -1,6 +1,7 @@ ;;; mh-funcs.el --- MH-E functions not everyone will use right away -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -127,7 +128,7 @@ Display the results only if something went wrong." (set-buffer (get-buffer-create mh-temp-buffer)) (insert-before-markers output) (when (save-excursion - (beginning-of-buffer) + (goto-char (point-min)) (re-search-forward "^rmf: " (point-max) t)) (display-buffer mh-temp-buffer))) @@ -148,7 +149,7 @@ Display the results only if something went wrong." "-recurse" "-norecurse")) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing folders...done"))))) diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index e4b4a5b0d5..b850c8fdc4 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -1,6 +1,6 @@ ;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index 7b44dae1d0..dc07675186 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el @@ -1,6 +1,6 @@ ;;; mh-identity.el --- Multiple identify support for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -87,18 +87,18 @@ change." ;;;###mh-autoload (defun mh-identity-list-set (symbol value) "Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." (set-default symbol value) (mh-identity-make-menu)) (defvar mh-identity-local nil - "Buffer-local variable holding the identity currently in use.") + "Buffer-local variable that holds the identity currently in use.") (make-variable-buffer-local 'mh-identity-local) (defun mh-header-field-delete (field value-only) - "Delete FIELD in the mail header, or only its value if VALUE-ONLY is t. + "Delete header FIELD, or only its value if VALUE-ONLY is t. Return t if anything is deleted." (let ((field-colon (if (string-match "^.*:$" field) field @@ -119,11 +119,11 @@ Return t if anything is deleted." "Marker for the end of a signature inserted by `mh-insert-identity'.") (defun mh-identity-field-handler (field) - "Return the handler for a FIELD or nil if none set. + "Return the handler for header FIELD or nil if none set. The field name is downcased. If the FIELD begins with the character `:', then it must have a special handler defined in `mh-identity-handlers', else return an error since it is not a valid -message header." +header field." (or (cdr (assoc (downcase field) mh-identity-handlers)) (and (eq (aref field 0) ?:) (error (format "Field %s - unknown mh-identity-handler" field))) @@ -132,8 +132,8 @@ message header." ;;;###mh-autoload (defun mh-insert-identity (identity) - "Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." + "Insert fields specified by given IDENTITY. +See `mh-identity-list'." (interactive (list (completing-read "Identity: " @@ -167,7 +167,8 @@ Edit the `mh-identity-list' variable to define identity." ;;;###mh-autoload (defun mh-identity-handler-gpg-identity (field action &optional value) - "For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. + "Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." (cond @@ -180,8 +181,8 @@ when action 'add is selected." ;;;###mh-autoload (defun mh-identity-handler-signature (field action &optional value) - "For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (cond ((equal action 'remove) (when (and (markerp mh-identity-signature-start) @@ -210,8 +211,8 @@ The VALUE is added." ;;;###mh-autoload (defun mh-identity-handler-attribution-verb (field action &optional value) - "For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (when (and (markerp mh-identity-attribution-verb-start) (markerp mh-identity-attribution-verb-end)) (delete-region mh-identity-attribution-verb-start @@ -239,9 +240,10 @@ If VALUE is nil, use `mh-extract-from-attribution-verb'." (point-max-marker)))) (defun mh-identity-handler-default (field action top &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -if TOP is non-nil, add the field and it's VALUE at the top of the header, else -add it at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its +VALUE at the top of the header, else add it at the bottom of the header. If +action is 'add, the VALUE is added." (let ((field-colon (if (string-match "^.*:$" field) field (concat field ":")))) @@ -266,14 +268,16 @@ add it at the bottom of the header." ;;;###mh-autoload (defun mh-identity-handler-top (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." (mh-identity-handler-default field action t value)) ;;;###mh-autoload (defun mh-identity-handler-bottom (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." (mh-identity-handler-default field action nil value)) (provide 'mh-identity) diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el index 95341fa75f..c9a9c6cb6b 100644 --- a/lisp/mh-e/mh-inc.el +++ b/lisp/mh-e/mh-inc.el @@ -1,6 +1,6 @@ ;;; mh-inc.el --- MH-E `inc' and separate mail spool handling ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -98,10 +98,10 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." (provide 'mh-inc) -;; Local Variables: -;; indent-tabs-mode: nil -;; sentence-end-double-space: nil -;; End: +;;; Local Variables: +;;; indent-tabs-mode: nil +;;; sentence-end-double-space: nil +;;; End: -;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 +;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 ;;; mh-inc.el ends here diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index cde630236b..7a52b94dd2 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el @@ -1,6 +1,6 @@ ;;; mh-index -- MH-E interface to indexing programs -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler @@ -31,6 +31,7 @@ ;;; swish-e ;;; mairix ;;; namazu +;;; pick ;;; grep ;;; ;;; (2) To use this package, you first have to build an index. Please read @@ -352,43 +353,74 @@ they are concatenated to construct the base name." (defun* mh-index-search (redo-search-flag folder search-regexp &optional window-config) "Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. - -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. - -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. - -The documentation for the following functions describes how to generate the -index for each program: +Use a prefix argument to repeat the search. + +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. + +To perform the search, type \\\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. + +In addition, the \\\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. + +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* + + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. + +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." (interactive (list current-prefix-arg (progn @@ -998,8 +1030,8 @@ Unlike the other index search programs \"pick\" only searches messages present in the folder itself and does not descend into any sub-folders that may be present. -FOLDER-PATH is the directory containing the mails to be searched and -SEARCH-REGEXP is the pattern that pick gets." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (setq mh-index-pick-folder @@ -1029,7 +1061,13 @@ SEARCH-REGEXP is the pattern that pick gets." (defun mh-grep-execute-search (folder-path search-regexp) "Execute grep and read the results. -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." + +Unlike the other index search programs \"grep\" only searches messages present +in the folder itself and does not descend into any sub-folders that may be +present. + +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (call-process mh-grep-binary nil '(t nil) nil @@ -1081,34 +1119,34 @@ other matches left then return nil. If the current record is invalid return (defun mh-mairix-execute-search (folder-path search-regexp-list) "Execute mairix and read the results. -In the examples below replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.mairix. Then create the file -/home/user/Mail/.mairix/config with the following contents: +First create the directory \"/home/user/Mail/.mairix\". Then create the file +\"/home/user/Mail/.mairix/config\" with the following contents: - # This should contain the same thing as your `mh-user-path' - base=/home/user/Mail + base=/home/user/Mail - # List of folders that should be indexed. 3 dots at the end means there are - # subfolders within the folder - mh_folders=archive...:inbox:drafts:news:sent:trash + # List of folders that should be indexed. 3 dots at the end means there + # are subfolders within the folder + mh=archive...:inbox:drafts:news:sent:trash - vfolder_format=raw - database=/home/user/Mail/mairix/database + vfolder_format=raw + database=/home/user/Mail/mairix/database Use the following command line to generate the mairix index. Run this daily from cron: - mairix -f /home/user/Mail/.mairix/config + mairix -f /home/user/Mail/.mairix/config -FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-mairix-binary (error "Set mh-mairix-binary appropriately")) (apply #'call-process mh-mairix-binary nil '(t nil) nil - "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) + "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) search-regexp-list) (goto-char (point-min)) (setq mh-mairix-folder @@ -1167,10 +1205,10 @@ REGEXP-LIST is an alist of fields and values." (let ((expr-list (cdr conjunct)) (expr-string "")) (dolist (e expr-list) - (setq expr-string (concat expr-string "+" + (setq expr-string (concat expr-string "," (if (atom e) "" "~") (if (atom e) e (cadr e))))) - (setq final (concat final "," (substring expr-string 1))))) + (setq final (concat final "/" (substring expr-string 1))))) (substring final 1))) result))) result)) @@ -1327,52 +1365,49 @@ space-separated list of FOLDERS, or nothing to search all folders." (defun mh-swish-execute-search (folder-path search-regexp) "Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. - -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: - - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. + +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: + + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: - - FileRules pathname contains /home/user/Mail/scripts +following to \"config\": -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. + FileRules pathname contains /home/user/Mail/scripts -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - swish-e -c /home/user/Mail/.swish/config + swish-e -c /home/user/Mail/.swish/config -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish-binary @@ -1407,7 +1442,8 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (list (let* ((s (buffer-substring-no-properties start (1+ (point))))) (unless (string-match mh-swish-folder s) (return 'error)) - (if (string-match mh-user-path s) + (if (and (string-match mh-user-path s) + (< (match-end 0) (1- (length s)))) (format "+%s" (substring s (match-end 0) (1- (length s)))) (return 'error))) @@ -1431,34 +1467,35 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (defun mh-swish++-execute-search (folder-path search-regexp) "Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish++-binary @@ -1512,32 +1549,29 @@ REGEXP-LIST is an alist of fields and values." (defun mh-namazu-execute-search (folder-path search-regexp) "Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. - -Use the following command line to generate the namazu index. Run this -daily from cron: +Use the following command line to generate the namazu index. Run this daily +from cron: - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (let ((namazu-index-directory (format "%s%s" mh-user-path mh-namazu-directory))) (unless (file-exists-p namazu-index-directory) diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index b97e9fcde6..a975b88212 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el @@ -1,6 +1,6 @@ ;;; mh-init.el --- MH-E initialization. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 29005d47aa..e66f49e3a5 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -1,6 +1,6 @@ ;;; mh-junk.el --- Interface to anti-spam measures -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das , ;; Bill Wohler @@ -191,8 +191,8 @@ done by adding the following to your crontab: (message (format "Blacklisting message %d..." msg)) (set-buffer (get-buffer-create mh-temp-buffer)) (erase-buffer) - (call-process (expand-file-name mh-scan-prog mh-progs) mh-junk-background - t nil + (call-process (expand-file-name mh-scan-prog mh-progs) + nil mh-junk-background nil (format "%s" msg) current-folder "-format" "%<(mymbox{from})%|%(addr{from})%>") (goto-char (point-min)) diff --git a/lisp/mh-e/mh-loaddefs.el b/lisp/mh-e/mh-loaddefs.el index 4abe3b208e..9accabede5 100644 --- a/lisp/mh-e/mh-loaddefs.el +++ b/lisp/mh-e/mh-loaddefs.el @@ -1,6 +1,6 @@ ;;; mh-loaddefs.el --- automatically extracted autoloads ;; -;;; Copyright (C) 2005 Free Software Foundation, Inc. +;;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. ;;; Author: Bill Wohler ;;; Keywords: mail ;;; Commentary: @@ -13,7 +13,7 @@ ;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function ;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply ;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again) -;;;;;; "mh-comp" "mh-comp.el" (16665 53716)) +;;;;;; "mh-comp" "mh-comp.el" (17048 51103)) ;;; Generated autoloads from mh-comp.el (autoload (quote mh-edit-again) "mh-comp" "\ @@ -56,8 +56,10 @@ to reply to: cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." t nil) @@ -183,7 +185,7 @@ If we are at the first header field go to the start of the message body." t nil) ;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards ;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders ;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el" -;;;;;; (16671 48788)) +;;;;;; (17048 47864)) ;;; Generated autoloads from mh-funcs.el (autoload (quote mh-burst-digest) "mh-funcs" "\ @@ -261,7 +263,7 @@ Display cheat sheet for the commands of the current prefix in minibuffer." t nil ;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb ;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity ;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu) -;;;;;; "mh-identity" "mh-identity.el" (16671 57010)) +;;;;;; "mh-identity" "mh-identity.el" (17044 63778)) ;;; Generated autoloads from mh-identity.el (autoload (quote mh-identity-make-menu) "mh-identity" "\ @@ -271,43 +273,46 @@ change." nil nil) (autoload (quote mh-identity-list-set) "mh-identity" "\ Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." nil nil) (autoload (quote mh-insert-identity) "mh-identity" "\ -Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." t nil) +Insert fields specified by given IDENTITY. +See `mh-identity-list'." t nil) (autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\ -For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. +Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." nil nil) (autoload (quote mh-identity-handler-signature) "mh-identity" "\ -For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\ -For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\ Insert VALUE as attribution verb, setting up delimiting markers. If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil) (autoload (quote mh-identity-handler-top) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." nil nil) (autoload (quote mh-identity-handler-bottom) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." nil nil) ;;;*** -;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (16671 -;;;;;; 48848)) +;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (17048 +;;;;;; 44143)) ;;; Generated autoloads from mh-inc.el (autoload (quote mh-inc-spool-list-set) "mh-inc" "\ @@ -326,7 +331,7 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." nil nil) ;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p ;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences ;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el" -;;;;;; (16665 53754)) +;;;;;; (17044 64025)) ;;; Generated autoloads from mh-index.el (autoload (quote mh-index-update-maps) "mh-index" "\ @@ -346,43 +351,74 @@ Mirror sequences present in source folders in index folder." nil nil) (autoload (quote mh-index-search) "mh-index" "\ Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. - -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. - -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. - -The documentation for the following functions describes how to generate the -index for each program: +Use a prefix argument to repeat the search. + +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. + +To perform the search, type \\\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. + +In addition, the \\\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. + +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* + + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. + +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." t nil) +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." t nil) (autoload (quote mh-index-read-data) "mh-index" "\ Read index data from file." nil nil) @@ -463,114 +499,109 @@ space-separated list of FOLDERS, or nothing to search all folders." t nil) (autoload (quote mh-swish-execute-search) "mh-index" "\ Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. - -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: - - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. + +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: + + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: +following to \"config\": - FileRules pathname contains /home/user/Mail/scripts + FileRules pathname contains /home/user/Mail/scripts -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the swish index. Run this daily +from cron: -Use the following command line to generate the swish index. Run this -daily from cron: + swish-e -c /home/user/Mail/.swish/config - swish-e -c /home/user/Mail/.swish/config - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-swish++-execute-search) "mh-index" "\ Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-namazu-execute-search) "mh-index" "\ Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: - - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -Use the following command line to generate the namazu index. Run this -daily from cron: +Use the following command line to generate the namazu index. Run this daily +from cron: - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-index-choose) "mh-index" "\ Choose an indexing function. @@ -582,7 +613,7 @@ system." nil nil) ;;;*** ;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init" -;;;;;; "mh-init.el" (16684 6777)) +;;;;;; "mh-init.el" (17044 64253)) ;;; Generated autoloads from mh-init.el (autoload (quote mh-variant-set) "mh-init" "\ @@ -604,7 +635,7 @@ by the variable `mh-variants'." nil nil) ;;;*** ;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk" -;;;;;; "mh-junk.el" (16671 48929)) +;;;;;; "mh-junk.el" (17044 64253)) ;;; Generated autoloads from mh-junk.el (autoload (quote mh-junk-blacklist) "mh-junk" "\ @@ -644,7 +675,7 @@ The `mh-junk-program' option specifies the spam program in use." t nil) ;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp ;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command ;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el" -;;;;;; (16684 7323)) +;;;;;; (17048 47895)) ;;; Generated autoloads from mh-mime.el (autoload (quote mh-compose-insertion) "mh-mime" "\ @@ -857,15 +888,79 @@ View MIME PART-INDEX externally." t nil) ;;;*** ;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder) -;;;;;; "mh-pick" "mh-pick.el" (16671 49140)) +;;;;;; "mh-pick" "mh-pick.el" (17048 47905)) ;;; Generated autoloads from mh-pick.el (autoload (quote mh-search-folder) "mh-pick" "\ Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." t nil) + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." t nil) (autoload (quote mh-pick-do-search) "mh-pick" "\ Find messages that match the qualifications in the current pattern buffer. @@ -882,7 +977,7 @@ indexing program specified in `mh-index-program' is used." t nil) ;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color ;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file -;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (16680 11171)) +;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (17044 64253)) ;;; Generated autoloads from mh-print.el (autoload (quote mh-ps-print-msg) "mh-print" "\ @@ -935,7 +1030,7 @@ The messages are formatted by mhl. See the variable `mhl-formfile'." t nil) ;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default ;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq ;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq) -;;;;;; "mh-seq" "mh-seq.el" (16671 65286)) +;;;;;; "mh-seq" "mh-seq.el" (17048 47921)) ;;; Generated autoloads from mh-seq.el (autoload (quote mh-delete-seq) "mh-seq" "\ @@ -1157,7 +1252,7 @@ Use \\\\[mh-widen] to undo this command." t nil) ;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists ;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons) -;;;;;; "mh-speed" "mh-speed.el" (16665 53793)) +;;;;;; "mh-speed" "mh-speed.el" (17044 64253)) ;;; Generated autoloads from mh-speed.el (autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\ @@ -1196,7 +1291,7 @@ The function invalidates the latest ancestor that is present." nil nil) ;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p ;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address ;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias" -;;;;;; "mh-alias.el" (16671 49382)) +;;;;;; "mh-alias.el" (17048 47789)) ;;; Generated autoloads from mh-alias.el (autoload (quote mh-alias-reload) "mh-alias" "\ diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index d286069ba4..dcd8f67a0f 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1,6 +1,7 @@ ;;; mh-mime.el --- MH-E support for composing MIME messages -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -1325,6 +1326,18 @@ Parameter EL is unused." (point-max))) (forward-line -1))))) +(defun mh-mime-security-button-face (info) + "Return the button face to use for encrypted/signed mail based on INFO." + (cond ((string-match "OK" info) ;Decrypted mail + mh-show-pgg-good-face) + ((string-match "Failed" info) ;Decryption failed or signature invalid + mh-show-pgg-bad-face) + ((string-match "Undecided" info);Unprocessed mail + mh-show-pgg-unknown-face) + ((string-match "Untrusted" info);Key not trusted + mh-show-pgg-unknown-face) + (t mh-show-pgg-good-face))) + (defun mh-mime-security-press-button (handle) "Callback from security button for part HANDLE." (if (mm-handle-multipart-ctl-parameter handle 'gnus-info) @@ -1364,9 +1377,10 @@ Parameter EL is unused." (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info) "Undecided")) (details (mm-handle-multipart-ctl-parameter handle 'gnus-details)) - pressed-details begin end) + pressed-details begin end face) (setq details (if details (concat "\n" details) "")) (setq pressed-details (if mh-mime-security-button-pressed details "")) + (setq face (mh-mime-security-button-face info)) (unless (bolp) (insert "\n")) (setq begin (point)) (gnus-eval-format @@ -1382,6 +1396,7 @@ Parameter EL is unused." :mime-handle handle :action 'mh-widget-press-button :button-keymap mh-mime-security-button-map + :button-face face :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.") (dolist (ov (mh-funcall-if-exists overlays-in begin end)) (mh-funcall-if-exists overlay-put ov 'evaporate t)) diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el index f15bef7ec4..5c31fb167c 100644 --- a/lisp/mh-e/mh-pick.el +++ b/lisp/mh-e/mh-pick.el @@ -1,6 +1,7 @@ ;;; mh-pick.el --- make a search pattern and search for a message in MH-E -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -52,10 +53,74 @@ ;;;###mh-autoload (defun mh-search-folder (folder window-config) "Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) (current-window-configuration))) (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index 9a7df0b8fd..7539e45591 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el @@ -1,6 +1,6 @@ ;;; mh-print.el --- MH-E printing support -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Jeffrey C Honig ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index d09e980568..e618e6f41b 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -1,6 +1,7 @@ ;;; mh-seq.el --- MH-E sequences support -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -195,7 +196,7 @@ redone to get the new thread tree. This makes incremental threading easier.") (insert "\n")) (setq seq-list (cdr seq-list))) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing sequences...done"))))) @@ -788,10 +789,33 @@ This function can only be used the folder is threaded." If no prefix arg is given, then return DEFAULT." (let ((default-string (loop for x in default concat (format " %s" x)))) (if (or current-prefix-arg (equal default-string "")) - (delete "" (split-string (read-string "Pick expression: " - default-string))) + (mh-pick-args-list (read-string "Pick expression: " + default-string)) default))) +(defun mh-pick-args-list (s) + "Form list by grouping elements in string S suitable for pick arguments. +For example, the string \"-subject a b c -from Joe User \" +is converted to (\"-subject\" \"a b c\" \"-from\" +\"Joe User \"" + (let ((full-list (split-string s)) + current-arg collection arg-list) + (while full-list + (setq current-arg (car full-list)) + (if (null (string-match "^-" current-arg)) + (setq collection + (if (null collection) + current-arg + (format "%s %s" collection current-arg))) + (when collection + (setq arg-list (append arg-list (list collection))) + (setq collection nil)) + (setq arg-list (append arg-list (list current-arg)))) + (setq full-list (cdr full-list))) + (when collection + (setq arg-list (append arg-list (list collection)))) + arg-list)) + ;;;###mh-autoload (defun mh-narrow-to-subject (&optional pick-expr) "Limit to messages with same subject. @@ -1315,6 +1339,7 @@ All messages after START-POINT are added to the thread tree." (old-buffer-modified-flag (buffer-modified-p))) (delete-region (point-min) (point-max)) (mh-thread-print-scan-lines thread-tree) + (mh-notate-user-sequences) (mh-notate-deleted-and-refiled) (mh-notate-cur) (set-buffer-modified-p old-buffer-modified-flag)))) diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index a20e6e0a41..2617a941de 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -1,6 +1,6 @@ ;;; mh-speed.el --- Speedbar interface for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 16ae64b154..d371087cc6 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -1,6 +1,7 @@ ;;; mh-utils.el --- MH-E code needed for both sending and reading -;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -703,8 +704,8 @@ not pointing to a message." (save-excursion (beginning-of-line) (cond ((looking-at mh-scan-msg-number-regexp) - (string-to-int (buffer-substring (match-beginning 1) - (match-end 1)))) + (string-to-number (buffer-substring (match-beginning 1) + (match-end 1)))) (error-if-no-message (error "Cursor not pointing to message")) (t nil)))) @@ -1672,7 +1673,8 @@ The message is displayed in raw form." "Decode >From at beginning of lines for `mh-show-mode'." (save-excursion (let ((modified (buffer-modified-p)) - (case-fold-search nil)) + (case-fold-search nil) + (buffer-read-only nil)) (goto-char (mh-mail-header-end)) (while (re-search-forward "^>From" nil t) (replace-match "From")) -- 2.39.2