On 18/12/2024 11:13, Joseph Turner wrote:

Is there a way to make Emacs ignore Local Variables lists which appear
inside of source blocks?

For example, is there a way to include the following content in an Org
file without Emacs attempting to locally set foo to bar?

#+BEGIN_EXAMPLE
   # Local Variables:
   # foo: 'bar
   # End:
#+END_EXAMPLE

Have you tried to create a comment block below?

#+begin_comment
Deactivate local variables above in the example block:
Local Variables:
End:
#+end_comment

If it is not enough (and breaking the example into 2 parts is not acceptable) then ask Emacs developers. I do not think, Org should (and has a chance) to deal with this feature

(info "(emacs) Specifying File Variables")
<https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html>

Reply via email to