From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qARMKu+y1GDFewEAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 18:29:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wNsBJu+y1GBqUwAA1q6Kng (envelope-from ) for ; Thu, 24 Jun 2021 16:29:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 65D66D24D for ; Thu, 24 Jun 2021 18:29:34 +0200 (CEST) Received: from localhost ([::1]:48826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwSEO-0001ts-UV for larch@yhetil.org; Thu, 24 Jun 2021 12:29:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwSDu-0001tf-Nl for emacs-orgmode@gnu.org; Thu, 24 Jun 2021 12:29:02 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:54092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwSDs-0008Co-7Z for emacs-orgmode@gnu.org; Thu, 24 Jun 2021 12:29:02 -0400 Received: by mail-wm1-x32e.google.com with SMTP id w13so4404276wmc.3 for ; Thu, 24 Jun 2021 09:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kWvXPw1ZNg+vQF/oqRZCOWV0cNWEIb0WVx6bcfaZhyI=; b=xdOFZN9Uv4prx0pNrFNY3nOK8rh6Xbmf3BpBz6jWxXfQJCXxtU2CGInUm58MheeQeu 2FMGQxgFG7UVQOdpjSzTMOIqb9O5u7FfOR07Ho6JmzrKLqQqMSWLDbxY6kRLM4YbMfc2 +5caGpIJqMsEtmUKr4STaOqNmar0rv82R9AXjW0s0ZesbQ144dJNQVwEPMAib/v/ruup m3ZOfAxmCSEyYauClNJ62+rs5gZkYLvJfVVM/7/kkUVoZtvcA91WLKIP4+yam5sv8FAe /e5EBxeTbIVSSjlG/pxkiY8E94Vkgf5yVKXSsB5kMGi67Wfvij3zyOwftlBtiRrzFASY +KJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kWvXPw1ZNg+vQF/oqRZCOWV0cNWEIb0WVx6bcfaZhyI=; b=ZJv+cgYpTZ2hrlcFFwxEdZreJ0Uoyfmb8BR9jE1mAytUrrjQPoIBP0mQY/7gcrbwJ3 O+9hXTUwy2Ky0LLAfIxg0BDuUEgkw72dGe77KRzLEi1XAoogQrzFOoILFNUKll94X9G+ XNDr4W/RPdseBm+EGgGe6Ihe2eFQ8WwrZX8bi5FzZi7s/ONs+37zZRVK1ofre5pSsXzb er1Wua95EskS7JBf3UC5WPCz1xCHhnihiPbNEZfDSsnVG/SDjMhEk5LQdH5DFd9akreE Jrpef6/t58U1sWcLs1evSIc5gS/5iy9MpT7GkPaBOYougbykTbyq6VbsLVg+YAnjxjUL EzpQ== X-Gm-Message-State: AOAM533tq13coeFIsCUVwgJMRkoIKS23emL3E4M+lYYz7O+zCQDnkNMA 0cwCCy6RXsMCmkP+m7mUbA8F4fYJOrbwZ2of6jM= X-Google-Smtp-Source: ABdhPJxbyxkxDsmnrL69r+ZUM0a5w/ps2wQgw9C0Pv2JdoJBp4Bv/c40gy1fmTjGfEETtypbQYpbHeHQeX4u87kQadI= X-Received: by 2002:a1c:f216:: with SMTP id s22mr5296887wmc.18.1624552137542; Thu, 24 Jun 2021 09:28:57 -0700 (PDT) MIME-Version: 1.0 References: <892BF03F-7EA8-4DC7-BC63-90E24D98F5EF@nordakademie.de> In-Reply-To: <892BF03F-7EA8-4DC7-BC63-90E24D98F5EF@nordakademie.de> From: John Kitchin Date: Thu, 24 Jun 2021 12:28:46 -0400 Message-ID: Subject: Re: appearance of list as results from evaluating code blocks To: Johannes Brauer Content-Type: multipart/alternative; boundary="00000000000013d12205c585858d" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=johnrkitchin@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "gmauer@gmail.com" , orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624552174; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kWvXPw1ZNg+vQF/oqRZCOWV0cNWEIb0WVx6bcfaZhyI=; b=GBFvw3XS2U5Ecu8Z36OfUpCpndOVC5+1R8T5MrFeBODnQ0t28ttpkhwzVQwukSD+6DN72b ByLsNF9GbtHXrNbQiIErfqW20HbuWCZvPZXHjWOD+HudPCVWlR5vIQ879gjdbUJ7dbf/q1 iNEsAkintgz1LFHnr+IIF4i6kasVFWJqhewFjtuylWT7V5z3n78nNwDyC8XfhvFgjgx9/X /vd2rn1ln3D3BqZOdkDGJw3+/XC+DSrBhLSPiurllVB3+CATLrFuG1ejnD55Q9voTc8ysS xvCwLsWepLPExhVM4kdr9saV5WmzVdm4bjAc+DjWkX15q6a0owBgOkYUfzVZkQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624552174; a=rsa-sha256; cv=none; b=WeHQjQnZm9gNmPX/3fKkIaWY2PCfqVDxHbZq7pE2yNnqV7FIGGDYEziQEb0x57Lm45w2AH Ui/CZgHJjL2Qce01lMPihR6CvzAytF+4sYHtf0B0QpL72Z9/4dR6tkOcKZZYynHWlsaHAT MCm58Ipj+vI63tSfBurauJqEy+7xDZb+eQ4yW20G7HlIs4k4vEwg/O8NBe6+MI7n7ynHSa wLZtoALLCJ4VOxyqaRotgHNIKz5Jkql+WY5Kdd/XGKqZIbjsLR1oNJCoOZqcotpGiFDEtc JzR3d4HXi+b6TXuvzmyMqQw7BsOqwYIkL/hq0U0O8cREOILSX22qP4Zmmu1eeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=xdOFZN9U; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=xdOFZN9U; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 65D66D24D X-Spam-Score: -2.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: EP7rGXjrFDJ5 --00000000000013d12205c585858d Content-Type: text/plain; charset="UTF-8" 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 have to explicitly return a value to see it. #+BEGIN_SRC python :results value code return [1, 2, 3] #+END_SRC #+RESULTS: #+begin_src python [1, 2, 3] #+end_src John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Thu, Jun 24, 2021 at 10:31 AM Johannes Brauer wrote: > 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 1 2 (+ 1 2)) > #+end_src > > #+RESULTS: > #+begin_src clojure > nil > #+end_src > > --00000000000013d12205c585858d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That probably means the clojure block is returning nil as = the value. I don't know what it means to return something=C2=A0in cloju= re, but here is what you have to do with Python, for example.

#+BEGIN_SRC python :results value code
[1, 2, 3]
#+END_SRC
<= br>#+RESULTS:
#+begin_src python
None
#+end_src

You have to= explicitly return a value to see it.

#+BEGIN_SRC python :res= ults value code
return [1, 2, 3]
#+END_SRC

#+RESULTS:
#+beg= in_src python
[1, 2, 3]
#+end_src


John
-----------------------------------
Professor John Kitchin (he/him= /his)
Doherty Hall A207F
Department of Chemical Engineering
Carneg= ie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Thu, Jun 24, 2021 at 10:31 AM Johannes Brauer &l= t;brauer@nordakademie.de> = wrote:
What about :results code
The default is a elisp code block so you get syntax coloring

= That works=C2=A0fore lisp:

=C2=A0 #+begin_src elisp :results code<= /span>
(list 1 2 (+ 1 2))
=C2=A0 #+end_src

=C2=A0 #+RESULTS:
=C2=A0 #+begin_src elisp
=C2=A0 (1 2 3)
=C2=A0 #+end_src

But with Clojure I get

=C2=A0 #+begin_src clojure :results cod= e
(list 1 2 (+ 1 2))
=C2=A0 #+end_src

=C2=A0 #+RESULTS:
=C2=A0 #+begin_src clojure
=C2=A0 nil
=C2=A0 #+end_src

--00000000000013d12205c585858d--