%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/mail/ |
Current File : //usr/local/share/emacs/27.2/lisp/mail/rmailout.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303!\210\304\305\306\307\310\311\312\313&\210\304\314\306\315\310\316\312\313&\210\304\317\306\320\310\321\312\313&\210\304\322\306\323\310\324\325\326\312\313& \207" [require rmail provide rmailout custom-declare-variable rmail-output-decode-coding nil "If non-nil, do coding system decoding when outputting message as Babyl." :type boolean :group rmail-output rmail-output-file-alist "Alist matching regexps to suggested output Rmail files.\nThis is a list of elements of the form (REGEXP . NAME-EXP).\nThe suggestion is taken if REGEXP matches anywhere in the message buffer.\nNAME-EXP may be a string constant giving the file name to use,\nor more generally it may be any kind of expression that returns\na file name as a string." (repeat (cons regexp (choice :value "" (string :tag "File Name") sexp))) rmail-fields-not-to-output "Regexp describing fields to exclude when outputting a message to a file.\nThe function `rmail-delete-unwanted-fields' uses this, ignoring case." (choice (const :tag "None" nil) regexp) rmail-output-reset-deleted-flag "Non-nil means reset the \"deleted\" flag when outputting a message to a file." (choice (const :tag "Output with the \"deleted\" flag reset" t) (const :tag "Output with the \"deleted\" flag intact" nil)) :version "27.1"] 10) #@147 Read the file name to use for `rmail-output'. Set `rmail-default-file' to this name as well as returning it. This uses `rmail-output-file-alist'. (defalias 'rmail-output-read-file-name #[nil "\203~ \204\f \306\307!\210r q\210\310\n!\311\n!\312 \203 q\210\212\214~\210\f}\210\313\211\211\203w \204w eb\210\314@@\313\315#\203n \3161V \317@A!0\202l \320\321\322\323@@@A$\324#\210)\313A\211\2045 .\206\200 !\325\326\327\330!!\331Q\332!!\333!!#\332!!\"\"\334\"!\203\255 \325\330!!\"\"\202\274 \325\"\206\267 \330!!\332!!\"\211 *\207" [rmail-output-file-alist rmail-buffer rmail-current-message end beg rmail-view-buffer error "There is no Rmail buffer" rmail-msgbeg rmail-msgend rmail-buffers-swapped-p nil re-search-forward t (error) eval display-warning rmail-output format-message "Error evaluating `rmail-output-file-alist' element:\nregexp: %s\naction: %s\nerror: %S\n" :error expand-file-name read-file-name "Output message to mail file (default " file-name-nondirectory "): " file-name-directory abbreviate-file-name file-directory-p err answer tail rmail-default-file default-file read-file] 8 (#$ . 1720)]) #@170 Delete all headers matching `rmail-fields-not-to-output'. Retains headers matching the regexp PRESERVE. Ignores case. The buffer should be narrowed to just the header. (defalias 'rmail-delete-unwanted-fields #[(preserve) "\205% \212eb\210\303\304\305\303#\205$ \306 \210\307\n!\204\n `\310\311!|\210\202\n *\207" [rmail-fields-not-to-output case-fold-search preserve t re-search-forward nil beginning-of-line looking-at line-beginning-position 2] 4 (#$ . 2890)]) #@459 Convert the current buffer's text to Babyl and output to FILE-NAME. Alters the current buffer's text, so it should be a temporary buffer. If a buffer is visiting FILE-NAME, adds the text to that buffer rather than saving the file directly. If the buffer is an Rmail buffer, updates it accordingly. If no buffer is visiting FILE-NAME, appends the text directly to FILE-NAME, and displays a "Wrote file" message unless NOMSG is a symbol (neither nil nor t). (defalias 'rmail-output-as-babyl #[(file-name nomsg) "\306\214eb\210\307\310\311\312#\210e`}\210 \203 \313\311!\210)\314 \210\315\n!p\211\2040 \316ed\n\317 %\202d \fp=\203: \320\321!\210\fq\210\317\322\323!\205F \203W \324\"\202c e\325 T}\210db\210\326!*+\207" [coding-system-for-write rmail-fields-not-to-output file-name tembuf buf nomsg emacs-mule-unix search-forward "\n\n" nil move rmail-delete-unwanted-fields rmail-convert-to-babyl-format find-buffer-visiting write-region t error "Can't output message to same file it's already in" boundp rmail-current-message rmail-output-to-babyl-buffer buffer-size insert-buffer-substring msg inhibit-read-only] 7 (#$ . 3364)]) #@157 Copy message in TEMBUF into the current Babyl Rmail buffer. Do what is necessary to make Rmail know about the new message, then display message number MSG. (defalias 'rmail-output-to-babyl-buffer #[(tembuf msg) "\204\f \203\f \306\307!\210\310 \210~\210dd}\210\311\n!\210eb\210~\210\312\313!\210`d}\210\314\307!\210\315 \203Y \316 \203J \317 \212\320\216\321!\210\f\322 \210,\202U rq\210\f\322 \210*\323 \210)\324!\207" [buffer-auto-save-file-name auto-save-default tembuf rmail-total-messages total window auto-save-mode t rmail-maybe-set-message-counters insert-buffer-substring search-backward "\n" rmail-count-new-messages rmail-summary-exists rmail-summary-displayed selected-window #[nil "\301!\207" [window select-window] 2] rmail-pop-to-buffer rmail-update-summary rmail-maybe-display-summary rmail-show-message-1 rmail-summary-buffer msg] 2 (#$ . 4518)]) #@65 Convert the mbox message in the current buffer to Babyl format. (defalias 'rmail-convert-to-babyl-format #[nil "\306e\307\310eb\210\214\311\312!\204 \313\314!\210\315c\210\316 \210\212\317\320\307\310#\205' `S)\310\212\317\321\f\310#)\212\317\322\f\310#)\205D \212\317\323\f\310#),db\210 \203i \212\324\f`\307\310\211%\204\\ \325\326!\210 b\210`\327\330!|\210\331c\210),\203\231 \212\3321\204 \333\fT\212\334\307x\210`)\"\210\3100\202\210 \210\202\230 \203\230 ,b\210`\327\330!|\210\331c\210),\212\214\n`}\210eb\210\335\336\307\310#\203\262 \337\340!\210\202\243 *n\204\272 \341 \210\342c\210\307-.\203\353 \212\nb\210\335\320\307\310#\210\310\343/\n\310#*\205\341 \344\345\346!\227!0\347\n`0#\210)\212\nb\210\350y\210\351\352-!\353\261.\207" [buffer-undo-list case-fold-search start count header-end quoted-printable-header-field-end 0 nil t looking-at "^From " error "Invalid mbox message" "\f\n0,,\n*** EOOH ***\n" rmail-nuke-pinhead-header re-search-forward "\n\n" "^content-transfer-encoding:\\(\n?[ ]\\)*quoted-printable\\(\n?[ ]\\)*" "^content-type:\\(\n?[ ]\\)\\(text\\|message\\)/" "^content-transfer-encoding:\\(\n?[ ]\\)*base64\\(\n?[ ]\\)*" mail-unquote-printable-region message "Malformed MIME quoted-printable message" search-backward ":" ": 8bit" (error) base64-decode-region "\n " search-forward "\n" replace-match "\n^_" newline 31 re-search-backward intern match-string 1 rmail-decode-region 3 "X-Coding-System: " symbol-name "\n" base64-header-field-end last-coding-system-used rmail-output-decode-coding rmail-mime-charset-pattern mime-charset] 6 (#$ . 5403)]) #@242 Delete the "From " line in the current mbox message. The variable `rmail-unix-mail-delimiter' specifies the From line format. Replaces the From line with a "Mail-from" header. Adds "Date" and "From" headers if they are not already present. (defalias 'rmail-nuke-pinhead-header #[nil "\212\214`\3061 \307\310!0\202 \210db\210\310c\210`\311\211\211\n}\210\312b\210\307\313\311\312#b\210\307\314\311\312#\2057 `b\210)\311\315\316 P\311\312#\205~ \317\320\203R \321\202r \322\323\224\323\225U\204_ \324\202p \325\224\325\225U\204o \325\224\325\225{\202p \326\327Q \203z \321\202{ \330Q\312\".\207" [has-date has-from end start case-fold-search rmail-unix-mail-delimiter (error) search-forward "\n\n" nil t "\nFrom:" "\nDate:" re-search-forward "^" replace-match "Mail-from: \\&" "" "Date: \\2, \\4 \\3 \\9 \\5 " 7 "\\7" 10 "EST" "\n" "From: \\1\n"] 6 (#$ . 7018)]) (autoload 'mail-mbox-from "mail-utils") #@518 Convert the current buffer's text to mbox and output to FILE-NAME. Alters the current buffer's text, so it should be a temporary buffer. If a buffer is visiting FILE-NAME, adds the text to that buffer rather than saving the file directly. If the buffer is an Rmail buffer, updates it accordingly. If no buffer is visiting FILE-NAME, appends the text directly to FILE-NAME, and displays a "Wrote file" message unless NOMSG is a symbol (neither nil nor t). AS-SEEN is non-nil if we are copying the message "as seen". (defalias 'rmail-output-as-mbox #[(file-name nomsg &optional as-seen) "\306\307\211\211eb\210\310\311\307\312#\210e`}\210\313\f\203 \314\202 \315!\210eb\210\316\317!\204. \320 c\210~\210db\210\321 \210eb\210\322 !p45\323\324 \"\203Q \325 \326\211\224#5\204\313 \327\21167\n\203y \330\331!8r8q\210\332\216\333\n!\210\334\335d \307\336%\210+\334ed \306\204\207 \n\205\210 \336%\210\n\205\307 \337\n\340\n!\306#\210\341\342\307\211\343\344\345\346\3479 &\n\326U\203\260 \350 !\210\202\275 \337\340\n!\n\306#\210\351\352\n\"\210?\205\307 \353\354\n\"*\2025p=\203\326 \351\355!\2105q\210\306\356\357!\205\343 /:;:\203\365 <\203\365 \351\360!\210:\203\3614:\"\202e\362 T}\210db\210\3634!*.\207" [date from encrypted-file-name case-fold-search rmail-enable-mime file-name t nil search-forward "\n\n" move rmail-delete-unwanted-fields "Mail-From" "Mail-From\\|MIME-Version\\|Content-type" looking-at "From " mail-mbox-from rmail-ensure-blank-line find-buffer-visiting string-match "[.]gpg\\'" substring 0 raw-text-unix generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents write-region 1 nomsg rename-file make-backup-file-name call-process "gpg" "--use-agent" "--batch" "--no-tty" "--encrypt" "-r" delete-file error "Encryption failed; %s unchanged" message "Added to %s" "Can't output message to same file it's already in" boundp rmail-current-message "Can't output \"as seen\" to a visited Rmail file" rmail-output-to-rmail-buffer buffer-size insert-buffer-substring tembuf buf coding-system-for-read coding-system-for-write #1# user-mail-address msg inhibit-read-only as-seen] 11 (#$ . 7942)]) #@151 Copy message in TEMBUF into the current Rmail buffer. Do what is necessary to make Rmail know about the new message. then display message number MSG. (defalias 'rmail-output-to-rmail-buffer #[(tembuf msg) "\212\306 \210\307 \210\204 \203 \310\311!\210\312 \210~\210\313 \314U\204) db\210\315 \210dd}\210\316\n!\210\317\311!\210\320 \203` \321 \203Q \322 \212\323\216\324!\210\f\325 \210,\202\\ rq\210\f\325 \210*\326 \210)\327!)\207" [buffer-auto-save-file-name auto-save-default tembuf rmail-total-messages total window rmail-swap-buffers-maybe rmail-modify-format auto-save-mode t rmail-maybe-set-message-counters buffer-size 0 rmail-ensure-blank-line insert-buffer-substring rmail-count-new-messages rmail-summary-exists rmail-summary-displayed selected-window #[nil "\301!\207" [window select-window] 2] rmail-pop-to-buffer rmail-update-summary rmail-maybe-display-summary rmail-show-message-1 rmail-summary-buffer msg] 2 (#$ . 10169)]) #@1458 Append this message to mail file FILE-NAME. Writes mbox format, unless FILE-NAME exists and is Babyl format, in which case it writes Babyl. Interactively, the default file name comes from `rmail-default-file', which is updated to the name you use in this command. In all uses, if FILE-NAME is not absolute, it is expanded with the directory part of `rmail-default-file'. If a buffer is visiting FILE-NAME, adds the text to that buffer rather than saving the file directly. If the buffer is an Rmail buffer, updates it accordingly. This command always outputs the complete message header, even if the header display is currently pruned. If `rmail-output-reset-deleted-flag' is non-nil, the message's deleted flag is reset in the message appended to the destination file. Otherwise, the appended message will remain marked as deleted if it was deleted before invoking this command. Optional prefix argument COUNT (default 1) says to output that many consecutive messages, starting with the current one (ignoring deleted messages, unless `rmail-output-reset-deleted-flag' is non-nil). If `rmail-delete-after-output' is non-nil, deletes messages after output. The optional third argument NOATTRIBUTE, if non-nil, says not to set the `filed' attribute, and not to display a "Wrote file" message (if writing a file directly). Set the optional fourth argument NOT-RMAIL non-nil if you call this from a non-Rmail buffer. In this case, COUNT is ignored. (defalias 'rmail-output #[(file-name &optional count noattribute not-rmail) "\204 \306\307 \n\205 \310\n!\"\311 !\204* \312 !\204* \313\314 \315Q!\204* \316\317!\210\2030 \320\321 !\2059 \322 !p\311 !\2110\203Z \f\203Z r\fq\210\214~\210\212eb\210\323\324!0+1\203\220 \325\326!2r2q\210\327\216\330 !\2100\203\210 eb\210\323\331!\204\201 \332 c\210\333 \"\202\214 \334 \"+\202\2053\203\234 3q\210\202\240 \316\335!\2104\336U\203\253 \316\337!\210\340\211\2115678\336V\205\2049\203\322 \341:!\203\322 \342;\340\"\210\3435\344\216\345:!7\346:!6\212\347 \203\352 <q\210p\214~\210\325\326!=r=q\210\350\216\330 76#\2100\203\333 \"\210\202\334 \"\210.\204!\342>\343\"\210S9\203I?\2031\351 \210\336Y\205\\:@\352\306!\210:@T)=\202\\?\203S\353 \202\\\336V\205\\\354\306!8ZAB\336V\203\200B\204\200\316\355A\211\306U\203}\356\202~\357#\210*\202\267 ,+\207" [count file-name rmail-default-file noattribute buf cur 1 expand-file-name file-name-directory find-buffer-visiting file-exists-p yes-or-no-p "\"" "\" does not exist, create it? " error "Output file does not exist" nomsg file-readable-p mail-file-babyl-p looking-at "BABYL OPTIONS:" generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] insert-buffer-substring "From " mail-mbox-from rmail-output-as-babyl rmail-output-as-mbox "There is no Rmail buffer" 0 "No messages to output" nil rmail-message-deleted-p rmail-set-attribute t #[nil "\205 \302 \303\"\207" [delete-attr-reset-p rmail-deleted-attr-index rmail-set-attribute t] 3] rmail-msgbeg rmail-msgend rmail-buffers-swapped-p #[nil "\301!\205 \302!\207" [#2=#:temp-buffer buffer-name kill-buffer] 2] rmail-delete-message rmail-next-message rmail-delete-forward rmail-next-undeleted-message "Only %d message%s appended" "" "s" babyl-format not-rmail #1# rmail-buffer rmail-total-messages delete-attr-reset-p end beg orig-count rmail-output-reset-deleted-flag rmail-current-message rmail-deleted-attr-index rmail-view-buffer #2# rmail-filed-attr-index rmail-delete-after-output msgnum num-appended next-message-p] 6 (#$ . 11134) (list (rmail-output-read-file-name) (prefix-numeric-value current-prefix-arg))]) #@443 Append this message to mbox file named FILE-NAME. The details are as for `rmail-output', except that: i) the header is output as currently seen ii) this function cannot write to Babyl files iii) an Rmail buffer cannot be visiting FILE-NAME Note that if NOT-RMAIL is non-nil, there is no difference between this function and `rmail-output'. This argument may be removed in future, so you should call `rmail-output' directly in that case. (defalias 'rmail-output-as-seen #[(file-name &optional count noattribute not-rmail) "\203 \306 \n$\207\n\204 \307\310 \f\205 \311\f!\"\312 !\2045 \313 !\2045 \314\315 \316Q!\2045 \317\320!\210\321 !\203E \322 !\203E \317\323!\210\203K \324 \203U q\210\202Y \317\325!\210(\326U\203d \317\327!\210\np)*\n\326V\205\372 \330\211+,\331 \204\207 \332-!,\333-!+\214~\210,\204\225 e,d+\334\335!.r.q\210\336\216\337),+#\210\340 \341#\210.\204\274 \342/\341\"\210\nS0\203\311 \343 \202\322 \n\326V\205\322 \344\307!*\nZ12\n\326V\203\366 2\204\366 \317\3451\211\307U\203\363 \346\202\364 \347#\210*\202j *\207" [not-rmail file-name count noattribute rmail-default-file rmail-buffer rmail-output 1 expand-file-name file-name-directory find-buffer-visiting file-exists-p yes-or-no-p "\"" "\" does not exist, create it? " error "Output file does not exist" file-readable-p mail-file-babyl-p "Cannot output `as seen' to a Babyl file" nomsg "There is no Rmail buffer" 0 "No messages to output" nil rmail-buffers-swapped-p rmail-msgbeg rmail-msgend generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] insert-buffer-substring rmail-output-as-mbox t rmail-set-attribute rmail-delete-forward rmail-next-undeleted-message "Only %d message%s appended" "" "s" rmail-total-messages cur orig-count end beg rmail-current-message #1# rmail-filed-attr-index rmail-delete-after-output num-appended next-message-p] 5 (#$ . 14845) (list (rmail-output-read-file-name) (prefix-numeric-value current-prefix-arg))]) #@508 Write this message body to the file FILE-NAME. Interactively, the default file name comes from either the message "Subject" header, or from `rmail-default-body-file'. Updates the value of `rmail-default-body-file' accordingly. In all uses, if FILE-NAME is not absolute, it is expanded with the directory part of `rmail-default-body-file'. Note that this overwrites FILE-NAME (after confirmation), rather than appending to it. Deletes the message after writing if `rmail-delete-after-output' is non-nil. (defalias 'rmail-output-body-to-file #[(file-name) "\304 \205 \305 !\"\n\306U\203 \307\310!\210\212eb\210\311\312!\210\313!\2030 \314\315\316\"!\2040 \307\317!\210\320`d#\210)\205= \321 \207" [file-name rmail-default-body-file rmail-current-message rmail-delete-after-output expand-file-name file-name-directory 0 error "No message to output" search-forward "\n\n" file-exists-p y-or-n-p format "File %s exists; overwrite? " "Operation aborted" write-region rmail-delete-forward] 4 (#$ . 16869) (let ((default-file (or (mail-fetch-field "Subject") rmail-default-body-file))) (setq default-file (replace-regexp-in-string ":" "-" default-file)) (setq default-file (replace-regexp-in-string " " "-" default-file)) (list (setq rmail-default-body-file (read-file-name "Output message body to file: " (and default-file (file-name-directory default-file)) default-file nil default-file))))])