瀏覽代碼

Footnotes: Fix bug with sorting inline footnotes.

Carsten Dominik 16 年之前
父節點
當前提交
961a3e6298
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 3 0
      lisp/ChangeLog
  2. 3 2
      lisp/org-footnote.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-03-30  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-footnote.el (org-footnote-normalize): When only dorting, do
+	not insert inline notes at the end.
+
 	* org-docbook.el (org-id-find-id-file): Add function declaration.
 
 	* org.el (org-require-autoloaded-modules): Add org-docbook.el.

+ 3 - 2
lisp/org-footnote.el

@@ -362,7 +362,7 @@ referenced sequence."
 	   (and idef
 		org-footnote-fill-after-inline-note-extraction
 		(fill-paragraph)))
-	 (if (not a) (push (list ref marker def) ref-table))))
+	 (if (not a) (push (list ref marker def (if idef t nil)) ref-table))))
       
       ;; First find and remove the footnote section
       (goto-char (point-min))
@@ -402,11 +402,12 @@ referenced sequence."
       (goto-char (or ins-point (point-max)))
       (setq ref-table (reverse ref-table))
       (when sort-only
-	;; remove anonymous fotnotes from the list
+	;; remove anonymous and inline footnotes from the list
 	(setq ref-table
 	      (delq nil (mapcar
 			 (lambda (x) (and (car x)
 					  (not (equal (car x) "fn:"))
+					  (not (nth 3 x))
 					  x))
 			 ref-table))))
       ;; Make sure each footnote has a description, or an error message.