comparison lisp/mh-e/mh-funcs.el @ 67246:bce5c0d2041c

* mh-comp.el (mh-letter-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-letter-toggle-header-field-display): "Ellipsed" isn't a word, I think, so use "truncated". * mh-customize.el (mh-folder, mh-folder-faces): Group's manual section is Folders, not Organizing. Parent of mh-folder-faces is mh-folder, not mh-show. (mh-speed): Rename to mh-speedbar for consistency with mh-toolbar. (mh-thread): New group that corresponds with manual's Threading chapter. (mh-letter-faces): Group's manual section is Editing Drafts, not Sending Mail. (mh-sortm-args): New customization variable that used to be a defvar. (mh-index-new-messages-folders, mh-index-ticked-messages-folders): Move from mh-index group to mh-folders group. (mh-alias-local-users-prefix, mh-large-folder) (mh-recursive-folders-flag, mh-before-quit-hook) (mh-folder-mode-hook, mh-kill-folder-suppress-prompt-hook) (mh-quit-hook, mh-refile-msg-hook): Move from mh-show group to mh-folder group. (mh-highlight-citation-style): Rename from mh-highlight-citation-p. Sync docstrings with manual. (mh-mhl-format-file): Rename from mhl-formfile. Sync docstrings with manual. (mh-show-threads-flag): Move from mh-show group to mh-thread group. (mh-find-path-hook): Move from mh-show group to mh-e group. (mh-folder-updated-hook): Add to mh-folder group. (mh-forward-hook): Move from mh-folder to mh-sending-mail group. (mh-unseen-updated-hook): Move from mh-show to mh-sequences group. (mh-bury-show-buffer-flag, mh-clean-message-header-flag) (mh-decode-mime-flag, mh-display-buttons-for-alternatives-flag) (mh-display-buttons-for-inline-parts-flag) (mh-do-not-confirm-flag, mh-fetch-x-image-url) (mh-graphical-smileys-flag, mh-graphical-emphasis-flag) (mh-invisible-header-fields-default, mh-invisible-header-fields) (mh-lpr-command-format, mh-max-inline-image-height) (mh-max-inline-image-width) (mh-mime-save-parts-default-directory, mh-print-background-flag) (mh-show-maximum-size, mh-show-use-goto-addr-flag) (mh-show-use-xface-flag, mh-store-default-directory) (mh-summary-height, mh-delete-msg-hook (mh-show-hook, mh-show-mode-hook): Sync docstrings with manual. * mh-e.el (mh-scan-format-mh, mh-scan-good-msg-regexp) (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) (mh-scan-cur-msg-number-regexp, mh-scan-subject-regexp): Use non-fontification instead of non-fontifying. (mh-header-display): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-next-undeleted-msg, mh-previous-undeleted-msg): Rename arg to count. Sync docstrings with manual. (mh-refile-or-write-again): Use output from mh-write-msg-to-file so that message doesn't change when using this command. Sync docstrings with manual. (mh-page-msg, mh-previous-page): Rename arg to lines. Sync docstrings with manual. (mh-write-msg-to-file): Rename msg to message. Rename no-headers to no-header. Sync docstrings with manual. (mh-ps-print-map): Delete keybindings for deleted commands mh-ps-print-toggle-mime and mh-ps-print-msg-show. (mh-help-messages): Updated printing help. (mh-delete-msg, mh-delete-msg-no-motion, mh-first-msg) (mh-last-msg, mh-previous-unread-msg, mh-next-button) (mh-prev-button, mh-folder-toggle-mime-part) (mh-folder-inline-mime-part, mh-folder-save-mime-part) (mh-next-unread-msg, mh-toggle-mime-buttons): Sync docstrings with manual. * mh-funcs.el (mh-sortm-args): Now a customization option and in mh-customize.el. (mh-pipe-msg): Rename include-headers to include-header. Sync docstrings with manual. (mh-burst-digest, mh-page-digest, mh-page-digest-backwards) (mh-store-msg): Sync docstrings with manual. * mh-mime.el (mh-mime-save-parts): Rename arg to prompt. Sync docstrings with manual. (mh-toggle-mh-decode-mime-flag): Use English in message, not Lisp. Sync docstrings with manual. (mh-mm-display-part, mh-mm-inline-message): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-press-button): Sync docstrings with manual. (mh-display-with-external-viewer): Fix default output in minibuffer. Sync docstrings with manual. * mh-print.el: (mh-ps-print-mime, mh-ps-print-toggle-mime): Deleted. (mh-ps-print-color-option): Incorporate docstring from ps-print-color-p. (mh-ps-spool-buffer): Remove unused code. Fix indent. Slimline docstring. (mh-ps-spool-msg): Slimline docstring. Rename from mh-ps-spool-a-msg. Rewrote to use existing show buffer when available. (mh-ps-print-range): Extract method from common code in mh-ps-print-msg and mh-ps-print-msg-file. (mh-ps-print-preprint): Clean docstring. Use filename "mh-%s". (mh-ps-print-msg-show): Delete. Can use either mh-ps-print-msg-show or mh-ps-print-msg-show to same effect with new code in mh-ps-spool-msg. (mh-print-msg): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-ps-print-msg, mh-ps-print-msg-file) (mh-ps-print-toggle-faces, mh-ps-print-toggle-color): Sync docstrings with manual. * mh-utils.el (mh-show-ps-print-msg-show) (mh-show-ps-print-toggle-mime): Delete. (mh-show-ps-print-map): Updated accordingly. (mh-show-mode): Use mh-highlight-citation-style instead of mh-highlight-citation-p. (mh-show-xface, mh-display-msg): Use mh-mhl-format-file instead of mhl-formfile. (mh-show): Use mh-mhl-format-file instead of mhl-formfile. Sync docstrings with manual. (mh-show-font-lock-fontify-region, mh-modify, mh-goto-msg): Sync docstrings with manual.
author Bill Wohler <wohler@newt.com>
date Fri, 02 Dec 2005 05:54:33 +0000
parents 117f8e71b37a
children 2ae99b10dd40
comparison
equal deleted inserted replaced
67245:4b8cea82e2d9 67246:bce5c0d2041c
1 ;;; mh-funcs.el --- MH-E functions not everyone will use right away 1 ;;; mh-funcs.el --- MH-E functions not everyone will use right away
2 2
3 ;; Copyright (C) 1993, 1995, 3 ;; Copyright (C) 1993, 1995,
4 ;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4 ;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5 5
6 ;; Author: Bill Wohler <wohler@newt.com> 6 ;; Author: Bill Wohler <wohler@newt.com>
7 ;; Maintainer: Bill Wohler <wohler@newt.com> 7 ;; Maintainer: Bill Wohler <wohler@newt.com>
8 ;; Keywords: mail 8 ;; Keywords: mail
9 ;; See: mh-e.el 9 ;; See: mh-e.el
37 37
38 (eval-when-compile (require 'mh-acros)) 38 (eval-when-compile (require 'mh-acros))
39 (mh-require-cl) 39 (mh-require-cl)
40 (require 'mh-e) 40 (require 'mh-e)
41 41
42 ;;; Customization
43
44 (defvar mh-sortm-args nil
45 "Extra arguments to have \\[mh-sort-folder] pass to the \"sortm\" command.
46 The arguments are passed to sortm if \\[mh-sort-folder] is given a
47 prefix argument. Normally default arguments to sortm are specified in the
48 MH profile.
49 For example, '(\"-nolimit\" \"-textfield\" \"subject\") is a useful setting.")
50
51 ;;; Scan Line Formats 42 ;;; Scan Line Formats
52 43
53 (defvar mh-note-copied "C" 44 (defvar mh-note-copied "C"
54 "Messages that have been copied are marked by this character.") 45 "Messages that have been copied are marked by this character.")
55 46
58 49
59 ;;; Functions 50 ;;; Functions
60 51
61 ;;;###mh-autoload 52 ;;;###mh-autoload
62 (defun mh-burst-digest () 53 (defun mh-burst-digest ()
63 "Burst apart the current message, which should be a digest. 54 "Break up digest into separate messages\\<mh-folder-mode-map>.
64 The message is replaced by its table of contents and the messages from the 55
65 digest are inserted into the folder after that message." 56 This command uses the MH command \"burst\" to break out each message in the
57 digest into its own message. Using this command, you can quickly delete
58 unwanted messages, like this: Once the digest is split up, toggle out of
59 MH-Folder Show mode with \\[mh-toggle-showing] so that the scan lines fill the
60 screen and messages aren't displayed. Then use \\[mh-delete-msg] to quickly
61 delete messages that you don't want to read (based on the \"Subject:\" header
62 field). You can also burst the digest to reply directly to the people who
63 posted the messages in the digest. One problem you may encounter is that the
64 \"From:\" header fields are preceded with a \">\" so that your reply can't
65 create the \"To:\" field correctly. In this case, you must correct the \"To:\"
66 field yourself."
66 (interactive) 67 (interactive)
67 (let ((digest (mh-get-msg-num t))) 68 (let ((digest (mh-get-msg-num t)))
68 (mh-process-or-undo-commands mh-current-folder) 69 (mh-process-or-undo-commands mh-current-folder)
69 (mh-set-folder-modified-p t) ; lock folder while bursting 70 (mh-set-folder-modified-p t) ; lock folder while bursting
70 (message "Bursting digest...") 71 (message "Bursting digest...")
184 "-norecurse" "-fast")) 185 "-norecurse" "-fast"))
185 (mh-reset-threads-and-narrowing) 186 (mh-reset-threads-and-narrowing)
186 (mh-regenerate-headers range)) 187 (mh-regenerate-headers range))
187 188
188 ;;;###mh-autoload 189 ;;;###mh-autoload
189 (defun mh-pipe-msg (command include-headers) 190 (defun mh-pipe-msg (command include-header)
190 "Pipe the current message through the given shell COMMAND. 191 "Pipe message through shell command COMMAND.
191 If INCLUDE-HEADERS (prefix argument) is provided, send the entire message. 192
192 Otherwise just send the message's body without the headers." 193 You are prompted for the Unix command through which you wish to run your
194 message. If you give an argument INCLUDE-HEADER to this command, the message
195 header is included in the text passed to the command."
193 (interactive 196 (interactive
194 (list (read-string "Shell command on message: ") current-prefix-arg)) 197 (list (read-string "Shell command on message: ") current-prefix-arg))
195 (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t))) 198 (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t)))
196 (message-directory default-directory)) 199 (message-directory default-directory))
197 (save-excursion 200 (save-excursion
198 (set-buffer (get-buffer-create mh-temp-buffer)) 201 (set-buffer (get-buffer-create mh-temp-buffer))
199 (erase-buffer) 202 (erase-buffer)
200 (insert-file-contents msg-file-to-pipe) 203 (insert-file-contents msg-file-to-pipe)
201 (goto-char (point-min)) 204 (goto-char (point-min))
202 (if (not include-headers) (search-forward "\n\n")) 205 (if (not include-header) (search-forward "\n\n"))
203 (let ((default-directory message-directory)) 206 (let ((default-directory message-directory))
204 (shell-command-on-region (point) (point-max) command nil))))) 207 (shell-command-on-region (point) (point-max) command nil)))))
205 208
206 ;;;###mh-autoload 209 ;;;###mh-autoload
207 (defun mh-page-digest () 210 (defun mh-page-digest ()
208 "Advance displayed message to next digested message." 211 "Display next message in digest."
209 (interactive) 212 (interactive)
210 (mh-in-show-buffer (mh-show-buffer) 213 (mh-in-show-buffer (mh-show-buffer)
211 ;; Go to top of screen (in case user moved point). 214 ;; Go to top of screen (in case user moved point).
212 (move-to-window-line 0) 215 (move-to-window-line 0)
213 (let ((case-fold-search nil)) 216 (let ((case-fold-search nil))
220 (forward-line 2) 223 (forward-line 2)
221 (mh-recenter 0))) 224 (mh-recenter 0)))
222 225
223 ;;;###mh-autoload 226 ;;;###mh-autoload
224 (defun mh-page-digest-backwards () 227 (defun mh-page-digest-backwards ()
225 "Back up displayed message to previous digested message." 228 "Display previous message in digest."
226 (interactive) 229 (interactive)
227 (mh-in-show-buffer (mh-show-buffer) 230 (mh-in-show-buffer (mh-show-buffer)
228 ;; Go to top of screen (in case user moved point). 231 ;; Go to top of screen (in case user moved point).
229 (move-to-window-line 0) 232 (move-to-window-line 0)
230 (let ((case-fold-search nil)) 233 (let ((case-fold-search nil))
272 (t 275 (t
273 (message "Commands not undone")))) 276 (message "Commands not undone"))))
274 277
275 ;;;###mh-autoload 278 ;;;###mh-autoload
276 (defun mh-store-msg (directory) 279 (defun mh-store-msg (directory)
277 "Store the file(s) contained in the current message into DIRECTORY. 280 "Unpack message created with `uudecode' or `shar'.
278 The message can contain a shar file or uuencoded file. 281
279 Default directory is the last directory used, or initially the value of 282 The default DIRECTORY for extraction is the current directory; however, you
280 `mh-store-default-directory' or the current directory." 283 have a chance to specify a different extraction directory. The next time you
284 use this command, the default directory is the last directory you used. If you
285 would like to change the initial default directory, customize the option
286 `mh-store-default-directory'."
281 (interactive (list (let ((udir (or mh-store-default-directory 287 (interactive (list (let ((udir (or mh-store-default-directory
282 default-directory))) 288 default-directory)))
283 (read-file-name "Store message in directory: " 289 (read-file-name "Store message in directory: "
284 udir udir nil)))) 290 udir udir nil))))
285 (let ((msg-file-to-store (mh-msg-filename (mh-get-msg-num t)))) 291 (let ((msg-file-to-store (mh-msg-filename (mh-get-msg-num t))))