summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-03 13:41:08 +0100
committerBastien Guerry <bzg@altern.org>2013-03-03 13:41:08 +0100
commitf6883b8e264855bc521581898a0ee5c223b48eb8 (patch)
treee92b179ab8093534427b92a9af0ddf0dfb3b52b6
parent3b21f246d6f00671e28b82bf963f259febd41573 (diff)
downloadorg-mode-f6883b8e264855bc521581898a0ee5c223b48eb8.tar.gz
org-mobile.el (org-mobile-edit): Fix bug about inserting headings in invisible region
* org-mobile.el (org-mobile-edit): Workaround a `org-insert-heading-respect-content' bug which prevents correct insertion when point is invisible Thanks to James Harkins for providing this fix.
-rw-r--r--lisp/org-mobile.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 293d2a0..2d976dd 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -1063,6 +1063,9 @@ be returned that indicates what went wrong."
((eq what 'addheading)
(if (org-on-heading-p) ; if false we are in top-level of file
(progn
+ ;; Workaround a `org-insert-heading-respect-content' bug
+ ;; which prevents correct insertion when point is invisible
+ (org-show-subtree)
(end-of-line 1)
(org-insert-heading-respect-content t)
(org-demote))