Hello,

I would like the tangle functionality of org-mode to generate line
directives so that compilers generate correct location for errors. I am
using the following settings, using the `:comments' feature of tangle:


    ;; Do not comment comments
    (setq org-babel-tangle-uncomment-comments t)
    ;; Beginning: set line directives (this is for OCaml)
    (setq org-babel-tangle-comment-format-beg
          "# %start-line \"%file\"\n")
    ;; No end template [Remember that they are not commented]
    (setq org-babel-tangle-comment-format-end " ")
    
This works surprsingly well for ordinary code blocks but breaks down
when noweb is used. Indeed control is passed to
ob-babel-expand-noweb-references which comments the "comment" (I see
this can be confusing) because it ignores the setting.

My question is: is this the indented behaviour?

Also, I do think such a behaviour should be supported out of the box:
this is very important for compiled languages.

Best wishes,

Simon.

Reply via email to