* lisp/org-footnote.el (org-footnote-create-definition): Remove
`interactive' status. Allow to insert definitions outside of
narrowed part of buffer. Preserve position. Return beginning
position of created definition.
(org-footnote-new):
(org-footnote-action): Apply changes above.
* lisp/org-footnote.el (org-footnote--goto-local-insertion-point):
Renamed from `org-footnote-goto-local-insertion-point'.
(org-footnote-normalize): Use function above. Small refactoring.
* testing/lisp/test-org-footnote.el (test-org-footnote/normalize-in-org):
Small refactoring.
* lisp/org-footnote.el (org-footnote-goto-definition): Add an optional
argument in order to avoid duplicating calls to
`org-footnote-get-definition'. Return non-nil when move was
successful.
* lisp/org-footnote.el (org-footnote-get-definition): Footnotes
definitions are global, so ignore narrowing right from the start.
Also skip false positives.
* lisp/org-footnote.el (org-footnote-goto-definition): Throw an error
when definition is outside narrowed part of buffer. Do not move
point either.
* testing/lisp/test-org-footnote.el (test-org-footnote/goto-definition):
New test.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/97158>
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow new
footnotes in headlines.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.
Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96843>
* lisp/org-footnote.el (org-footnote--allow-reference-p): New
function.
(org-footnote-new): Use new function.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test.
In particular, Org now refuses to add a footnote reference in
a keyword, e.g., TITLE.
* org-footnote.el (org-footnote-new): When point is at a
position where no footnote can be inserted, offer the menu
from `org-footnote-action' instead.
(org-footnote-inline-footnotes): New command.
(org-footnote-action): Make the new command accessible through
the menu.
Thanks to Leonard Randall for the suggestion.
* org.el (org-fontify-entities): Use `org-at-comment-p'.
(org-in-commented-line): Delete.
(org-in-indented-comment-line): Delete.
(org-at-comment-p): Also match indented comments and save
match data.
* org-footnote.el (org-footnote-in-valid-context-p): Use
`org-at-comment-p'.
* lisp/org-element.el (org-element-footnote-definition-parser):
Require 2 blank lines to separate footnote definition.
* lisp/org-footnote.el (org-footnote-at-definition-p): Require 2 blank
lines to separate footnote definition.
* doc/org.texi: Update documentation for footnotes.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org-footnote.el: Add tests.
Footnote definitions can still be separated with other footnote
definitions and headlines. This change allows to have multiple
paragraphs in a footnote definition without resorting to the "\par"
trick.
* org.el (org-emphasis-alist, org-protecting-blocks):
* org-src.el (org-edit-src-find-region-and-lang):
* org-list.el (org-list-forbidden-blocks):
* org-footnote.el (org-footnote-forbidden-blocks): Remove
references to the deleted DocBook exporter.
* org.texi (Top, Markup, Initial text, Images and tables)
(@LaTeX{} fragments, @LaTeX{} fragments, Exporting)
(Export options, JavaScript support, Beamer class export):
Remove references to the DocBook export, which has been
deleted.
(History and Acknowledgments): Mention that DocBook has been
deleted, suggest to use the Texinfo exporter instead, then to
convert the .texi to DocBook with makeinfo.
(Links in ODT export, Tables in ODT export): Fix indices.
* lisp/org-macs.el (org-if-unprotected, org-if-unprotected-1,
org-if-unprotected-at): Removed macros.
(org-re-search-forward-unprotected): Removed function.
* lisp/org.el (org-format-latex): Remove reference to `org-protected'.
* lisp/org-list.el (org-list-struct): Remove reference to
`org-example' and `org-protected'.
* lisp/org-footnote.el (org-footnote-at-reference-p): Remove reference
to `org-protected'.
* lisp/org-capture.el (org-capture-fill-template): Remove reference to
`org-protected'.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
Remove reference to `org-protected' value.
These text properties were used by the old export framework. They are
not needed anymore.
* lisp/org-clock.el (org-clocktable-defaults,
org-clocktable-write-default): Avoid requiring the whole export
framework just to check one variable.
* lisp/org-footnote.el (org-footnote-section): Update
docstring.
(org-footnote-normalize): Remove all export related part from the
function.
* lisp/org-inlinetask.el (org-inlinetask-export,
org-inlinetask-export-templates): Removed variables.
(org-inlinetask-export-handler): Removed function.
* lisp/org-plot.el: Remove dependency on `org-exp' library.
* lisp/org.el (org-additional-option-like-keywords): Remove variable.
(org-get-export-keywords): New function.
(org-options-keywords): Update default list of keywords.
(org-remove-flyspell-overlays-in): Apply changes to keywords
compilation.
(org-highlight-latex-fragments-and-specials)
org-latex-and-specials-regexp,
org-export-html-special-string-regexps): Remove variables.
(org-compute-latex-and-specials-regexp,
org-do-latex-and-special-faces, org-remove-file-link-modifiers):
Remove functions.
(org-set-regexps-and-options, org-set-font-lock-defaults): Apply all
removals.
(org-use-sub-superscripts): Fix docstring. Remove unused group.
(org-match-sexp-depth): Make it a defconst instead of a defcustom in
order to remove `org-export-translation' group completely.
The new export framework shouldn't be as much interleaved with Org
core as with the previous one. For example, export options, which are
back-end dependent, shouldn't interfere with the display of the
buffer.
* org-footnote.el (org-footnote-create-definition): Prevent
`electric-indent-mode' from inserting the definition at the
wrong place.
Thanks to Xue Fuqiao for reporting this bug.
* lisp/org-footnote.el (org-footnote-new): Don't call
org-footnote-unique-label if org-footnote-auto-label is set to
random.
Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes. This is unecessary if org-footnote-auto-label is set to
random.
* lisp/org-footnote.el (org-footnote-delete-definitions): Remove blank
lines before the footnote definition instead of removing those after
it.
* testing/lisp/test-org-footnote.el: Adapt tests.