org-footnote: remove every footnote tag when normalizing non Org buffers
* lisp/org-footnote.el (org-footnote-normalize): effectively remove any footnote tag in non Org buffers, as detailled in org-footnote-tag-for-non-org-mode-files doc-string.
This commit is contained in:
parent
baf7dde28e
commit
a8d621c3da
|
@ -709,13 +709,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
|
||||||
(unless (bolp) (newline))
|
(unless (bolp) (newline))
|
||||||
(setq ins-point (point))))
|
(setq ins-point (point))))
|
||||||
(t
|
(t
|
||||||
(when (and (not (equal org-footnote-tag-for-non-org-mode-files ""))
|
;; Remove any left-over tag in the buffer, if one is set up.
|
||||||
(re-search-forward
|
(when org-footnote-tag-for-non-org-mode-files
|
||||||
(concat "^" (regexp-quote
|
(let ((tag (concat "^" (regexp-quote
|
||||||
org-footnote-tag-for-non-org-mode-files)
|
org-footnote-tag-for-non-org-mode-files)
|
||||||
"[ \t]*$")
|
"[ \t]*$")))
|
||||||
nil t))
|
(while (re-search-forward tag nil t)
|
||||||
(replace-match ""))
|
(replace-match "")
|
||||||
|
(delete-region (point) (progn (forward-line) (point))))))
|
||||||
;; In Message mode, ensure footnotes are inserted before the
|
;; In Message mode, ensure footnotes are inserted before the
|
||||||
;; signature.
|
;; signature.
|
||||||
(let ((pt-max (if (and (derived-mode-p 'message-mode)
|
(let ((pt-max (if (and (derived-mode-p 'message-mode)
|
||||||
|
|
Loading…
Reference in New Issue