(nnml-save-mail): Grok compressed articles. From
authorKai Grossjohann <kgrossjo@eu.uu.net>
Fri, 2 Jan 2004 17:50:29 +0000 (17:50 +0000)
committerKai Grossjohann <kgrossjo@eu.uu.net>
Fri, 2 Jan 2004 17:50:29 +0000 (17:50 +0000)
Michael Albinus <Michael.Albinus@alcatel.de>.

lisp/ChangeLog
lisp/nnml.el

index e8b9e85..7a2f121 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-02  Kai Grossjohann  <kai@emptydomain.de>
+
+       * nnml.el (nnml-save-mail): Grok compressed articles.  From
+       Michael Albinus <Michael.Albinus@alcatel.de>.
+
 2004-01-02  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-ham-copy-or-move-routine): use spam-list-articles
index 0767962..0307faf 100644 (file)
@@ -621,8 +621,12 @@ marks file will be regenerated properly by Gnus.")
 
 (defun nnml-save-mail (group-art)
   "Called narrowed to an article."
-  (let (chars headers)
+  (let (chars headers extension)
     (setq chars (nnmail-insert-lines))
+    (setq extension
+         (and nnml-use-compressed-files
+              (> chars 1000)
+              ".gz"))
     (nnmail-insert-xref group-art)
     (run-hooks 'nnmail-prepare-save-mail-hook)
     (run-hooks 'nnml-prepare-save-mail-hook)
@@ -637,7 +641,8 @@ marks file will be regenerated properly by Gnus.")
        (nnml-possibly-create-directory (caar ga))
        (let ((file (concat (nnmail-group-pathname
                             (caar ga) nnml-directory)
-                           (int-to-string (cdar ga)))))
+                           (int-to-string (cdar ga))
+                           extension)))
          (if first
              ;; It was already saved, so we just make a hard link.
              (funcall nnmail-crosspost-link-function first file t)