Matt Lundin <m...@imapmail.org> writes:

> I traced the problem to an extra forward-line added to
> org-footnote-goto-local-insertion-point with commit
> 145109dc4a6f161e4ad826bea9cc970363649280.
>
> The following patch fixes the sorting problem in org buffers. AFAICT, it
> has no effect on footnote insertion in message mode buffers with
> signatures. (Unfortunately, footnote sorting in message buffers with
> signatures is broken both before and after this patch.)
>
> diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
> index b6a9bca..d28161e 100644
> --- a/lisp/org-footnote.el
> +++ b/lisp/org-footnote.el
> @@ -511,8 +511,7 @@ ENTRY is (fn-label num-mark definition)."
>      (beginning-of-line 0))
>    (if (looking-at "[ \t]*#\\+TBLFM:") (beginning-of-line 2))
>    (end-of-line 1)
> -  (skip-chars-backward "\n\r\t ")
> -  (forward-line))
> +  (skip-chars-backward "\n\r\t "))
>  
>  (defun org-footnote-delete (&optional label)
>    "Delete the footnote at point.

My apologies. Please disregard this patch. It does not fix the issue and
cause problems when creating footnotes.

I'll take a closer look at the code when I get a chance.

- Matt

Reply via email to