emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Some whitespace stripped from emacs-lisp value in src blocks making


From: akater
Subject: [O] Some whitespace stripped from emacs-lisp value in src blocks making it unreadable in certain cases
Date: Tue, 10 Sep 2019 00:55:58 +0000

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

#+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 
("<kp-home>" 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.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]