org-babel: now using #+results instead of #+resname

"results" is now an acceptable alias for "resname".  Org-babel
    will begin inserting results using the "results" option however
    either option will remain viable moving forward.
This commit is contained in:
Eric Schulte 2009-11-18 11:42:43 -07:00
parent f4f38bd33a
commit 2f8d30a578
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ return nil."
(setq split-ref (match-string 2 ref))
(find-file split-file) (setq ref split-ref))
(goto-char (point-min))
(if (let ((result_regexp (concat "^#\\+\\(TBL\\|RES\\)NAME:[ \t]*"
(if (let ((result_regexp (concat "^#\\+\\(TBLNAME\\|RESNAME\\|RESULT\\):[ \t]*"
(regexp-quote ref) "[ \t]*$"))
(regexp (concat "^#\\+SRCNAME:[ \t]*"
(regexp-quote ref) "\\(\(.*\)\\)?" "[ \t]*$")))

View File

@ -94,7 +94,7 @@ then run `org-babel-pop-to-session'."
"Regexp used to test when on an inline org-babel src-block")
(defvar org-babel-result-regexp
"#\\+resname\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:"
"#\\+res\\(ults\\|name\\)\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:"
"Regular expressions used to match result lines. If the
results are associated with a hash key then the hash will be
saved in the second match data.")
@ -553,7 +553,7 @@ following the source block."
;; or (with optional insert) back up and make one ourselves
(when insert
(goto-char end) (forward-char 1)
(insert (concat "#+resname" (if hash (concat "["hash"]"))
(insert (concat "#+results" (if hash (concat "["hash"]"))
":"(if name (concat " " name)) "\n"))
(move-beginning-of-line 0)
(if hash (org-babel-hide-hash)) t)))