emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Q/Bug?] Comment for noweb reference comments content
@ 2024-05-04  3:11 João Pedro
  2024-05-04 11:32 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: João Pedro @ 2024-05-04  3:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Ok so I don't know whether this is a bug or intended behaviour (though
if its the latter I propose we reconsider), but if I have the following

#+begin_src emacs-lisp :noweb yes :comments noweb :tangle /tmp/foo.el
(progn
  <<foo>>)
#+end_src

#+name: foo
#+begin_src emacs-lisp
(message "foo")
#+end_src

the resulting foo.el will have a syntax error, since the closing ) for
`progn' will have been commented like so

;; [[file:...][No heading:1]]
(progn
  ;; [[file:...][foo]]
  (message "foo")
  ;; foo ends here)
                  ^
;; No heading:1 ends here

It seems like some macro let-bound in `org-babel-expand-noweb-refereces'
is doing this, but I couldn't pinpoint exactly what or where. What I
could achieve though, is to add a newline after the second call to
`c-wrap' inside `expand-body''s definition, which at least solve the
problem of throwing syntax errors, but I don't think that would be the
best solution.

Best regards,

-- 
João Pedro de A. Paula
IT bachelors at Universidade Federal do Rio Grande do Norte (UFRN)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-04 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-04  3:11 [Q/Bug?] Comment for noweb reference comments content João Pedro
2024-05-04 11:32 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).