mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 22:02:52 +00:00
org-babel: make :file header arg imply :results file
This commit is contained in:
parent
7c32bc5672
commit
10ea3ad10b
|
@ -655,7 +655,11 @@ non-nil."
|
||||||
elements of PLISTS override the values of previous element. This
|
elements of PLISTS override the values of previous element. This
|
||||||
takes into account some special considerations for certain
|
takes into account some special considerations for certain
|
||||||
parameters when merging lists."
|
parameters when merging lists."
|
||||||
(let (params results exports tangle vars var ref)
|
(let ((results-exclusive-groups
|
||||||
|
'(("file" "vector" "scalar" "raw" "org" "html" "latex")
|
||||||
|
("replace" "silent")
|
||||||
|
("output" "value")))
|
||||||
|
params results exports tangle vars var ref)
|
||||||
(flet ((e-merge (exclusive-groups &rest result-params)
|
(flet ((e-merge (exclusive-groups &rest result-params)
|
||||||
;; maintain exclusivity of mutually exclusive parameters
|
;; maintain exclusivity of mutually exclusive parameters
|
||||||
(let (output)
|
(let (output)
|
||||||
|
@ -682,11 +686,12 @@ parameters when merging lists."
|
||||||
ref (match-string 2 (cdr pair))
|
ref (match-string 2 (cdr pair))
|
||||||
vars (cons (cons var ref) (assq-delete-all var vars)))))
|
vars (cons (cons var ref) (assq-delete-all var vars)))))
|
||||||
(:results
|
(:results
|
||||||
(setq results (e-merge
|
(setq results
|
||||||
'(("file" "vector" "scalar" "raw" "org" "html" "latex")
|
(e-merge results-exclusive-groups results (split-string (cdr pair)))))
|
||||||
("replace" "silent")
|
(:file
|
||||||
("output" "value"))
|
(when (cdr pair)
|
||||||
results (split-string (cdr pair)))))
|
(setq results (e-merge results-exclusive-groups results '("file")))
|
||||||
|
(setq params (cons pair (assq-delete-all (car pair) params)))))
|
||||||
(:exports
|
(:exports
|
||||||
(setq exports (e-merge '(("code" "results" "both" "none"))
|
(setq exports (e-merge '(("code" "results" "both" "none"))
|
||||||
exports (split-string (cdr pair)))))
|
exports (split-string (cdr pair)))))
|
||||||
|
|
Loading…
Reference in a new issue