1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Revert "DONE take default values for header args from properties"

This is breaking many of our tests, so I'm reverting it until I can figure out a fix

This reverts commit 9936814ffc.
This commit is contained in:
Eric Schulte 2009-07-22 19:02:12 -06:00
parent 9936814ffc
commit 6b5747fdfa
3 changed files with 7 additions and 43 deletions

View File

@ -159,7 +159,7 @@ Optionally supply a value for INFO in the form returned by
Optionally supply a value for PARAMS which will be merged with
the header arguments specified at the source code block."
(interactive)
;; (message "supplied params=%S" params) ;; debugging
(message "supplied params=%S" params)
(let* ((info (or info (org-babel-get-src-block-info)))
(lang (first info))
(body (second info))
@ -170,7 +170,7 @@ the header arguments specified at the source code block."
(result-type (fourth processed-params))
(cmd (intern (concat "org-babel-execute:" lang)))
result)
;; (message "params=%S" params) ;; debugging statement
(message "params=%S" params) ;; debugging statement
(unless (member lang org-babel-interpreters)
(error "Language is not in `org-babel-interpreters': %s" lang))
(when arg (setq result-params (cons "silent" result-params)))
@ -265,19 +265,6 @@ of the following form. (language body header-arguments-alist)"
(save-match-data ,@body)
(goto-char (match-end 0)))))
(defun org-babel-params-from-properties ()
"Return an association list of any source block params which
may be specified in the properties of the current outline entry."
(let ((org-babel-header-args '("results" "exports" "tangle")))
(delq nil
(mapcar
(lambda (header-arg)
(let ((val (org-entry-get (point) header-arg)))
(when val
;; (message "param-from-property %s=%s" header-arg val) ;; debugging statement
(cons (intern (concat ":" header-arg)) val))))
org-babel-header-args))))
(defun org-babel-parse-src-block-match ()
(let* ((lang (org-babel-clean-text-properties (match-string 1)))
(lang-headers (intern (concat "org-babel-default-header-args:" lang))))
@ -285,7 +272,6 @@ may be specified in the properties of the current outline entry."
(org-babel-strip-protective-commas (org-babel-clean-text-properties (match-string 4)))
(org-babel-merge-params
org-babel-default-header-args
(org-babel-params-from-properties)
(if (boundp lang-headers) (eval lang-headers) nil)
(org-babel-parse-header-arguments (org-babel-clean-text-properties (or (match-string 3) "")))))))
@ -296,7 +282,6 @@ may be specified in the properties of the current outline entry."
(org-babel-strip-protective-commas (org-babel-clean-text-properties (match-string 4)))
(org-babel-merge-params
org-babel-default-inline-header-args
(org-babel-params-from-properties)
(if (boundp lang-headers) (eval lang-headers) nil)
(org-babel-parse-header-arguments (org-babel-clean-text-properties (or (match-string 3) "")))))))

View File

@ -207,7 +207,7 @@ would then be [[#sandbox][the sandbox]].
#+end_src
* Tasks [38/58]
* Tasks [37/58]
** PROPOSED raise elisp error when source-blocks return errors
Not sure how/if this would work, but it may be desirable.
@ -257,6 +257,9 @@ but with preference given to
With a file-local variable setting, yea that makes sense. Maybe
the header should reference the related org-mode file.
** TODO take default values for header args from properties
Use file-wide and subtree wide properties to set default values for
header args.
** TODO support for working with =*Org Edit Src Example*= buffers [2/4]
*** TODO optionally evaluate header references when we switch to =*Org Edit Src*= buffer
That seems to imply that the header references need to be evaluated
@ -928,20 +931,6 @@ to the command if BUFF is not given.)
2) The function is called inside of a =write.table= function call
writing the results to a table
3) The table is read using =org-table-import=
** DONE take default values for header args from properties
Use file-wide and subtree wide properties to set default values for
header args.
*** I have non-standard properties
:PROPERTIES:
:results: silent
:END:
#+srcname: test-implement-silent
#+begin_src emacs-lisp
(+ 1 3)
#+end_src
** DONE add =:tangle= family of header arguments
values are
- no :: don't include source-code block when tangling

View File

@ -90,13 +90,3 @@ plus_two(holder)
#+begin_src emacs-lisp :tangle no
(setq test-tangle-i-should-not-exist "hopefully I'm not included")
#+end_src
*** Emacs Lisp (not to be tangled)
:PROPERTIES:
:tangle: no
:END:
#+srcname: i-also-shouldnt-be-tangled
#+begin_src emacs-lisp
(setq test-tangle-me-either "i also shouldn't be tangled")
#+end_src