* Bug: Empty result when Emacs Lisp code block evals to nil [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)]
@ 2017-04-01 15:06 Chunyang Xu
2017-04-05 8:12 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Chunyang Xu @ 2017-04-01 15:06 UTC (permalink / raw)
To: emacs-orgmode
Hi.
I notice that if the result is nil during executing emacs-lisp code
block, org simply displays a empty #+RESULT block. For example,
#+BEGIN_SRC emacs-lisp
t
#+END_SRC
#+RESULTS:
: t
#+BEGIN_SRC emacs-lisp
nil
#+END_SRC
#+RESULTS:
I don't see why 'nil' is special than other values like 't'.
--
Emacs : GNU Emacs 26.0.50 (build 10, x86_64-apple-darwin16.4.0, NS appkit-1504.81 Version 10.12.3 (Build 16D32))
of 2017-03-28
Package: Org mode version 9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: Empty result when Emacs Lisp code block evals to nil [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)]
2017-04-01 15:06 Bug: Empty result when Emacs Lisp code block evals to nil [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)] Chunyang Xu
@ 2017-04-05 8:12 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-04-05 8:12 UTC (permalink / raw)
To: Chunyang Xu; +Cc: emacs-orgmode
Chunyang Xu <mail@xuchunyang.me> writes:
> I notice that if the result is nil during executing emacs-lisp code
> block, org simply displays a empty #+RESULT block. For example,
>
> #+BEGIN_SRC emacs-lisp
> t
> #+END_SRC
>
>
> #+RESULTS: : t
>
> #+BEGIN_SRC emacs-lisp
> nil
> #+END_SRC
>
> #+RESULTS:
>
>
> I don't see why 'nil' is special than other values like 't'.
It is special because it is also how code evaluation specifies that
there is no produced output.
You may want to use :results scalar, e.g.,
#+BEGIN_SRC emacs-lisp :results scalar
nil
#+END_SRC
#+RESULTS:
: nil
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-05 8:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-01 15:06 Bug: Empty result when Emacs Lisp code block evals to nil [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)] Chunyang Xu
2017-04-05 8:12 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).