emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107


From: Daniel Kraus
Subject: Re: [BUG] Tangling of clojure code blocks is broken [9.7 (9.7-??-0807107 @ /Users/ag/.emacs.d/.local/straight/build-30.0.50/org/)]
Date: Mon, 08 May 2023 12:05:10 +0200

Hi!

Ag <agzam.ibragimov@gmail.com> writes:

> Setting :results output header makes it work as expected. Without it -
> it's as I described, wrapped.

I can reproduce the bug.

The problem is that or :results value (/the default) I only want the
result of the last expression and I do that `binding` of stdout to surpress
all other output.
But I guess during tangle this should just be ignored?
Is there a simple way to find out if `org-babel-execute:clojure` is
executed or tangled?

If it should be ignored on tangle, what about the :var defines.
We recently discussed this for ob-scheme where there was a problem with the
`let` wrapper.
Is it ok or expected that a the tangled code is wrapped in a let block?
Should I change it to a global `def`?

Thanks for the bug report.

PS, a minimal repo is

minimal-org-clj.el:
#+BEGIN_SRC emacs-lisp
;;; Minimal setup to load latest `org-mode'.

;; Activate debugging.
(setq debug-on-error t
      debug-on-signal nil
      debug-on-quit nil)

;; Add latest Org mode to load path.
(add-to-list 'load-path (expand-file-name "/home/daniel/.emacs.d/lib/org/lisp"))

(org-babel-do-load-languages
 'org-babel-load-languages
 '((clojure . t)))
#+END_SRC

/usr/bin/emacs -Q -l minimal-org-clj.el

And then tangle something like:

#+begin_src clojure :backend babashka :tangle foo.clj
{:foo :bar}
#+end_src

Cheers,
  Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]