Jelajahi Sumber

Fix refiling to the last entry in the buffer.

Carsten Dominik 16 tahun lalu
induk
melakukan
6697584704
2 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 5 0
      lisp/ChangeLog
  2. 2 1
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-09-20  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-refile): Allow refiling to the last entry in the
+	buffer.
+
 2008-09-19  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.el (org-indent-line-function): No longer check for src

+ 2 - 1
lisp/org.el

@@ -7951,10 +7951,11 @@ operation has put the subtree."
 		(setq level (org-get-valid-level (funcall outline-level) 1))
 		(goto-char
 		 (if reversed
-		     (outline-next-heading)
+		     (or (outline-next-heading) (point-max))
 		   (or (save-excursion (outline-get-next-sibling))
 		       (org-end-of-subtree t t)
 		       (point-max))))
+		(if (not (bolp)) (newline))
 		(bookmark-set "org-refile-last-stored")
 		(org-paste-subtree level))))
 	  (org-cut-subtree)