Browse Source

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.
Carsten Dominik 10 years ago
parent
commit
452b8e0554
2 changed files with 5 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-footnote.el

+ 3 - 0
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.

+ 2 - 1
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)