emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.g


From: Jason Dunsmore
Subject: Re: [O] Bug: Refile sometimes loses the last line [7.7 (release_7.7.15.gc363)]
Date: Wed, 03 Aug 2011 10:05:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Bernt,

Can you see if this patch fixes the problem?

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org.el b/lisp/org.el
index c7b28dd..41ac8c6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19212,7 +19212,9 @@ Returns the number of empty lines passed."
   (let ((pos (point)))
     (if (cdr (assoc 'heading org-blank-before-new-entry))
        (skip-chars-backward " \t\n\r")
-      (forward-line -1))
+      (unless (eq (line-number-at-pos)
+                 (count-lines (point-min) (point-max)))
+       (forward-line -1)))
     (beginning-of-line 2)
     (goto-char (min (point) pos))
     (count-lines (point) pos)))
--8<---------------cut here---------------end--------------->8---

Thanks,
Jason



reply via email to

[Prev in Thread] Current Thread [Next in Thread]