Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2015-03-18 Thread Jacob Gerlach
On Tue, Mar 17, 2015 at 6:38 PM, Nicolas Goaziou wrote: (re unresolved ID links) >See e0b19dedb99d3c01199a159a2da8f9aa4adb2f6f >> Updated fuzzy link patch attached. > Applied (with minor tweaks). Thank you. Thanks for the changes. I had some issues using the error messages to track down bad lin

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2015-03-17 Thread Nicolas Goaziou
Jacob Gerlach writes: > I tried this, or more specifically: > (or ((org-element-map > ... > info 'first-match)) > (user-error ... > and got a failure on test-org-export/resolve-coderef. It's not > obvious to me from reading the tests if there is a test that needs to > be changed, or if it'

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2015-03-17 Thread Jacob Gerlach
Hello, Thanks for the feedback. On Sun, Mar 15, 2015 at 4:44 AM, Nicolas Goaziou wrote: >> I don't really use code blocks, so I wasn't sure what to do with >> org-export-resolve-coderef. [...] > No, the whole body could be wrapped with an `or': > > (or (org-element-map ...) > (user-error

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2015-03-17 Thread Nicolas Goaziou
Jacob Gerlach writes: > Patch attached for fuzzy links. Thank you. > I don't really use code blocks, so I wasn't sure what to do with > org-export-resolve-coderef. Should the final > > (when (re-search... > (cond ... > > become > > (or (re-search... >(cond ... > (error No, the whole bod

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2015-03-11 Thread Jacob Gerlach
On Sun, Sep 28, 2014 at 3:03 AM, Nicolas Goaziou wrote: > Aaron Ecay writes: >> The links issue (re-)raised by Jacob in >> >> is a bit harder to deal with, since each backend currently does >> something a li

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-10-12 Thread Nicolas Goaziou
Hello, Aaron Ecay writes: > Pushed. Thanks. -- Nicolas Goaziou0x80A93738

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-10-12 Thread Aaron Ecay
2014ko irailak 28an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Aaron Ecay writes: > >> This turned out to be very easy to change; attached is a patch. > > Thank you. Please apply it. Pushed. -- Aaron Ecay

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-10-12 Thread Aaron Ecay
Hi Nicolas, 2014ko irailak 28an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Aaron Ecay writes: > >> Attached is a revised patch. WDYT? > > Looks good. Some small comments follow. > >> +(if value >> +(progn >> + (push signature record) >> +

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-28 Thread Nicolas Goaziou
Hello, Aaron Ecay writes: > This turned out to be very easy to change; attached is a patch. Thank you. Please apply it. > The links issue (re-)raised by Jacob in > > is a bit harder to deal with, since ea

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-27 Thread Nicolas Goaziou
Hello, Aaron Ecay writes: > Attached is a revised patch. WDYT? Looks good. Some small comments follow. > + (if value > + (progn > + (push signature record) > + (delete-region > +begin > +;;

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-27 Thread Aaron Ecay
Hi Rasmus, 2014ko irailak 23an, Rasmus-ek idatzi zuen: > > Hi, > > Aaron Ecay 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 an

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-27 Thread Aaron Ecay
Hi Nicolas, Thanks for the feedback. 2014ko irailak 23an, Nicolas Goaziou-ek idatzi zuen: > > Hello, > > Aaron Ecay writes: > >> Um...but the patch I sent works precisely by defining a macro translator, >> which does get called for any unexpanded (because undefined) macros. > > Macros are no

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Nicolas Goaziou
Hello, Jacob Gerlach writes: > While I expect that there's no code overlap with macro expansion, I asked > about similar "stop on unresolved content" behavior with respect to links > here: http://article.gmane.org/gmane.emacs.orgmode/90010/ > > That discussion died off so I thought I'd bring up

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Rasmus
Hi, Aaron Ecay 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 fra

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Nicolas Goaziou
Hello, Aaron Ecay writes: > Um...but the patch I sent works precisely by defining a macro translator, > which does get called for any unexpanded (because undefined) macros. Macros are not expected to be seen by export back-ends. It happens when a macro is undefined, but this is not a reliable f

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Jacob Gerlach
While I expect that there's no code overlap with macro expansion, I asked about similar "stop on unresolved content" behavior with respect to links here: http://article.gmane.org/gmane.emacs.orgmode/90010/ That discussion died off so I thought I'd bring up the topic again here. Would it be possib

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Aaron Ecay
Hi Grant, 2014ko irailak 23an, Grant Rettke-ek idatzi zuen: > > Aaron may I trouble you to add a flag so that if such errors occur > then the export fails? > > From my perspective, if the document doesn't "compile", then nothing > should succeed. > > Compile includes export from my perspective.

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Grant Rettke
Aaron may I trouble you to add a flag so that if such errors occur then the export fails? >From my perspective, if the document doesn't "compile", then nothing should succeed. Compile includes export from my perspective. On Mon, Sep 22, 2014 at 10:25 PM, Aaron Ecay wrote: > Hi Nicolas, > > 2014

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-22 Thread Aaron Ecay
Hi Nicolas, 2014ko irailak 19an, Nicolas Goaziou-ek idatzi zuen: > > Certainly not a message, due to asynchronous export. Very good point. > >> 2. Since this is a feature that many backends will want to use, should >> we introduce a new “abstract” backend from which other backends can >> inher

Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-19 Thread Nicolas Goaziou
Hello, Aaron Ecay writes: > Currently, if a macro is not defined, it will silently produce an empty > string while exporting. This situation could arise for example if a > macro name is acidentally mistyped. I think it’s desirable to warn the > user in this case. The attached patch introduces

[O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-19 Thread Aaron Ecay
Hello all, Currently, if a macro is not defined, it will silently produce an empty string while exporting. This situation could arise for example if a macro name is acidentally mistyped. I think it’s desirable to warn the user in this case. The attached patch introduces a function to do so, and