emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lennart Fricke <pge08aqw@studserv.uni-leipzig.de>
To: emacs-orgmode@gnu.org
Subject: Re: Bug: python babel does not support hlines as mentioned in docs
Date: Mon, 29 Oct 2012 18:44:26 +0100	[thread overview]
Message-ID: <874nlddvgl.fsf@tee.lan> (raw)
In-Reply-To: 87ehkhdx08.fsf@tee.lan

[-- Attachment #1: Type: text/plain, Size: 82 bytes --]

This patch makes None being treated as hline again.

Best regards
Lennart Fricke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: python-hlines.patch --]
[-- Type: text/x-patch, Size: 629 bytes --]

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 71adf73..a1f834f 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -123,7 +123,11 @@ specifying a variable of the same value."
   "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."
-  (org-babel-script-escape results))
+  ((lambda (res)
+     (if (listp res)
+	 (mapcar (lambda (el) (if (equal el 'None) 'hline el)) res)
+       res))
+   (org-babel-script-escape results)))
 
 (defvar org-babel-python-buffers '((:default . nil)))
 

  reply	other threads:[~2012-10-29 17:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 17:11 Bug: python babel does not support hlines as mentioned in docs [7.9.2 (release_7.9.2-499-ga29de0 @ /home/lennart/.emacs.d/site-lisp/org/lisp/)] Lennart Fricke
2012-10-29 17:44 ` Lennart Fricke [this message]
2012-10-30 16:50   ` Bug: python babel does not support hlines as mentioned in docs Eric Schulte
2012-10-30 18:03     ` Lennart Fricke
2012-10-31  0:07       ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nlddvgl.fsf@tee.lan \
    --to=pge08aqw@studserv.uni-leipzig.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).