Skip to content

Tangling in code block with a noweb reference breaks polymode #53

@full-lotus

Description

@full-lotus

Tangling when point is outside the code blocks works fine. Also, tangling works fine if there is no <<noweb refs>> inside any code blocks.

This is definitely related to noweb-ref expansion, when a <<ref>> is present but we have :noweb no, tangling works fine.

If you try to run org-babel-tangle when point is in either of the two code blocks, you will get an error message:

unwind-protect: Marker does not point anywhere


:PROPERTIES:
:header-args: :comments no :noweb yes
:END:

#+begin_src clojure :tangle ./test-pm-tangle.cljc
(+ 1 1 1)
<<noweb-ref>>
#+end_src

#+begin_src clojure :noweb-ref noweb-ref
(+ 1 1 1)
#+end_src

After the tangling comes Armageddon:

  1. polymode gets disabled
  2. font-locking resets to nil
  3. current non-hidden org buffer name (without spaces in front of it) vanishes
  4. current window scrolls up a bit, leaving point at the bottom of a screen
  5. if that's the first time I tangle, a mark is set at current point O_o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions