浏览代码

removing debugging statements from org-babel-ref.el

Eric Schulte 16 年之前
父节点
当前提交
7d1cbd43ea
共有 1 个文件被更改,包括 14 次插入16 次删除
  1. 14 16
      lisp/org-babel-ref.el

+ 14 - 16
lisp/org-babel-ref.el

@@ -89,7 +89,6 @@ return nil."
 (defun org-babel-ref-resolve-reference (ref)
   "Resolve the reference and return it's value"
   (save-excursion
-    (message "processing ref %S from %d" ref (point))
     (let ((case-fold-search t)
           type args new-refere new-referent result)
       ;; assign any arguments to pass to source block
@@ -107,27 +106,26 @@ return nil."
         (setf ref (match-string 2 ref)))
       (goto-char (point-min))
       (if (let ((result_regexp (concat "^#\\+\\(TBL\\|RES\\)NAME:[ \t]*"
-                                           (regexp-quote ref) "[ \t]*$"))
-                    (regexp (concat "^#\\+SRCNAME:[ \t]*"
-                                    (regexp-quote ref) "[ \t]*$")))
-                (or (re-search-forward result_regexp nil t)
-                    (re-search-forward result_regexp nil t)
-                    (re-search-forward regexp nil t)
-                    (re-search-backward regexp nil t)))
+                                       (regexp-quote ref) "[ \t]*$"))
+                (regexp (concat "^#\\+SRCNAME:[ \t]*"
+                                (regexp-quote ref) "[ \t]*$")))
+            (or (re-search-forward result_regexp nil t)
+                (re-search-forward result_regexp nil t)
+                (re-search-forward regexp nil t)
+                (re-search-backward regexp nil t)))
           (goto-char (match-beginning 0))
-          ;; ;; TODO: allow searching for names in other buffers
-          ;; (setq id-loc (org-id-find ref 'marker)
-          ;;       buffer (marker-buffer id-loc)
-          ;;       loc (marker-position id-loc))
-          ;; (move-marker id-loc nil)
-          (progn (message (format "reference '%s' not found in this buffer" ref))
-                 (error (format "reference '%s' not found in this buffer" ref))))
+        ;; ;; TODO: allow searching for names in other buffers
+        ;; (setq id-loc (org-id-find ref 'marker)
+        ;;       buffer (marker-buffer id-loc)
+        ;;       loc (marker-position id-loc))
+        ;; (move-marker id-loc nil)
+        (progn (message (format "reference '%s' not found in this buffer" ref))
+               (error (format "reference '%s' not found in this buffer" ref))))
       (while (not (setq type (org-babel-ref-at-ref-p)))
         (forward-line 1)
         (beginning-of-line)
         (if (or (= (point) (point-min)) (= (point) (point-max)))
             (error "reference not found")))
-      (message "type=%S point=%d" type (point))
       (case type
         ('results-line (org-babel-ref-read-result))
         ('table (org-babel-ref-read-table))