diff --git a/emacs/init.org b/emacs/init.org index cac9a90..f962fa0 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -1685,6 +1685,25 @@ Enable async source block execution. Note: this execute the contents of the sour :hook (org-mode . (lambda () (require 'ob-async)))) #+END_SRC +Filter out the "u" from unicode results in org tabels returned from Python source blocks: +#+BEGIN_SRC emacs-lisp + (with-eval-after-load 'ob-python + (defun org-babel-python-table-or-string (results) + "Convert RESULTS into an appropriate elisp value. + If the results look like a list or tuple, then convert them into an + Emacs-lisp table, otherwise return the results as a string." + (let ((res (org-babel-script-escape results))) + (if (listp res) + (mapcar (lambda (el) + (cond + ((eq el 'None) org-babel-python-None-to) + ((listp el) (-filter (lambda (m) (not (eq m 'u))) el)) + (t el))) + res) + res)))) +#+END_SRC + + ** Images #+BEGIN_SRC emacs-lisp (setq org-image-actual-width nil)