summaryrefslogtreecommitdiff
path: root/lisp/org/ob-table.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-11-12 14:11:22 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-11-12 14:11:22 -0500
commit666ffc7e09d3f55e2ce370bc3cf0bda347ae2e21 (patch)
treef9fd870f75195e853e0df4fd242055beacc360cc /lisp/org/ob-table.el
parent32d15ad99ccc01985ac36db9f9fabdf721202b6d (diff)
downloademacs-666ffc7e09d3f55e2ce370bc3cf0bda347ae2e21.tar.gz
Address some byte-compiler warnings.
* lisp/org/ob-abc.el (org-babel-expand-body:abc): Use dolist. (org-babel-execute:abc): Fix regexp quoting. * lisp/org/ob-calc.el (org--var-syms): Rename from `var-syms'. * lisp/org/ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding. * lisp/org/ob-table.el (sbe): Move debug declaration. * lisp/org/org-clock.el (org--msg-extra): Rename from `msg-extra'. * lisp/org/org.el (org-version): Avoid var name starting with _. (org-inhibit-startup, org-called-with-limited-levels) (org-link-search-inhibit-query, org-time-was-given) (org-end-time-was-given, org-def, org-defdecode, org-with-time): * lisp/org/org-colview.el (org-agenda-overriding-columns-format): * lisp/org/org-agenda.el (org-agenda-multi, org-depend-tag-blocked) (org-agenda-show-log-scoped): * lisp/org/ob-python.el (py-which-bufname, python-shell-buffer-name): * lisp/org/ob-haskell.el (org-export-copy-to-kill-ring): * lisp/org/ob-exp.el (org-link-search-inhibit-query): * lisp/org/ob-R.el (ess-eval-visibly-p): * lisp/org/ob-core.el (org-src-window-setup): Declare before use. (org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'. * lisp/org/ox-odt.el (org-odt-hfy-face-to-css): * lisp/org/org-src.el (org-src-associate-babel-session, org-src-get-lang-mode): * lisp/org/org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex) (org-bibtex-check): * lisp/org/ob-tangle.el (org-babel-tangle, org-babel-spec-to-string) (org-babel-tangle-single-block, org-babel-tangle-comment-links): * ob-table.el (sbe): * lisp/org/ob-sqlite.el (org-babel-sqlite-expand-vars): * lisp/org/ob-sql.el (org-babel-sql-expand-vars): * lisp/org/ob-shen.el (org-babel-execute:shen): * lisp/org/ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate): * lisp/org/ob-scala.el (org-babel-scala-evaluate): * lisp/org/ob-ruby.el (org-babel-ruby-table-or-string) (org-babel-ruby-evaluate): * ob-python.el (org-babel-python-table-or-string) (org-babel-python-evaluate-external-process) (org-babel-python-evaluate-session): * lisp/org/ob-picolisp.el (org-babel-execute:picolisp): * lisp/org/ob-perl.el (org-babel-perl-evaluate): * lisp/org/ob-maxima.el (org-babel-execute:maxima): * lisp/org/ob-lisp.el (org-babel-execute:lisp): * lisp/org/ob-java.el (org-babel-execute:java): * lisp/org/ob-io.el (org-babel-io-evaluate): * ob-haskell.el (org-babel-execute:haskell): * lisp/org/ob-fortran.el (org-babel-execute:fortran): * ob-exp.el (org-babel-exp-code): * lisp/org/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): * lisp/org/ob-ditaa.el (org-babel-execute:ditaa): * ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash) (org-babel-parse-header-arguments, org-babel-reassemble-table) (org-babel-goto-src-block-head, org-babel-mark-block) (org-babel-expand-noweb-references, org-babel-script-escape) (org-babel-process-file-name): * lisp/org/ob-clojure.el (org-babel-execute:clojure): * ob-calc.el (org-babel-execute:calc): * lisp/org/ob-awk.el (org-babel-execute:awk): * ob-abc.el (org-babel-execute:abc): * ob-R.el (org-babel-expand-body:R): * lisp/org/ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).
Diffstat (limited to 'lisp/org/ob-table.el')
-rw-r--r--lisp/org/ob-table.el53
1 files changed, 27 insertions, 26 deletions
diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el
index 8b3e36d735c..c71bb8758f8 100644
--- a/lisp/org/ob-table.el
+++ b/lisp/org/ob-table.el
@@ -60,7 +60,7 @@ character and replace it with ellipses."
(concat (substring string 0 (match-beginning 0))
(if (match-string 1 string) "...")) string))
-(defmacro sbe (source-block &rest variables)
+(defmacro sbe (source-block &rest variables) ;FIXME: Namespace prefix!
"Return the results of calling SOURCE-BLOCK with VARIABLES.
Each element of VARIABLES should be a two
element list, whose first element is the name of the variable and
@@ -85,6 +85,7 @@ as shown in the example below.
| 1 | 2 | :file nothing.png | nothing.png |
#+TBLFM: @1$4='(sbe test-sbe $3 (x $1) (y $2))"
+ (declare (debug (form form)))
(let* ((header-args (if (stringp (car variables)) (car variables) ""))
(variables (if (stringp (car variables)) (cdr variables) variables)))
(let* (quote
@@ -107,31 +108,31 @@ as shown in the example below.
variables)))
(unless (stringp source-block)
(setq source-block (symbol-name source-block)))
- ((lambda (result)
- (org-babel-trim (if (stringp result) result (format "%S" result))))
- (if (and source-block (> (length source-block) 0))
- (let ((params
- (eval `(org-babel-parse-header-arguments
- (concat
- ":var results="
- ,source-block
- "[" ,header-args "]"
- "("
- (mapconcat
- (lambda (var-spec)
- (if (> (length (cdr var-spec)) 1)
- (format "%S='%S"
- (car var-spec)
- (mapcar #'read (cdr var-spec)))
- (format "%S=%s"
- (car var-spec) (cadr var-spec))))
- ',variables ", ")
- ")")))))
- (org-babel-execute-src-block
- nil (list "emacs-lisp" "results" params)
- '((:results . "silent"))))
- "")))))
-(def-edebug-spec sbe (form form))
+ (let ((result
+ (if (and source-block (> (length source-block) 0))
+ (let ((params
+ ;; FIXME: Why `eval'?!?!?
+ (eval `(org-babel-parse-header-arguments
+ (concat
+ ":var results="
+ ,source-block
+ "[" ,header-args "]"
+ "("
+ (mapconcat
+ (lambda (var-spec)
+ (if (> (length (cdr var-spec)) 1)
+ (format "%S='%S"
+ (car var-spec)
+ (mapcar #'read (cdr var-spec)))
+ (format "%S=%s"
+ (car var-spec) (cadr var-spec))))
+ ',variables ", ")
+ ")")))))
+ (org-babel-execute-src-block
+ nil (list "emacs-lisp" "results" params)
+ '((:results . "silent"))))
+ "")))
+ (org-babel-trim (if (stringp result) result (format "%S" result)))))))
(provide 'ob-table)