72 |
(message "Bursting digest...done"))) |
(message "Bursting digest...done"))) |
73 |
|
|
74 |
;;;###mh-autoload |
;;;###mh-autoload |
75 |
(defun mh-copy-msg (msg-or-seq folder) |
(defun mh-copy-msg (range folder) |
76 |
"Copy the specified MSG-OR-SEQ to another FOLDER without deleting them. |
"Copy the specified RANGE to another FOLDER without deleting them. |
77 |
Default is the displayed message. |
|
78 |
If optional prefix argument is provided, then prompt for the message sequence. |
Check the documentation of `mh-interactive-range' to see how RANGE is read in |
79 |
If variable `transient-mark-mode' is non-nil and the mark is active, then the |
interactive use." |
80 |
selected region is copied. |
(interactive (list (mh-interactive-range "Copy") |
|
In a program, MSG-OR-SEQ can be a message number, a list of message numbers, a |
|
|
region in a cons cell, or a sequence." |
|
|
(interactive (list (mh-interactive-msg-or-seq "Copy") |
|
81 |
(mh-prompt-for-folder "Copy to" "" t))) |
(mh-prompt-for-folder "Copy to" "" t))) |
82 |
(let ((msg-list (let ((result ())) |
(let ((msg-list (let ((result ())) |
83 |
(mh-iterate-on-msg-or-seq msg msg-or-seq |
(mh-iterate-on-range msg range |
84 |
(mh-notate nil mh-note-copied mh-cmd-note) |
(mh-notate nil mh-note-copied mh-cmd-note) |
85 |
(push msg result)) |
(push msg result)) |
86 |
result))) |
result))) |
91 |
(defun mh-kill-folder () |
(defun mh-kill-folder () |
92 |
"Remove the current folder and all included messages. |
"Remove the current folder and all included messages. |
93 |
Removes all of the messages (files) within the specified current folder, |
Removes all of the messages (files) within the specified current folder, |
94 |
and then removes the folder (directory) itself." |
and then removes the folder (directory) itself. |
95 |
|
The value of `mh-kill-folder-suppress-prompt-hook' is a list of functions to |
96 |
|
be called, with no arguments, which should return a value of non-nil if |
97 |
|
verification is not desired." |
98 |
(interactive) |
(interactive) |
99 |
(if (or mh-index-data |
(if (or (run-hook-with-args-until-success |
100 |
|
'mh-kill-folder-suppress-prompt-hook) |
101 |
(yes-or-no-p (format "Remove folder %s (and all included messages)? " |
(yes-or-no-p (format "Remove folder %s (and all included messages)? " |
102 |
mh-current-folder))) |
mh-current-folder))) |
103 |
(let ((folder mh-current-folder) |
(let ((folder mh-current-folder) |
155 |
optional prefix argument provided, prompt for the RANGE of messages to display |
optional prefix argument provided, prompt for the RANGE of messages to display |
156 |
after packing. Otherwise, show the entire folder." |
after packing. Otherwise, show the entire folder." |
157 |
(interactive (list (if current-prefix-arg |
(interactive (list (if current-prefix-arg |
158 |
(mh-read-msg-range mh-current-folder t) |
(mh-read-range "Scan" mh-current-folder t nil t |
159 |
|
mh-interpret-number-as-range-flag) |
160 |
'("all")))) |
'("all")))) |
161 |
(let ((threaded-flag (memq 'unthread mh-view-ops))) |
(let ((threaded-flag (memq 'unthread mh-view-ops))) |
162 |
(mh-pack-folder-1 range) |
(mh-pack-folder-1 range) |
233 |
(mh-recenter 0))) |
(mh-recenter 0))) |
234 |
|
|
235 |
;;;###mh-autoload |
;;;###mh-autoload |
236 |
(defun mh-print-msg (msg-or-seq) |
(defun mh-print-msg (range) |
237 |
"Print MSG-OR-SEQ on printer. |
"Print RANGE on printer. |
238 |
Default is the displayed message. |
|
239 |
If optional prefix argument is provided, then prompt for the message sequence. |
Check the documentation of `mh-interactive-range' to see how RANGE is read in |
240 |
If variable `transient-mark-mode' is non-nil and the mark is active, then the |
interactive use. |
|
selected region is printed. |
|
|
In a program, MSG-OR-SEQ can be a message number, a list of message numbers, a |
|
|
region in a cons cell, or a sequence. |
|
241 |
|
|
242 |
The variable `mh-lpr-command-format' is used to generate the print command. |
The variable `mh-lpr-command-format' is used to generate the print command. |
243 |
The messages are formatted by mhl. See the variable `mhl-formfile'." |
The messages are formatted by mhl. See the variable `mhl-formfile'." |
244 |
(interactive (list (mh-interactive-msg-or-seq "Print"))) |
(interactive (list (mh-interactive-range "Print"))) |
245 |
(message "Printing...") |
(message "Printing...") |
246 |
(let (msgs) |
(let (msgs) |
247 |
;; Gather message numbers and add them to "printed" sequence. |
;; Gather message numbers and add them to "printed" sequence. |
248 |
(mh-iterate-on-msg-or-seq msg msg-or-seq |
(mh-iterate-on-range msg range |
249 |
(mh-add-msgs-to-seq msg 'printed t) |
(mh-add-msgs-to-seq msg 'printed t) |
250 |
(mh-notate nil mh-note-printed mh-cmd-note) |
(mh-notate nil mh-note-printed mh-cmd-note) |
251 |
(push msg msgs)) |
(push msg msgs)) |
257 |
(mh-coalesce-msg-list msgs)) " ")) |
(mh-coalesce-msg-list msgs)) " ")) |
258 |
(lpr-command |
(lpr-command |
259 |
(format mh-lpr-command-format |
(format mh-lpr-command-format |
260 |
(cond ((listp msg-or-seq) |
(cond ((listp range) |
261 |
(format "Folder: %s, Messages: %s" |
(format "Folder: %s, Messages: %s" |
262 |
mh-current-folder msgs-string)) |
mh-current-folder msgs-string)) |
263 |
((symbolp msg-or-seq) |
((symbolp range) |
264 |
(format "Folder: %s, Sequence: %s" |
(format "Folder: %s, Sequence: %s" |
265 |
mh-current-folder msg-or-seq))))) |
mh-current-folder range))))) |
266 |
(scan-command |
(scan-command |
267 |
(format "scan %s | %s" msgs-string lpr-command))) |
(format "scan %s | %s" msgs-string lpr-command))) |
268 |
(if mh-print-background-flag |
(if mh-print-background-flag |
318 |
mh-seq-list nil |
mh-seq-list nil |
319 |
mh-next-direction 'forward) |
mh-next-direction 'forward) |
320 |
(with-mh-folder-updating (nil) |
(with-mh-folder-updating (nil) |
321 |
(mh-unmark-all-headers t))) |
(mh-remove-all-notation))) |
322 |
(t |
(t |
323 |
(message "Commands not undone.") |
(message "Commands not undone.") |
324 |
;; Remove by 2003-06-30 if nothing seems amiss. XXX |
;; Remove by 2003-06-30 if nothing seems amiss. XXX |