> On Sep 9, 2019, at 5:55 PM, akater <nuclearsp...@gmail.com> wrote: > > Consider a lisp form that, when evaluated, produces another form. I'm > used to org printing the resulting form nicely, in lisp blocks. However, > this is not the case for emacs-lisp src blocks. An example: > > 1. The way it should be (and is now the case) with lisp, namely sbcl: > > #+begin_src lisp :results value verbatim :wrap example lisp > (macroexpand '(defun test (a b &optional c) "doc" nil)) > #+end_src > > #+RESULTS: > #+begin_example lisp > (PROGN > (EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-C:%COMPILER-DEFUN 'TEST T NIL NIL)) > (SB-IMPL::%DEFUN 'TEST > (SB-INT:NAMED-LAMBDA TEST > (A B &OPTIONAL C) > "doc" > (BLOCK TEST NIL)))) > T > #+end_example > > 2. The way it is now with emacs-lisp and a src block header that is > otherwise identical: > > #+begin_src emacs-lisp :results value verbatim :wrap example emacs-lisp > (macroexpand > '(use-package outline > :ensure nil > :bind > (:map outline-mode-map > ("<kp-home>" . (lambda nil (interactive) (outline-up-heading 1)))))) > #+end_src >
Using emacs 26.1 and org 9.2.5, I get #+RESULTS: #+begin_example emacs-lisp (use-package outline :ensure nil :bind (:map outline-mode-map ("<kp-home>" lambda nil (interactive) (outline-up-heading 1)))) #+end_example I am unclear what the effect of `:wrap example emacs-lisp' is here. AFAICS, the `emacs-lisp' has no effect. Can you point to a place in the code where this has effect? Using `:results value code :wrap src emacs-lisp' as the header args, I get this: #+RESULTS: #+begin_src emacs-lisp (use-package outline :ensure nil :bind (:map outline-mode-map ("<kp-home>" lambda nil (interactive) (outline-up-heading 1)))) #+end_src HTH, Chuck