Explorar el Código

org-mobile.el (org-mobile-edit): Insert new headings at the end of the parent subtree

* org-mobile.el (org-mobile-edit): Insert new headings at the
end of the parent subtree.  Use `org-at-heading-p' instead of
the obsolete `org-on-heading-p'.

Thanks to James Harkins for reporting this.
Bastien Guerry hace 12 años
padre
commit
5d1025f5ec
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      lisp/org-mobile.el

+ 3 - 3
lisp/org-mobile.el

@@ -1066,13 +1066,13 @@ be returned that indicates what went wrong."
 	 (t (error "Heading changed in MobileOrg and on the computer")))))
 	 (t (error "Heading changed in MobileOrg and on the computer")))))
 
 
      ((eq what 'addheading)
      ((eq what 'addheading)
-      (if (org-on-heading-p) ; if false we are in top-level of file
+      (if (org-at-heading-p) ; if false we are in top-level of file
 	  (progn
 	  (progn
 	    ;; Workaround a `org-insert-heading-respect-content' bug
 	    ;; Workaround a `org-insert-heading-respect-content' bug
 	    ;; which prevents correct insertion when point is invisible
 	    ;; which prevents correct insertion when point is invisible
 	    (org-show-subtree)
 	    (org-show-subtree)
 	    (end-of-line 1)
 	    (end-of-line 1)
-	    (org-insert-heading-respect-content '(4) t)
+	    (org-insert-heading-respect-content '(16) t)
 	    (org-demote))
 	    (org-demote))
 	(beginning-of-line)
 	(beginning-of-line)
 	(insert "* "))
 	(insert "* "))
@@ -1081,7 +1081,7 @@ be returned that indicates what went wrong."
      ((eq what 'refile)
      ((eq what 'refile)
       (org-copy-subtree)
       (org-copy-subtree)
       (org-with-point-at (org-mobile-locate-entry new)
       (org-with-point-at (org-mobile-locate-entry new)
-	(if (org-on-heading-p) ; if false we are in top-level of file
+	(if (org-at-heading-p) ; if false we are in top-level of file
 	    (progn
 	    (progn
 	      (setq level (org-get-valid-level (funcall outline-level) 1))
 	      (setq level (org-get-valid-level (funcall outline-level) 1))
 	      (org-end-of-subtree t t)
 	      (org-end-of-subtree t t)