فهرست منبع

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.
Eric Schulte 15 سال پیش
والد
کامیت
2f8d30a578
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      contrib/babel/lisp/org-babel-ref.el
  2. 2 2
      contrib/babel/lisp/org-babel.el

+ 1 - 1
contrib/babel/lisp/org-babel-ref.el

@@ -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]*$")))

+ 2 - 2
contrib/babel/lisp/org-babel.el

@@ -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)))