File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,12 @@ The new variable name is =org-plantuml-args=. It now applies to both
425425jar PlantUML file and executable.
426426
427427** Miscellaneous
428+ *** Post-processing code blocks can return an empty list
429+
430+ When the result of a regular code block is nil, then that was already
431+ treated as an empty list. Now that is also the case for code blocks
432+ that post-process the result of another block.
433+
428434*** Styles are customizable in ~biblatex~ citation processor
429435
430436It is now possible to add new styles or modify old ones in ~biblatex~
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ Emacs Lisp representation of the value of the variable."
199199 (org-babel-execute-src-block nil info params))))
200200 (error " Reference `%s' not found in this buffer " ref))))
201201 (cond
202- ((symbolp result) (format " %S " result))
202+ ((and result ( symbolp result) ) (format " %S " result))
203203 ((and index (listp result))
204204 (org-babel-ref-index-list index result))
205205 (t result)))))))))
Original file line number Diff line number Diff line change @@ -136,6 +136,30 @@ should still return the link."
136136 (let ((info (org-babel-get-src-block-info )))
137137 (should (string= " no" (cdr (assq :tangle (nth 2 info))))))))
138138
139+ (ert-deftest test-ob/post-header-arguments ()
140+ " When the result of a post-processing source block is an empty
141+ list, then it should be treated as such; not as the symbol nil."
142+ (should
143+ (let ((default-directory temporary-file-directory))
144+ (org-test-with-temp-text
145+ "
146+ #+name: addheader
147+ #+header: :var rows=\"\"
148+ #+begin_src elisp :hlines yes
149+ '()
150+ #+end_src
151+ #+header: :post addheader(*this*)
152+ #+<point>begin_src emacs-lisp :results table
153+ #+end_src
154+ #+RESULTS:
155+ : nil"
156+ (org-babel-execute-src-block )
157+ (goto-char (1- (point-max )))
158+ (equal (buffer-substring-no-properties
159+ (line-beginning-position )
160+ (line-end-position ))
161+ " #+RESULTS:" )))))
162+
139163(ert-deftest test-ob/elisp-in-header-arguments ()
140164 " Test execution of elisp forms in header arguments."
141165 (org-test-with-temp-text-in-file "
You can’t perform that action at this time.
0 commit comments