DONE global variable indicating default to vector output

This commit is contained in:
Eric Schulte 2009-05-23 09:05:53 -07:00
parent e2745ba306
commit 6206e23ffd
3 changed files with 28 additions and 5 deletions

View File

@ -56,7 +56,7 @@ none ----- do not display either code or results upon export"
(defun litorgy-exp-inline-src-blocks (start end)
"Process inline src blocks between START and END for export.
See `litorgy-exp-src-blocks' for export options, currently the
options and are taken from `litorgy-inline-header-args'."
options and are taken from `litorgy-defualt-inline-header-args'."
(interactive)
(save-excursion
(goto-char start)

View File

@ -40,7 +40,10 @@ then run `litorgy-execute-src-block'."
(add-hook 'org-ctrl-c-ctrl-c-hook 'litorgy-execute-src-block-maybe)
(defvar litorgy-inline-header-args '((:results . "silent") (:exports . "results"))
(defvar litorgy-default-header-args '()
"Default arguments to use when evaluating a source block.")
(defvar litorgy-default-inline-header-args '((:results . "silent") (:exports . "results"))
"Default arguments to use when evaluating an inline source block.")
(defvar litorgy-src-block-regexp nil
@ -172,12 +175,13 @@ of the following form. (language body header-arguments-alist)"
(defun litorgy-parse-src-block-match ()
(list (litorgy-clean-text-properties (match-string 1))
(litorgy-clean-text-properties (match-string 4))
(litorgy-parse-header-arguments (litorgy-clean-text-properties (or (match-string 3) "")))))
(org-combine-plists litorgy-default-header-args
(litorgy-parse-header-arguments (litorgy-clean-text-properties (or (match-string 3) ""))))))
(defun litorgy-parse-inline-src-block-match ()
(list (litorgy-clean-text-properties (match-string 1))
(litorgy-clean-text-properties (match-string 4))
(org-combine-plists litorgy-inline-header-args
(org-combine-plists litorgy-default-inline-header-args
(litorgy-parse-header-arguments (litorgy-clean-text-properties (or (match-string 3) ""))))))
(defun litorgy-parse-header-arguments (arg-string)

View File

@ -3,7 +3,7 @@
#+SEQ_TODO: TODO PROPOSED | DONE DEFERRED REJECTED
#+STARTUP: oddeven
* Tasks [17/26]
* Tasks [18/27]
** TODO re-implement R evaluation using ess-command or ess-execute
I don't have any complaints with the current R evaluation code or
@ -224,6 +224,15 @@ mean(mean(vec))
posterity. Same for a shell session either in a *shell* buffer, or
pasted from another terminal emulator. And python of course.
** DONE global variable indicating default to vector output
how about an alist... =litorgy-default-header-args= this may already
exist... just execute the following and all source blocks will default
to vector output
#+begin_src emacs-lisp
(setq litorgy-default-header-args '((:results . "vector")))
#+end_src
** DONE name named results if source block is named
currently this isn't happening although it should be
@ -540,6 +549,16 @@ This could probably be added to [[file:litorgy/litorgy-script.el][litorgy-script
* Bugs [9/12]
** TODO non-orgtbl formatted lists
for example
#+srcname: this-doesn't-match-orgtbl
#+begin_src emacs-lisp :results replace
'((:results . "replace"))
#+end_src
#+resname: this-doesn't-match-orgtbl
** TODO collapsing consecutive newlines in string output
#+srcname: multi-line-string-output