John Kitchin writes:
> I think something is fishy in ob-clojure.
>
> When I look at how it runs, it is not obvious it is returning anything.
> Instead it is wrapping the body like this
>
> "(clojure.pprint/pprint (do (list 1 2 (+ 1 2"
>
> which I assume is going to stdout maybe?
>
> With
I think something is fishy in ob-clojure.
When I look at how it runs, it is not obvious it is returning anything.
Instead it is wrapping the body like this
"(clojure.pprint/pprint (do (list 1 2 (+ 1 2"
which I assume is going to stdout maybe?
With Cider I eventually got to this
Hi John!
There is no „return“ in Lisp languages. The return value of (list 1 2 3) is (1
2 3). Clojure is a Lisp language similar to Elisp. So
#+begin_src clojure :results code
(list 1 2 (+ 1 2))
#+end_src
should work for Clojure as it does für Elisp.
Johannes
Am 24.06.2021 um 18:28 schrieb
That probably means the clojure block is returning nil as the value. I
don't know what it means to return something in clojure, but here is what
you have to do with Python, for example.
#+BEGIN_SRC python :results value code
[1, 2, 3]
#+END_SRC
#+RESULTS:
#+begin_src python
None
#+end_src
You
What about :results code
The default is a elisp code block so you get syntax coloring
That works fore lisp:
#+begin_src elisp :results code
(list 1 2 (+ 1 2))
#+end_src
#+RESULTS:
#+begin_src elisp
(1 2 3)
#+end_src
But with Clojure I get
#+begin_src clojure :results code
(list
On Thursday, 24 Jun 2021 at 10:46, Johannes Brauer wrote:
> #+begin_src clojure :results verbatim :wrap src clojure
> (list 1 2 (+ 1 2))
> #+end_src
For completeness, another option is ":results verbatim drawer" without
:wrap.
--
: Eric S Fraga via Emacs 28.0.50, Org
Hi Rodrigo!
Thanks a lot for the detailed information. In the meantime I’ve studied the
org-mode manual a bit more closely (perhaps, I should have done that before
asking my question …) and found the following interesting possibilitiy:
#+begin_src clojure :results verbatim :wrap src clojure
What about :results code
The default is a elisp code block so you get syntax coloring
On Wed, Jun 23, 2021, 16:22 Rodrigo Morales
wrote:
> Johannes Brauer writes:
>
> Johannes Brauer writes:
>
> > thanks, that works
>
> While that works, you might be interested in ":results verbatim" instead
>
Johannes Brauer writes:
Johannes Brauer writes:
> thanks, that works
While that works, you might be interested in ":results verbatim" instead
of ":results raw" since when using "verbatim" the results are replaced
when re-evaluating the code block. See minimal working example below.
After
Johannes Brauer writes:
Johannes Brauer writes:
> thanks, that works
While that works, you might be interested in ":results verbatim" instead
of ":results raw" since when using "verbatim" the results are replaced
when re-evaluating the code block. See minimal working example below.
After
Hi Juan Manuel,
thanks, that works
Best regards
Johannes
> Am 23.06.2021 um 21:43 schrieb Juan Manuel Macías :
>
> Hi Johannes,
>
> Johannes Brauer writes:
>
>> Hi!
>> Evaluating a code block containing a list expression using org-babel for
>> elisp or Clojure, for example
>> (list 1 2 3)
Hi Johannes,
Johannes Brauer writes:
> Hi!
> Evaluating a code block containing a list expression using org-babel for
> elisp or Clojure, for example
> (list 1 2 3)
> I get
> #+RESULTS:
> | 1 | 2 | 3 |
> I would prefer
> #+RESULTS:
> ( 1 2 3 )
>
> Is it possible to get this.
Try
Hi!
Evaluating a code block containing a list expression using org-babel for elisp
or Clojure, for example
(list 1 2 3)
I get
#+RESULTS:
| 1 | 2 | 3 |
I would prefer
#+RESULTS:
( 1 2 3 )
Is it possible to get this.
I am using
Aquamacs 3.5nightly GNU Emacs 25.3.50.1
13 matches
Mail list logo