Nick Dokos <nicholas.do...@hp.com> writes: > Jambunathan K <kjambunat...@gmail.com> wrote: > >> Nick Dokos <nicholas.do...@hp.com> writes: >> >> > Günter Kolousek <k...@htlwrn.ac.at> wrote: >> > >> >> >> >> Hi, using footnotes i.e. [2] inside #+begin_src #+end_src causes errors >> >> during export using orgmode 7.7 and tip. >> >> >> >> Günter >> >> >> >> ... >> >> >> >> * Test >> >> foo >> >> #+begin_src python >> >> lst = [-1, -2, 2, -3, -4] >> >> >> >> for x in lst[:]: >> >> if x < 0: >> >> lst.remove(x) >> >> >> >> print(lst) # [2] <- does not work! >> >> #+end_src >> >> >> >> This should set the thing to rest. >> > > Acctually, no: I took the OP's request (and I presume I misled you into > thinking that too) as a functionality request, but I didn't read it > carefully enough. I think he is complaining about getting an error (see > the attached backtrace).
Right, it shouldn't crash. FWIW, The problem is (org-footnote-get-next-reference ...) sees the following text while looking for next reference. \begin{verbatim} lst = [-1, -2, 2, -3, -4] for x in lst[:]: if x < 0: lst.remove(x) print(lst) # [2] <- does not work! \end{verbatim} AFAICS the above text has no text decorations as well. Naturally org-footnote-get-next-reference is misled into believing that it is in the "allowed" territory. Jambunathan K. > > Nick > > > >> ,----[ C-h v org-footnote-forbidden-blocks RET ] >> | org-footnote-forbidden-blocks is a variable defined in `org-footnote.el'. >> | Its value is >> | ("example" "verse" "src" "ascii" "beamer" "docbook" "html" "latex" "odt") >> | >> | >> | Documentation: >> | Names of blocks where footnotes are not allowed. >> | >> | [back] >> `---- >> >> OP can search for for alternative ways to reference code block lines in >> the following section of the manual >> http://orgmode.org/org.html#Literal-examples >> >> (Hint: Search for ref:jump) >> >> >> Jambunathan K. >>