emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Syntax error warnings? (Especially important with :noweb-ref's)


From: Yu
Subject: [O] Syntax error warnings? (Especially important with :noweb-ref's)
Date: Thu, 12 Jan 2012 22:38:16 +0100

Hello!

I was wondering, if there is a way to get warnings for typos (e.g.
when specifying invalid properties or header arguments). It can just
easily happen that I mix up e.g. ":exports" and ":export" (though
that's probably a very harmless example).

More important it gets though, when trying to use the literate
programming facilities.

Say I have a source code

#+begin_src sh :noweb tangle :tangle foo.sh
  <<foo>>
#+end_src
#+begin_src sh :noweb-ref fo
  echo '... how are you?';
#+end_src

then tangling would run through without any indication of the typo in
the name of the "foo" block. Such errors might be hard to debug,
because there is no indication of the error, maybe nothing other than
runtime errors.

An error message for the /use/ of undefined references only wouldn't
avoid such problems either, e.g. consider

#+begin_src sh :noweb tangle :tangle foo.sh
  <<foo>>
#+end_src
#+begin_src sh :noweb-ref foo
  echo 'Hello World...';
#+end_src
#+begin_src sh :noweb-ref fo
  echo 'Hello World...';
#+end_src

where the only detectable error is, that "fo" was never used anywhere.

A similiar question (though without the second part) was asked here:
http://lists.gnu.org/archive/html/emacs-orgmode/2009-11/msg00273.html
As far as I can tell, it stands unanswered.

On a side note: What is the customary way to mention the
noweb-relevant name of a source block in the html/pdf export? After
all, if a code-block states
    : <<task1>>
    : <<task2>>
the reader needs to know, which code blocks define these.


kind regards, Yu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]