From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: emacs-lisp babel won't print Date: Fri, 25 Sep 2015 16:04:08 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1135e3fa6dc5ea0520947f03 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfVjr-000321-Rr for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 12:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfVjr-0000Y0-2F for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 12:20:47 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:35652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfVTl-0001nv-QN for emacs-orgmode@gnu.org; Fri, 25 Sep 2015 12:04:09 -0400 Received: by lacrr8 with SMTP id rr8so24172401lac.2 for ; Fri, 25 Sep 2015 09:04:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Mailinglist --001a1135e3fa6dc5ea0520947f03 Content-Type: text/plain; charset=UTF-8 If I do this: #+BEGIN_SRC emacs-lisp (setq animals '(gazelle giraffe lion tiger)) #+END_SRC #+RESULTS: | gazelle | giraffe | lion | tiger | and then this #+begin_src emacs-lisp (defun print-elements-of-list (list) "Print each element of LIST on a line of its own." (while list (print (car list)) (setq list (cdr list)))) #+end_src #+RESULTS: : print-elements-of-list and finally #+BEGIN_SRC emacs-lisp (print-elements-of-list animals) #+END_SRC I get nothing for results and "Code block produced no output." in Messages. Why can't it print out? Same code works fine in the IELM buffer. LB --001a1135e3fa6dc5ea0520947f03 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
If I do this:

#+BEGIN_SRC emacs-lisp
(setq animals '(gazelle giraffe lion tiger))
#+END_SR= C

#+RESULTS:
| gazelle | giraffe | lion = | tiger |

and then this

#+begin= _src emacs-lisp
(defun print-elements-of-list (list)
=C2=A0 "Print each element of LIST on a line of its own."<= /div>
=C2=A0 (while list
=C2=A0 =C2=A0 (print (car list))
=C2=A0 =C2=A0 (setq list (cdr list))))
#+end_s= rc

#+RESULTS:
: print-elements-= of-list

and finally

#+BEGIN_SRC emacs-lisp
(print-elements-of-list animals)
#+END_SRC

I get nothing for results a= nd "Code block produced no output." in Messages. Why can't it= print out? Same code works fine in the IELM buffer.

LB
--001a1135e3fa6dc5ea0520947f03--