]> git.eshelyaron.com Git - emacs.git/commitdiff
Make gnus-output-to-rmail appending work better
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 18:28:57 +0000 (19:28 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 18:29:02 +0000 (19:29 +0100)
* lisp/gnus/gnus-util.el (gnus-output-to-rmail): Ensure we have a
blank line before the next line when using mbox format (bug#39580).

lisp/gnus/gnus-util.el

index 807bd6a14af1476e8fe5807d95f15863fba9e46e..ef811c65b86afc260fee6a4ee49c5fd931437a3b 100644 (file)
@@ -1013,6 +1013,12 @@ FILENAME exists and is Babyl format."
                 (rmail-swap-buffers-maybe)
                 (rmail-maybe-set-message-counters))
               (widen)
+              (unless babyl
+               (goto-char (point-max))
+               ;; Ensure we have a blank line before the next message.
+               (unless (bolp)
+                 (insert "\n"))
+               (insert "\n"))
               (narrow-to-region (point-max) (point-max)))
            (insert-buffer-substring tmpbuf)
            (when msg