[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Re: Annoying positioning of point when writing footnotes
From: |
Matt Lundin |
Subject: |
[O] [PATCH] Re: Annoying positioning of point when writing footnotes |
Date: |
Thu, 13 Aug 2015 13:16:22 -0500 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Matt Lundin <address@hidden> writes:
> Gerald Wildgruber <address@hidden> writes:
>
>> Matt, thanks! looking forward to any elucidation you can give on the
>> problem at hand!
>
> Could you tell me what the value of org-footnote-auto-adjust is on your
> machine?
>
> It seems on my end that the problem only occurs when
> org-footnote-auto-adjust is set to t. The problem seems to be line 556
> of org-footnote.el, which reorders the footnotes *after* the position of
> the footnote definition has been saved. When I remove that line or set
> org-footnote-auto-adjust to nil, the cursor is positioned correctly.
This patch should fix the issue. Testing is welcome.
Matt
>From d52d6b331e92dddce5477c131858ded7e091599e Mon Sep 17 00:00:00 2001
From: Matt Lundin <address@hidden>
Date: Thu, 13 Aug 2015 13:14:34 -0500
Subject: [PATCH] Fix position of cursor when creating footnotes
* lisp/org-footnote.el (org-footnote-auto-label): Call
org-footnote-auto-adjust-maybe after going to the footnote definition.
Otherwise the correct position is lost.
---
lisp/org-footnote.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 7396609..1048219 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -553,12 +553,12 @@ or new, let the user edit the definition of the footnote."
(t
(insert "[" label "]")
(let ((l (copy-marker (org-footnote-create-definition label))))
- (org-footnote-auto-adjust-maybe)
(or (ignore-errors (org-footnote-goto-definition label l))
;; Since definition was created outside current
;; scope, edit it remotely.
(progn (set-marker l nil)
- (org-edit-footnote-reference))))))))
+ (org-edit-footnote-reference))))
+ (org-footnote-auto-adjust-maybe)))))
(defvar org-blank-before-new-entry) ; Silence byte-compiler.
(defun org-footnote-create-definition (label)
--
2.5.0
- [O] Annoying positioning of point when writing footnotes, Gerald Wildgruber, 2015/08/13
- [O] [BUG] Re: Annoying positioning of point when writing footnotes, Matt Lundin, 2015/08/13
- Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes, Gerald Wildgruber, 2015/08/13
- Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes, Kaushal, 2015/08/13
- Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes, Matt Lundin, 2015/08/13
- [O] [PATCH] Re: Annoying positioning of point when writing footnotes,
Matt Lundin <=
- Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes, Kaushal, 2015/08/13
- Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes, Nicolas Goaziou, 2015/08/13
- Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes, Gerald Wildgruber, 2015/08/14
- Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes, Nicolas Goaziou, 2015/08/14
- Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes, Gerald Wildgruber, 2015/08/15
- Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes, Gerald Wildgruber, 2015/08/14