From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Baxter Subject: Re: Some whitespace stripped from emacs-lisp value in src blocks making it unreadable in certain cases Date: Tue, 10 Sep 2019 16:43:36 +0100 Message-ID: <87pnk8w40n.fsf@yandex.com> References: <875zm1c6ld.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36927) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7iJO-0005LW-4C for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 11:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7iJL-0005kO-9t for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 11:44:08 -0400 Received: from forward105o.mail.yandex.net ([2a02:6b8:0:1a2d::608]:41239) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7iJK-0005iQ-Jg for emacs-orgmode@gnu.org; Tue, 10 Sep 2019 11:44:07 -0400 In-Reply-To: <875zm1c6ld.fsf@gmail.com> (akater's message of "Tue, 10 Sep 2019 00:55:58 +0000") 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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> akater writes: > 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 ("" . (lambda nil (interactive) > (outline-up-heading 1)))))) #+end_src > #+RESULTS: > #+begin_example emacs-lisp (progn (use-package-ensure-elpa > 'outline '(nil) 'nil) (defvar use-package--warning157 #'(lambda > (keyword err) (let ((msg (format "%s/%s: %s" 'outline keyword > (error-message-string err)))) (display-warning 'use-package msg > :error)))) (condition-case-unless-debug err (progn (if (not > (require 'outline nil t)) (display-warning 'use-package (format > "Cannot load %s" 'outline) :error)) (bind-keys :package outline > :map outline-mode-map ("" lambda nil (interactive) > (outline-up-heading 1)))) (error (funcall use-package--warning157 > :catch err)))) #+end_example > Is there a remedy? This probably better be fixed but it could be > due to me using bleeding-edge Emacs 27 master (2019-09-10) & Org > from melpa (2019-09-09). If you don't have proper output > formatting with other versions in use, please report. I get the same formatting error as you and I am using emacs-26.3 with org-mode version 9.2.6. Best wishes, =2D-=20 Colin Baxter www.Colin-Baxter.com --=-=-= Content-Type: application/pgp-signature; name="signature.asc"; name="signature.asc"; description="Digital signature" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJdd8S3AAoJELv6JJKR9UHIjZUH/2kvsZBRyBiaG3jEG3VzfC9X U9FmlLMeh7jAmJ9tWV9wWeSceuTFWNMDZb/jLJrAnwtEEl5g1AYpzDVqyZ+gZpHG liNlthDE8ya+CgueFrmI07QjPlv1nQ/d9T5EYMyQwsgPUeVbmt9PSL79BPB+nVK5 24g+IQ8CN7dKU5sU7640CsavgG6b5n9pry837SCpkmqRZzt4zy4GiUf3c8HBPErg Q8WDxXUXPl2PB1mzK2VoizUrU2jmuvquC4sV6CGTkrWwvbwyt+s5R1qasS6Dpedz 51H9crRb6tTHTv29ih26nqSPIPLgO/8I1O2T4SHxKvK0+xIeJu3dX/OM9hLHfmU= =W/J7 -----END PGP SIGNATURE----- --=-=-=--