summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-09-28 19:38:09 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2009-09-28 19:38:09 +0100
commit452b8e0554871075c782aca9ccbd14a5691df13a (patch)
treebbde8b4ef7a833dc4d337cecdfb2dae557282364
parentd90df8b1471df902995170ead19104661eabfb6e (diff)
downloadorg-mode-452b8e0554871075c782aca9ccbd14a5691df13a.tar.gz
Reveal context to add footnote definition
Matt Lundin writes: > I have org-footnote-section set to "Footnotes." If I insert a new > footnote while... > > 1. the "* Footnotes" tree already exists and > > 2. the "* Footnotes" tree is folded > > ...the footnote definition label is inserted, but the "* Footnotes" > subtree remains folded and the cursor jumps to the "* Footnotes" > headline rather than the definition line. > > I've tried using org-reveal (C-c C-r) to open the "Footnotes" section, > but nothing happens. I've tried typing C-c C-c to go back to the > footnote, but since the cursor is on a headline, the result is a tag > prompt. When I hit TAB to cycle, the cursor remains on the headline.
-rwxr-xr-xlisp/ChangeLog3
-rw-r--r--lisp/org-footnote.el3
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index daa78c7..dc5a944 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2009-09-28 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-footnote.el (org-footnote-create-definition): Reveal context
+ to add a new footnote definition.
+
* org-mobile.el (org-mobile-files-alist): Add the list of tags to
the index file.
(org-mobile-files): New option.
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 6abcbac..c0be5a4 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -290,7 +290,8 @@ or new, let the user edit the definition of the footnote."
(goto-char (point-max))
(insert "\n\n* " org-footnote-section "\n")))
;; Now go to the end of this entry and insert there.
- (org-footnote-goto-local-insertion-point))
+ (org-footnote-goto-local-insertion-point)
+ (org-show-context 'link-search))
(t
(setq re (concat "^" org-footnote-tag-for-non-org-mode-files "[ \t]*$"))
(unless (re-search-forward re nil t)