Coderefs: Implement line numbering and code references
commit88a78204c3efc0062ffba509e603d49a8750cddf
authorCarsten Dominik <carsten.dominik@gmail.com>
Fri, 26 Dec 2008 16:32:08 +0000 (26 17:32 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Fri, 26 Dec 2008 22:23:31 +0000 (26 23:23 +0100)
tree0288069b1b2bb912e2be80d676a9af4faf65b5c5
parenta4d72cbda53e8dfd61a0d2f8f8cb2ad8feb9bab0
Coderefs: Implement line numbering and code references

This patch covers the much of the new line numbering and code line
referencing.

We introduce a new function with the longish name
`org-export-replace-src-segments-and-examples'.  It is an extension of
the earlier `org-export-replace-src-segments'.  It now also covers
EXAMPLE blocks, not only source code blocks.  This was necessary to
allow line numbering also in EXAMPLE blocks.

Both clock types now accept a string with options which will be given
in the BEGIN line.  Options currently recognized are -n, +n, and -r.

A bit unsatisfactory about this patch may be that LaTeX-specific code
is now defined in org-exp.el, maybe eventually we want to think of a
way to move this code back to org-export-latex.el.  Really, all it
does is adding line numbers and wrapping them into a verbatim
environment.

Besides adding line numbers in a backend specific way, this patch also
adds code to search or special cookies in source code, like "((1))" or
"((name))".  These are labels that can be addressed by links as
references to specific line in source code.
lisp/org-exp.el