* [bug] void-function org-babel-named-data-regexp-for-name
@ 2011-12-02 9:02 Sebastien Vauban
2011-12-03 14:46 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: Sebastien Vauban @ 2011-12-02 9:02 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
When exporting a document containing calls to code blocks located in my LOB
(here: `vc-indicator'), I have -- with latest Org version -- a new problem (I
mean, it wasn't there a couple of days ago):
Debugger entered--Lisp error: (void-function org-babel-named-data-regexp-for-name)
It seems to me that there is a missing (require 'ob) in org-export (?).
Loading manually `ob.el' does solve that particular problem.
Best regards,
Seb
#+begin_src text
Debugger entered--Lisp error: (void-function org-babel-named-data-regexp-for-name)
(org-babel-named-data-regexp-for-name ref)
(let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel)))))
(if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref))
(save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or (looking-at org-babel-src-block-regexp) (looking-at org-babel-multi-line-header-regexp)))) (setq type (quote source-block))) (t (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"))))) (let ((params (append args (quote ((:results . "silent")))))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil params))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result)))
(let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 (match-beginning 0)))) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar (lambda (ref) (cons :var ref)) (org-babel-ref-split-args new-referent)))) (when (> (length new-header-args) 0) (setq args (append (org-babel-parse-header-arguments new-header-args) args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc ... org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or (looking-at org-babel-src-block-regexp) (looking-at org-babel-multi-line-header-regexp)))) (setq type (quote source-block))) (t (while (not (setq type (org-babel-ref-at-ref-p))) (forward-line 1) (beginning-of-line) (if (or (= ... ...) (= ... ...)) (error "reference not found"))))) (let ((params (append args (quote (...))))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil params))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))
(save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 ...))) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar (lambda ... ...) (org-babel-ref-split-args new-referent)))) (when (> (length new-header-args) 0) (setq args (append (org-babel-parse-header-arguments new-header-args) args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr ...)))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or ... ...))) (setq type (quote source-block))) (t (while (not (setq type ...)) (forward-line 1) (beginning-of-line) (if (or ... ...) (error "reference not found"))))) (let ((params (append args (quote ...)))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil ...)) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result)))))
(progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str ...)) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar ... ...))) (when (> (length new-header-args) 0) (setq args (append ... args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx ...) (res-rx ...)) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id ...) (setq lob-info ...))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion ... ...)) (setq type (quote source-block))) (t (while (not ...) (forward-line 1) (beginning-of-line) (if ... ...)))) (let ((params (append args ...))) (setq result (case type (results-line ...) (table ...) (list ...) (file ...) (source-block ...) (lob ...) (id ...)))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))))
(unwind-protect (progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let (...) (= ... ...))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> ... 0) (setq args ...)) (when (> ... 0) (setq args ...)) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let (... ...) (or ... ... ... ...)) (unless (or lob-info id) (goto-char ...)) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type ...)) (id (setq type ...)) ((and ... ...) (setq type ...)) (t (while ... ... ... ...))) (let ((params ...)) (setq result (case type ... ... ... ... ... ... ...))) (if (symbolp result) (format "%S" result) (if (and index ...) (org-babel-ref-index-list index result) result)))))) (set-window-configuration wconfig))
(let ((wconfig (current-window-configuration))) (unwind-protect (progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ... ...)) (setq index (match-string 1 ref)) (setq ref (substring ref 0 ...))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> ... 0) (when ... ...) (when ... ...) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ... ...) (unless ... ...) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info ...) (id ...) (... ...) (t ...)) (let (...) (setq result ...)) (if (symbolp result) (format "%S" result) (if ... ... result)))))) (set-window-configuration wconfig)))
(save-window-excursion (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str ...)) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar ... ...))) (when (> (length new-header-args) 0) (setq args (append ... args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx ...) (res-rx ...)) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id ...) (setq lob-info ...))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion ... ...)) (setq type (quote source-block))) (t (while (not ...) (forward-line 1) (beginning-of-line) (if ... ...)))) (let ((params (append args ...))) (setq result (case type (results-line ...) (table ...) (list ...) (file ...) (source-block ...) (lob ...) (id ...)))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))))
org-babel-ref-resolve("vc-indicator()")
#+end_src
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug] void-function org-babel-named-data-regexp-for-name
2011-12-02 9:02 [bug] void-function org-babel-named-data-regexp-for-name Sebastien Vauban
@ 2011-12-03 14:46 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2011-12-03 14:46 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: emacs-orgmode
Hi Seb,
The `org-babel-named-data-regexp-for-name' function is called by
ob-ref.el which *does* require ob.el. I'm not sure why this require
isn't being run on your system.
Could you try a make clean and then restarting Emacs and see if the
problem was caused by old inconsistent .elc files?
Thanks,
"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
> Hello,
>
> When exporting a document containing calls to code blocks located in my LOB
> (here: `vc-indicator'), I have -- with latest Org version -- a new problem (I
> mean, it wasn't there a couple of days ago):
>
> Debugger entered--Lisp error: (void-function org-babel-named-data-regexp-for-name)
>
> It seems to me that there is a missing (require 'ob) in org-export (?).
>
> Loading manually `ob.el' does solve that particular problem.
>
> Best regards,
> Seb
>
> #+begin_src text
> Debugger entered--Lisp error: (void-function org-babel-named-data-regexp-for-name)
> (org-babel-named-data-regexp-for-name ref)
> (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel)))))
> (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref))
> (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or (looking-at org-babel-src-block-regexp) (looking-at org-babel-multi-line-header-regexp)))) (setq type (quote source-block))) (t (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"))))) (let ((params (append args (quote ((:results . "silent")))))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil params))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result)))
> (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 (match-beginning 0)))) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar (lambda (ref) (cons :var ref)) (org-babel-ref-split-args new-referent)))) (when (> (length new-header-args) 0) (setq args (append (org-babel-parse-header-arguments new-header-args) args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr (assoc ... org-babel-library-of-babel))))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or (looking-at org-babel-src-block-regexp) (looking-at org-babel-multi-line-header-regexp)))) (setq type (quote source-block))) (t (while (not (setq type (org-babel-ref-at-ref-p))) (forward-line 1) (beginning-of-line) (if (or (= ... ...) (= ... ...)) (error "reference not found"))))) (let ((params (append args (quote (...))))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil params))) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))
> (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 ...))) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar (lambda ... ...) (org-babel-ref-split-args new-referent)))) (when (> (length new-header-args) 0) (setq args (append (org-babel-parse-header-arguments new-header-args) args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx (org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id ref)) (setq lob-info (cdr ...)))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion (forward-line 1) (or ... ...))) (setq type (quote source-block))) (t (while (not (setq type ...)) (forward-line 1) (beginning-of-line) (if (or ... ...) (error "reference not found"))))) (let ((params (append args (quote ...)))) (setq result (case type (results-line (org-babel-read-result)) (table (org-babel-read-table)) (list (org-babel-read-list)) (file (org-babel-read-link)) (source-block (org-babel-execute-src-block nil nil ...)) (lob (org-babel-execute-src-block nil lob-info params)) (id (org-babel-ref-headline-body))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result)))))
> (progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str ...)) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar ... ...))) (when (> (length new-header-args) 0) (setq args (append ... args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx ...) (res-rx ...)) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id ...) (setq lob-info ...))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion ... ...)) (setq type (quote source-block))) (t (while (not ...) (forward-line 1) (beginning-of-line) (if ... ...)))) (let ((params (append args ...))) (setq result (case type (results-line ...) (table ...) (list ...) (file ...) (source-block ...) (lob ...) (id ...)))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))))
> (unwind-protect (progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let (...) (= ... ...))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> ... 0) (setq args ...)) (when (> ... 0) (setq args ...)) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let (... ...) (or ... ... ... ...)) (unless (or lob-info id) (goto-char ...)) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type ...)) (id (setq type ...)) ((and ... ...) (setq type ...)) (t (while ... ... ... ...))) (let ((params ...)) (setq result (case type ... ... ... ... ... ... ...))) (if (symbolp result) (format "%S" result) (if (and index ...) (org-babel-ref-index-list index result) result)))))) (set-window-configuration wconfig))
> (let ((wconfig (current-window-configuration))) (unwind-protect (progn (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ... ...)) (setq index (match-string 1 ref)) (setq ref (substring ref 0 ...))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> ... 0) (when ... ...) (when ... ...) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ... ...) (unless ... ...) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info ...) (id ...) (... ...) (t ...)) (let (...) (setq result ...)) (if (symbolp result) (format "%S" result) (if ... ... result)))))) (set-window-configuration wconfig)))
> (save-window-excursion (save-excursion (let ((case-fold-search t) type args new-refere new-header-args new-referent result lob-info split-file split-ref index index-row index-col id) (when (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ((str ...)) (= (org-count 40 str) (org-count 41 str)))) (setq index (match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0)))) (when (string-match "^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (setq new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) (setq new-referent (match-string 5 ref)) (when (> (length new-refere) 0) (when (> (length new-referent) 0) (setq args (mapcar ... ...))) (when (> (length new-header-args) 0) (setq args (append ... args))) (setq ref new-refere))) (when (string-match "^\\(.+\\):\\(.+\\)$" ref) (setq split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref)) (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx ...) (res-rx ...)) (or (re-search-forward src-rx nil t) (re-search-forward res-rx nil t) (setq id ...) (setq lob-info ...))) (unless (or lob-info id) (goto-char (match-beginning 0))) (error "reference '%s' not found in this buffer" ref)) (cond (lob-info (setq type (quote lob))) (id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion ... ...)) (setq type (quote source-block))) (t (while (not ...) (forward-line 1) (beginning-of-line) (if ... ...)))) (let ((params (append args ...))) (setq result (case type (results-line ...) (table ...) (list ...) (file ...) (source-block ...) (lob ...) (id ...)))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) (org-babel-ref-index-list index result) result))))))
> org-babel-ref-resolve("vc-indicator()")
> #+end_src
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-03 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 9:02 [bug] void-function org-babel-named-data-regexp-for-name Sebastien Vauban
2011-12-03 14:46 ` Eric Schulte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).