comparison lisp/vm/vm-save.el @ 54:05472e90ae02 r19-16-pre2

Import from CVS: tag r19-16-pre2
author cvs
date Mon, 13 Aug 2007 08:57:55 +0200
parents c53a95d3c46d
children 131b0175ea99
comparison
equal deleted inserted replaced
53:875393c1a535 54:05472e90ae02
130 (y-or-n-p 130 (y-or-n-p
131 (format "Save message %s in folder %s? " 131 (format "Save message %s in folder %s? "
132 (vm-number-of (car vm-message-pointer)) 132 (vm-number-of (car vm-message-pointer))
133 auto-folder))) 133 auto-folder)))
134 (let ((vm-delete-after-saving vm-delete-after-archiving)) 134 (let ((vm-delete-after-saving vm-delete-after-archiving))
135 (if (not (string-equal auto-folder "/dev/null")) 135 (vm-save-message auto-folder)
136 (vm-save-message auto-folder))
137 (vm-increment archived) 136 (vm-increment archived)
138 (message "%d archived, still working..." 137 (message "%d archived, still working..." archived)))
139 archived)))
140 (setq done (eq vm-message-pointer stop-point) 138 (setq done (eq vm-message-pointer stop-point)
141 vm-message-pointer (cdr vm-message-pointer)))) 139 vm-message-pointer (cdr vm-message-pointer))))
142 ;; fix mode line 140 ;; fix mode line
143 (intern (buffer-name) vm-buffers-needing-display-update) 141 (intern (buffer-name) vm-buffers-needing-display-update)
144 (vm-update-summary-and-mode-line)) 142 (vm-update-summary-and-mode-line))
432 (buffer-name file-buffer)) 430 (buffer-name file-buffer))
433 (message "Message%s written to %s" (if (/= 1 count) "s" "") file))) 431 (message "Message%s written to %s" (if (/= 1 count) "s" "") file)))
434 (setq vm-last-written-file file))) 432 (setq vm-last-written-file file)))
435 433
436 (defun vm-pipe-message-to-command (command prefix-arg) 434 (defun vm-pipe-message-to-command (command prefix-arg)
437 "Run shell command with the some or all of the current message as input. 435 "Runs a shell command with some or all of the contents of the
438 By default the entire message is used. 436 current message as input.
437 By default, the entire message is used.
439 With one \\[universal-argument] the text portion of the message is used. 438 With one \\[universal-argument] the text portion of the message is used.
440 With two \\[universal-argument]'s the header portion of the message is used. 439 With two \\[universal-argument]'s the header portion of the message is used.
441 With three \\[universal-argument]'s the visible header portion of the message 440 With three \\[universal-argument]'s the visible header portion of the message
442 plus the text portion is used. 441 plus the text portion is used.
443 442
494 (vm-display buffer t '(vm-pipe-message-to-command) 493 (vm-display buffer t '(vm-pipe-message-to-command)
495 '(vm-pipe-message-to-command)) 494 '(vm-pipe-message-to-command))
496 (vm-display nil nil '(vm-pipe-message-to-command) 495 (vm-display nil nil '(vm-pipe-message-to-command)
497 '(vm-pipe-message-to-command))))) 496 '(vm-pipe-message-to-command)))))
498 497
499 (defun vm-print-message (count) 498 (defun vm-print-message (&optional count)
500 "Print the current message 499 "Print the current message
501 Prefix arg N means print the current message and the next N - 1 messages. 500 Prefix arg N means print the current message and the next N - 1 messages.
502 Prefix arg -N means print the current message and the previous N - 1 messages. 501 Prefix arg -N means print the current message and the previous N - 1 messages.
503 502
504 The variable `vm-print-command' controls what command is run to 503 The variable `vm-print-command' controls what command is run to
512 (interactive "p") 511 (interactive "p")
513 (vm-follow-summary-cursor) 512 (vm-follow-summary-cursor)
514 (vm-select-folder-buffer) 513 (vm-select-folder-buffer)
515 (vm-check-for-killed-summary) 514 (vm-check-for-killed-summary)
516 (vm-error-if-folder-empty) 515 (vm-error-if-folder-empty)
516 (or count (setq count 1))
517 (let ((buffer (get-buffer-create "*Shell Command Output*")) 517 (let ((buffer (get-buffer-create "*Shell Command Output*"))
518 (command (mapconcat (function identity) 518 (command (mapconcat (function identity)
519 (nconc (list vm-print-command) 519 (nconc (list vm-print-command)
520 vm-print-command-switches) 520 vm-print-command-switches)
521 " ")) 521 " "))