The link syntax [[link]] is parsed as an org-link inside of a source block, as shown in the code and figure below, where my mouse if placed on top of [[2]].

#+begin_src emacs-lisp

enter image description here

This if fine in the example above, but consider a language like python. The link syntax is also valid python syntax:

#+begin_src python
x = np.array([[2]])

enter image description here

If I now toggle link display with org-toggle-link-display, then my python code is still valid, but reads as if it'd be wrong:

enter image description here

How could I tell org-mode to not parse links inside of org src-blocks?

org version 9.5.4. Emacs 29.0.50

  • Not sure you can. I think you should report this with M-x org-submit-bug-report.
    – NickD
    Jun 13 at 7:52
  • I tried but it seems my emails don't come through (at least not in the public list).
    – dangom
    Jun 13 at 21:17
  • 3
    The entire fontification for org-mode is being rewritten based on the org parser (instead of the current regex framework). The rewrite effort should fix this when it lands
    – dangom
    Jun 14 at 20:17


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.