From 488fa39b27532ded033e650b2631b684f28aa0d3 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 23 Feb 2009 17:49:51 -0800 Subject: [PATCH] ensure inserted results end in a newline --- litorgy/litorgy.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litorgy/litorgy.el b/litorgy/litorgy.el index 61a7fb7ac..baa9658b5 100644 --- a/litorgy/litorgy.el +++ b/litorgy/litorgy.el @@ -149,6 +149,11 @@ form. (language body header-arguments-alist)" current source block. With optional argument REPLACE replace any existing results currently located after the source block." (if replace (litorgy-remove-result)) + (unless (or (string-equal (substring result -1) + "\n") + (string-equal (substring result -1) + "\r")) + (setq result (concat result "\n"))) (save-excursion (re-search-forward "^#\\+end_src" nil t) (open-line 1) (forward-char 2) (let ((beg (point))