[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog mail/rmailout.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog mail/rmailout.el |
Date: |
Sun, 15 Feb 2009 03:26:21 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/02/15 03:26:20
Modified files:
lisp : ChangeLog
lisp/mail : rmailout.el
Log message:
(rmail-output-as-mbox): Start search from point-min. If constructing a
"From " line, prefer the date header over the current time.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15334&r2=1.15335
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmailout.el?cvsroot=emacs&r1=1.89&r2=1.90
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15334
retrieving revision 1.15335
diff -u -b -r1.15334 -r1.15335
--- ChangeLog 15 Feb 2009 02:52:14 -0000 1.15334
+++ ChangeLog 15 Feb 2009 03:26:17 -0000 1.15335
@@ -6,6 +6,8 @@
(rmail-output-as-babyl, rmail-output-to-babyl-buffer): Remove
unnecessary use of with-no-warnings.
(rmail-output-as-mbox, rmail-output-as-seen): Doc fix.
+ (rmail-output-as-mbox): Start search from point-min. If constructing a
+ "From " line, prefer the date header over the current time.
2009-02-15 Richard M Stallman <address@hidden>
Index: mail/rmailout.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmailout.el,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- mail/rmailout.el 15 Feb 2009 02:51:21 -0000 1.89
+++ mail/rmailout.el 15 Feb 2009 03:26:20 -0000 1.90
@@ -307,45 +307,37 @@
If FILE-NAME is visited, output into its buffer instead.
AS-SEEN is non-nil if we are copying the message \"as seen\"."
(let ((case-fold-search t)
- mail-from mime-version content-type)
-
+ from date)
+ (goto-char (point-min))
;; Preserve the Mail-From and MIME-Version fields
;; even if they have been pruned.
(search-forward "\n\n" nil 'move)
(narrow-to-region (point-min) (point))
-
(rmail-delete-unwanted-fields
(if rmail-enable-mime "Mail-From"
"Mail-From\\|MIME-Version\\|Content-type"))
-
+ ;; Generate a From line from other header fields if necessary.
+ ;; FIXME this duplicates code from unrmail.el.
+ (goto-char (point-min))
+ (unless (looking-at "From ")
+ (setq from (or (mail-fetch-field "from")
+ (mail-fetch-field "really-from")
+ (mail-fetch-field "sender")
+ "unknown")
+ date (mail-fetch-field "date")
+ date (or (and date
+ (ignore-errors
+ (current-time-string (date-to-time date))))
+ (current-time-string)))
+ (insert "From " (mail-strip-quoted-names from) " " date "\n"))
(widen)
-
;; Make sure message ends with blank line.
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
(unless (looking-back "\n\n")
(insert "\n"))
-
- ;; Generate a From line from other header fields
- ;; if necessary.
- (goto-char (point-min))
- (unless (looking-at "From ")
- (insert "From "
- (mail-strip-quoted-names
- (save-excursion
- (save-restriction
(goto-char (point-min))
- (narrow-to-region
- (point)
- (or (search-forward "\n\n" nil)
- (point-max)))
- (or (mail-fetch-field "from")
- (mail-fetch-field "really-from")
- (mail-fetch-field "sender")
- "unknown"))))
- " " (current-time-string) "\n"))
-
(let ((buf (find-buffer-visiting file-name))
(tembuf (current-buffer)))
(if (null buf)
- [Emacs-diffs] emacs/lisp ChangeLog mail/rmailout.el,
Glenn Morris <=