This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
* lisp/org-footnote.el (org-footnote-normalize): Remove an useless
part of the function.
(org-insert-footnote-reference-near-definition): Remove function.
* lisp/org-footnote.el (org-footnote-normalize): Fix normalization of
inline footnotes with no footnote section.
* testing/lisp/test-org-footnote.el: New test file.
Thanks to Samuel Wales for reporting this.
* lisp/org-footnote.el (org-footnote-normalize): Force a paragraph
break after the last footnote definition. This is an an
implicit assumption made by the org-lparse.el library. With
this change, footnote definitions can reliably be exported
with ODT backend. See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01013.html.
* lisp/org-footnote.el (org-blank-before-new-entry,
org-export-footnotes-seen, org-export-footnotes-data): Fix bogus
declarations.
This fixes bug #10745. Thanks to Steve Revilak for the report and to
Glenn Morris for the solution.
* lisp/org-footnote.el (org-footnote-create-definition): Fix space
insertion when creating a new footnote. This fixes newline munching
when `org-footnote-section' is nil and blank lines stacking when it
isn't nil.
Thanks to Eric Abrahamsen for reporting this.
* lisp/org-footnote.el (org-footnote-normalize): Ensure footnote
definition will be inserted at the end of the section corresponding
to to its first reference.
* lisp/org-footnote.el (org-footnote-at-definition-p): Make sure to
move point at the beginning of the separator before skiping white
spaces. Refactor code.
* lisp/org-footnote.el (org-footnote-new): Cannot insert an inline
footnote at beginning of line anymore.
(org-footnote-at-reference-p): Don't recognize inline footnotes at
beginning of line.
It is technically possible to allow inline footnotes at beginning of
line, their syntax being different enough from standard references.
Though, after normalizing them, they will become standard footnotes
still at beginning of line, which will break them.
Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode
Hi all,
org-footnote-renumber-fn:N invalidates footnotes that appear as the
first thing on a line. Here's a test file including the recipe.
--8<---------------cut here---------------start------------->8---
* Bla
This is a line in which the following footnote that is inserted exactly
[fn:1] is the first thing in that line. And now invoke
org-footnote-renumber-fn:N and see it breaking.
* Footnotes
[fn:1] Test
--8<---------------cut here---------------end--------------->8---
Note, that in larger org files, it's likely that you don't even notice
that the footnotes break.
Once I added a patch on patchwork that fixed this issue, and that's
shown as "accepted".
http://patchwork.newartisans.com/patch/705/
I think, I've marked it as deferred or so myself because I've thought
the issue was fixed in the meantime, but that doesn't seem to be true.
Here's an updated patch.
* lisp/org-footnote.el (org-footnote-goto-definition): This patch
makes sure the function says when a definition has been found.
Thus, moving from the reference to the definition doesn't offer to
create the latter again.
* lisp/org-footnote.el (org-footnote-create-definition): When the tag
is missing, it is created before any existing footnote, or at end of
buffer. In the latter case, the marker pointing at the position
where the new footnote is going to be inserted (at end of buffer)
stays before the tag. This patch makes sure that the marker will be
kept after the tag.
* lisp/org-footnote.el (org-footnote-normalize): be sure to separate
the last footnote definition from the rest of the buffer.
Thanks to Jambunathan K for reporting this.
* lisp/org-footnote.el (org-footnote-get-definition): the function has
to widen buffer if definition has not been found in the current
narrowed part. Be sure to restore that restriction once the
definition is found.