Fabio Natali <m...@fabionatali.com> writes: > Now consider a slight variation where "Hello world" is formatted as a > Org heading. The 'org-babel-goto-named-src-block' function is no longer > able to identify the text block. Executing the Emacs Lisp block results > in the error message below. > > #+name: bar > #+begin_src text > * Hello world > #+end_src > ... > Is this expected? Am I misunderstanding what text blocks are for and > what characters/formatting they're allowed to use?
Headline markup has the highest priority. Your block is interpreted as <paragraph with #+name affiliated keyword> #+name: bar #+begin_sec text <headline> * Hello world <paragraph> #+end_src See https://orgmode.org/manual/Literal-Examples.html You need to escape "*" and "#+" at the beginning of line inside code blocks using comma: ",*", ",#+". Org will do it for you automatically if you use C-c ' interface to edit source blocks. Best, Ihor