emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [bug] void-function org-babel-named-data-regexp-for-name
Date: Fri, 02 Dec 2011 10:02:08 +0100	[thread overview]
Message-ID: <80ty5j73e7.fsf@somewhere.org> (raw)

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

             reply	other threads:[~2011-12-02  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  9:02 Sebastien Vauban [this message]
2011-12-03 14:46 ` [bug] void-function org-babel-named-data-regexp-for-name Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80ty5j73e7.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).