diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-02-21 12:40:49 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-02-21 12:40:49 -0700 |
commit | 1e35a5ea37194d686f432d384f4e264498ca6294 (patch) | |
tree | 4820d5fadcc9d82dfbbc9a65469942aa754d10ef | |
parent | 99aa57fb208168dc1065223762ea7f3bfd8f0c9f (diff) | |
download | org-mode-1e35a5ea37194d686f432d384f4e264498ca6294.tar.gz |
ob: updates related to list changes
* lisp/ob.el (org-babel-read-list): Reading the value of a list has
been updated to reflect the new structure of org-mode lists in
elisp.
(org-babel-insert-result): Writing code block results to lists has
been updated to reflect the new list structure.
(org-babel-result-end): Remove a previous change to end-of-list
marker detection
-rw-r--r-- | lisp/ob.el | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1391,7 +1391,7 @@ following the source block." (defun org-babel-read-list () "Read the list at `point' into emacs-lisp." - (mapcar #'org-babel-read (cdr (org-list-parse-list)))) + (mapcar #'org-babel-read (mapcar #'cadr (cdr (org-list-parse-list))))) (defvar org-link-types-re) (defun org-babel-read-link () @@ -1519,9 +1519,13 @@ code ---- the results are extracted in the syntax of the source ((member "list" result-params) (insert (org-babel-trim - (org-list-to-generic (cons 'unordered - (if (listp result) result (list result))) - '(:splicep nil :istart "- " :iend "\n"))))) + (org-list-to-generic + (cons 'unordered + (mapcar + (lambda (el) (list nil (if (stringp el) el (format "%S" el)))) + (if (listp result) result (list result)))) + '(:splicep nil :istart "- " :iend "\n"))) + "\n")) ;; assume the result is a table if it's not a string ((not (stringp result)) (goto-char beg) @@ -1589,7 +1593,7 @@ code ---- the results are extracted in the syntax of the source ((org-at-table-p) (progn (goto-char (org-table-end)) (point))) ((org-at-item-p) (let* ((struct (org-list-struct)) (prvs (org-list-prevs-alist struct))) - (1- (org-list-get-list-end (point-at-bol) struct prvs)))) + (org-list-get-list-end (point-at-bol) struct prvs))) (t (let ((case-fold-search t) (blocks-re (regexp-opt |