John Kitchin <jkitchin <at> andrew.cmu.edu> writes: > > Does anyone know if it is possible to get line numbering only in code > blocks in an org-file? >
When exporting? Or in the buffer? If the latter, I don't know. If the former, -n does that but it is position-sensitive I think: --8<---------------cut here---------------start------------->8--- * A code block for exporting with line number #+BEGIN_SRC python -n :exports code import sys sys.exit(0) #+END_SRC #+BEGIN_EXAMPLE -n import sys sys.exit(0) #+END_EXAMPLE --8<---------------cut here---------------end--------------->8--- works, but putting it at the end of the BEGIN_SRC line does not. See (info "(org) Literal examples") for more. -- Nick