Hi Rasmus, 2014ko irailak 23an, Rasmus-ek idatzi zuen: > > Hi, > > Aaron Ecay <aarone...@gmail.com> writes: > >>> You have two options. Either report an error, as you suggested, or >>> insert an obnoxious message in the output, e.g., "UNKNOWN MACRO", à la >>> "DEFINITION NOT FOUND." for footnote definitions. In any case, this >>> should happen in "org-macro.el", not in the export framework. > > This is pretty annoying for footnotes.
This turned out to be very easy to change; attached is a patch. The links issue (re-)raised by Jacob in <http://mid.gmane.org/caa6uvufm-1nwd06a5o3hwsveqmgqljncfk_ptohsehcvdjt...@mail.gmail.com> is a bit harder to deal with, since each backend currently does something a little different. It would be possible to make every backend’s org-X-link function error out at the end, but I’m not sure if that’s the right thing to do or not.
>From 123d5fcd4f4594c04210ab873395e7def8790450 Mon Sep 17 00:00:00 2001 From: Aaron Ecay <aarone...@gmail.com> Date: Sat, 27 Sep 2014 23:57:01 -0400 Subject: [PATCH 2/2] [export] Raise an error if footnote definition is not found. * lisp/ox.el (org-export-get-footnote-definition): Raise an error if footnote definition is not found. --- lisp/ox.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 216a375..2516a22 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -3711,12 +3711,12 @@ INFO is the plist used as a communication channel." (defun org-export-get-footnote-definition (footnote-reference info) "Return definition of FOOTNOTE-REFERENCE as parsed data. INFO is the plist used as a communication channel. If no such -definition can be found, return \"DEFINITION NOT FOUND\"." +definition can be found, raise an error." (let ((label (org-element-property :label footnote-reference))) (or (if label (cdr (assoc label (plist-get info :footnote-definition-alist))) (org-element-contents footnote-reference)) - "DEFINITION NOT FOUND."))) + (error "Definition not found for footnote %s" label)))) (defun org-export-get-footnote-number (footnote info) "Return number associated to a footnote. -- 2.1.1
-- Aaron Ecay