[ Adding mailing list back to CC. Please use "Reply all" to keep the conversation public ]
> Hmm I see, interesting. My case is thus: > > #+start_src clojure > (call (some-code 1 2 3)) > ;; end with a comment > #+end_src > > When I execute this, without my patch, it throws an error. ... > Perhaps a better solution would be to add \n before all closing parentheses? Since you are more familiar with clojure than me, could you explain what that error is about and why it happens? Best, Ihor Lēctia Landau <[email protected]> writes: > Hmm I see, interesting. My case is thus: > > #+start_src clojure > (call (some-code 1 2 3)) > ;; end with a comment > #+end_src > > When I execute this, without my patch, it throws an error. These get > tangled and fed into clerk (a clojure file -> webview tool) which > renders comments like these, so I want them in the tangled code, but I > also want to be able to execute the blocks directly in the orgmode > buffer. > > My only real alternative is to split out the comments into their own > blocks, but that would be messy and I believe would fail without the > patch for the same reason. > > Perhaps a better solution would be to add \n before all closing parentheses? > > On Sat, Aug 1, 2026 at 1:15 PM Ihor Radchenko <[email protected]> wrote: >> >> Lēctia Landau <[email protected]> writes: >> >> > Comments were only removed when `vars' were provided, and still broke >> > `(let [...] ...)' otherwise, and so, executing any Clojure src block >> > which ends in a comment would fail without explanation. >> > >> > This fix uses the existing solution, but uses it regardless of `vars', >> > causing comments to correctly be ignored during execution, and for >> > execution of blocks ending in comments to work as expected. >> > From 8a6732213ef8c9118dee4a4fb2f9dd2b17a770d9 Mon Sep 17 00:00:00 2001 >> > From: =?UTF-8?q?L=C4=93ctia=20Landau?= <[email protected]> >> > Date: Wed, 29 Jul 2026 02:26:32 +0300 >> > Subject: [PATCH] lisp/ob-clojure.el: Fix executing blocks ending in >> > comments >> > >> > * ob-clojure.el (org-babel-expand-body:clojure): Remove comments >> > regardless of `vars'. >> > >> > Comments were only removed when `vars' were provided, and still broke >> > `(let [...] ...)' otherwise, and so, executing any Clojure src block >> > which ends in a comment would fail without explanation. >> > >> > This fix uses the existing solution, but uses it regardless of `vars', >> > causing comments to correctly be ignored during execution, and for >> > execution of blocks ending in comments to work as expected. >> >> Could you please provide more details about what you are trying to fix? >> Your patch is effectively reverting >> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=23eb697df >> where Anoop GR explicitly asked not to remove comments when :var is not >> provided. >> >> -- >> Ihor Radchenko // yantar92, >> Org mode maintainer, >> Learn more about Org mode at <https://orgmode.org/>. >> Support Org development at <https://liberapay.com/org-mode>, >> or support my work at <https://liberapay.com/yantar92> -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
