* [PATCH] Don't call org-footnote-unique label if using random labels
@ 2012-05-05 16:58 Matt Lundin
2012-05-06 8:10 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Matt Lundin @ 2012-05-05 16:58 UTC (permalink / raw)
To: Org Mode
* lisp/org-footnote.el (org-footnote-new): Don't call
org-footnote-unique-label if org-footnote-auto-label is set to
random.
Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes. This is unecessary if org-footnote-auto-label is set to
random.
---
| 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--git a/lisp/org-footnote.el b/lisp/org-footnote.el
index b0472f3..504f633 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -450,7 +450,8 @@ or new, let the user edit the definition of the footnote."
(error "Cannot insert a footnote here"))
(let* ((lbls (and (not (equal org-footnote-auto-label 'random))
(org-footnote-all-labels)))
- (propose (org-footnote-unique-label lbls))
+ (propose (and (not (equal org-footnote-auto-label 'random))
+ (org-footnote-unique-label lbls)))
(label
(org-footnote-normalize-label
(cond
--
1.7.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-06 8:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-05 16:58 [PATCH] Don't call org-footnote-unique label if using random labels Matt Lundin
2012-05-06 8:10 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).