From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Some whitespace stripped from emacs-lisp value in src blocks making it unreadable in certain cases Date: Tue, 10 Sep 2019 17:29:24 +0000 Message-ID: <16A4335F-9F40-4D7B-A56D-C846B9C3447B@ucsd.edu> References: <875zm1c6ld.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50418) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7ng1-0001jk-5o for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 17:27:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7nfz-0002y7-R3 for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 17:27:52 -0400 Received: from mx0a-00395d01.pphosted.com ([148.163.133.170]:14340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i7nfz-0002wz-3f for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 17:27:51 -0400 In-Reply-To: <875zm1c6ld.fsf@gmail.com> Content-Language: en-US Content-ID: <9EE9C428B9E8F44DA7B7343844E530D1@AD.UCSD.EDU> 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" To: akater Cc: "emacs-orgmode@gnu.org" > On Sep 9, 2019, at 5:55 PM, akater wrote: >=20 > 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: >=20 > 1. The way it should be (and is now the case) with lisp, namely sbcl: >=20 > #+begin_src lisp :results value verbatim :wrap example lisp > (macroexpand '(defun test (a b &optional c) "doc" nil)) > #+end_src >=20 > #+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 >=20 > 2. The way it is now with emacs-lisp and a src block header that is > otherwise identical: >=20 > #+begin_src emacs-lisp :results value verbatim :wrap example emacs-lisp > (macroexpand > '(use-package outline > :ensure nil > :bind > (:map outline-mode-map > ("" . (lambda nil (interactive) (outline-up-heading 1)))))) > #+end_src >=20 Using emacs 26.1 and org 9.2.5, I get=20 #+RESULTS: #+begin_example emacs-lisp (use-package outline :ensure nil :bind (:map outline-mode-map ("" = 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 whe= re 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 ("" lambda nil (interactive) (outline-up-heading 1)))) #+end_src HTH, Chuck