Re: [O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
> Kyle Meyer writes: KM> "Samuel W. Flint" writes: [...] >>> In your org-babel-do-load-languages call, try to changing >>> >>> (sh . t) >>> >>> to >>> >>> (shell . t) >>> >>> -- Kyle >>> >>> >> >> I went ahead and tried that. I still get that error. KM> Hmm, and that was after Emacs was restarted? Nope. Should have thought of that. Figures. That'll probably be all that it is. Thanks. Sam KM> Here is why I suggested that. As of Org 8.2, ob-sh was renamed to KM> ob-shell. The NEWS file contained this: KM> *** =ob-sh.el= renamed to =ob-shell= This may require two KM> changes in user config. KM> 1. In =org-babel-do-load-languages=, change =(sh . t)= to KM> =(shell . t)=. 2. Edit =local.mk= files to change the value of KM> =BTEST_OB_LANGUAGES= to remove "sh" and include "shell". KM> If you didn't do this (as I didn't), you wouldn't necessarily KM> notice, because org-babel-do-load-languages ends up loading the old KM> ob-sh.el that ships with Emacs. As the builtin ob-sh.el and babel KM> diverged, there were very likely subtle and perhaps not-so-subtle KM> bugs, but the blocks would execute until recently. Execution now KM> fails because org-babel-get-header was removed in 0d000f5 (babel: KM> small change in API., 2015-10-29), but the old ob-sh.el is still KM> trying to call it. KM> Based on the configuration you included, you do need to change (sh KM> . t) to (shell . t), but perhaps there is still some other issue KM> going on. If a restart with the previous suggestion doesn't fix it, KM> please try to put together a minimal Org file and configuration that KM> will reproduce the issue with emacs -Q. KM> -- Kyle -- Samuel W. Flint 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4) (λs.s s) λs.s s signature.asc Description: PGP signature
Re: [O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
"Samuel W. Flint" writes: > On Thu, November 12, 2015 11:36 am, Kyle Meyer wrote: >> Hello, >> >> swfl...@flintfam.org (Samuel W. Flint) writes: >> >>> Hey all! >>> >>> In an attempt to keep my config file organized, I've been using org. As >>> of a fairly recent update, when I tangle the document (C-c C-v C-t), I >>> get the following error "Symbol's function definition is void: >>> org-babel-get-header". I have no idea why this is happening. I've >>> attached a backtrace. >>> >>> TIA, >>> >>> Sam >> >> In your org-babel-do-load-languages call, try to changing >> >> (sh . t) >> >> to >> >> (shell . t) >> >> -- >> Kyle >> >> > > I went ahead and tried that. I still get that error. > I don't know what the underlying cause might be, but you might be able to cure the symptom by doing M-x load-library RET ob-core RET which is where org-babel-get-header is defined. If that works, then it's likely that a (require 'ob-core) is missing somewhere. -- Nick
Re: [O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
"Samuel W. Flint" writes: [...] >> In your org-babel-do-load-languages call, try to changing >> >> (sh . t) >> >> to >> >> (shell . t) >> >> -- >> Kyle >> >> > > I went ahead and tried that. I still get that error. Hmm, and that was after Emacs was restarted? Here is why I suggested that. As of Org 8.2, ob-sh was renamed to ob-shell. The NEWS file contained this: *** =ob-sh.el= renamed to =ob-shell= This may require two changes in user config. 1. In =org-babel-do-load-languages=, change =(sh . t)= to =(shell . t)=. 2. Edit =local.mk= files to change the value of =BTEST_OB_LANGUAGES= to remove "sh" and include "shell". If you didn't do this (as I didn't), you wouldn't necessarily notice, because org-babel-do-load-languages ends up loading the old ob-sh.el that ships with Emacs. As the builtin ob-sh.el and babel diverged, there were very likely subtle and perhaps not-so-subtle bugs, but the blocks would execute until recently. Execution now fails because org-babel-get-header was removed in 0d000f5 (babel: small change in API., 2015-10-29), but the old ob-sh.el is still trying to call it. Based on the configuration you included, you do need to change (sh . t) to (shell . t), but perhaps there is still some other issue going on. If a restart with the previous suggestion doesn't fix it, please try to put together a minimal Org file and configuration that will reproduce the issue with emacs -Q. -- Kyle
Re: [O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
On Thu, November 12, 2015 11:36 am, Kyle Meyer wrote: > Hello, > > swfl...@flintfam.org (Samuel W. Flint) writes: > >> Hey all! >> >> In an attempt to keep my config file organized, I've been using org. As >> of a fairly recent update, when I tangle the document (C-c C-v C-t), I >> get the following error "Symbol's function definition is void: >> org-babel-get-header". I have no idea why this is happening. I've >> attached a backtrace. >> >> TIA, >> >> Sam > > In your org-babel-do-load-languages call, try to changing > > (sh . t) > > to > > (shell . t) > > -- > Kyle > > I went ahead and tried that. I still get that error. Thanks, Sam
Re: [O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
Hello, swfl...@flintfam.org (Samuel W. Flint) writes: > Hey all! > > In an attempt to keep my config file organized, I've been using org. As > of a fairly recent update, when I tangle the document (C-c C-v C-t), I > get the following error "Symbol's function definition is void: > org-babel-get-header". I have no idea why this is happening. I've > attached a backtrace. > > TIA, > > Sam In your org-babel-do-load-languages call, try to changing (sh . t) to (shell . t) -- Kyle
[O] Bug: org-babel-tangle error. org-babel-get-header undefined [8.3.2 (release_8.3.2-317-gbd921f @ /home/swflint/.emacs.d/org-mode/lisp/)]
Hey all! In an attempt to keep my config file organized, I've been using org. As of a fairly recent update, when I tangle the document (C-c C-v C-t), I get the following error "Symbol's function definition is void: org-babel-get-header". I have no idea why this is happening. I've attached a backtrace. TIA, Sam signature.asc Description: PGP signature Debugger entered--Lisp error: (void-function org-babel-get-header) (org-babel-get-header params :var) (mapcar (function cdr) (org-babel-get-header params :var)) (mapcar (function (lambda (pair) (format "%s=%s" (car pair) (org-babel-sh-var-to-sh (cdr pair) sep (mapcar (function cdr) (org-babel-get-header params :var))) (let ((sep (cdr (assoc :separator params (mapcar (function (lambda (pair) (format "%s=%s" (car pair) (org-babel-sh-var-to-sh (cdr pair) sep (mapcar (function cdr) (org-babel-get-header params :var org-babel-variable-assignments:sh(((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "noweb") (:shebang . "#!/bin/zsh") (:cache . "no") (:padline . "") (:noweb . "tangle") (:tangle . "~/bin/ediff") (:exports . "code") (:results . "replace") (:tangle-mode . 493) (:hlines . "no") (:session . "none"))) funcall(org-babel-variable-assignments:sh ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:comments . "noweb") (:shebang . "#!/bin/zsh") (:cache . "no") (:padline . "") (:noweb . "tangle") (:tangle . "~/bin/ediff") (:exports . "code") (:results . "replace") (:tangle-mode . 493) (:hlines . "no") (:session . "none"))) (and (fboundp assignments-cmd) (funcall assignments-cmd params)) (org-babel-expand-body:generic body params (and (fboundp assignments-cmd) (funcall assignments-cmd params))) (if (fboundp expand-cmd) (funcall expand-cmd body params) (org-babel-expand-body:generic body params (and (fboundp assignments-cmd) (funcall assignments-cmd params (if (assoc :no-expand params) body (if (fboundp expand-cmd) (funcall expand-cmd body params) (org-babel-expand-body:generic body params (and (fboundp assignments-cmd) (funcall assignments-cmd params) (let* ((body (if (org-babel-noweb-p params :tangle) (org-babel-expand-noweb-references info) (nth 1 info))) (body (if (assoc :no-expand params) body (if (fboundp expand-cmd) (funcall expand-cmd body params) (org-babel-expand-body:generic body params (and (fboundp assignments-cmd) (funcall assignments-cmd params))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert body) (if (string-match "-r" extra) (progn (goto-char ...) (while ... ...))) (run-hooks (quote org-babel-tangle-body-hook)) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)) (let* ((info (org-babel-get-src-block-info)) (start-line (save-restriction (widen) (+ 1 (line-number-at-pos (point) (file (buffer-file-name (buffer-base-buffer))) (src-lang (nth 0 info)) (params (nth 2 info)) (extra (nth 3 info)) (cref-fmt (or (and (string-match "-l \"\\(.+\\)\"" extra) (match-string 1 extra)) org-coderef-label-format)) (link (let ((link (org-no-properties (org-store-link nil (and (string-match org-bracket-link-regexp link) (match-string 1 link (source-name (intern (or (nth 4 info) (format "%s:%d" (or (condition-case nil ... ...) "No heading") block-counter (expand-cmd (intern (concat "org-babel-expand-body:" src-lang))) (assignments-cmd (intern (concat "org-babel-variable-assignments:" src-lang))) (body (let* ((body (if (org-babel-noweb-p params :tangle) (org-babel-expand-noweb-references info) (nth 1 info))) (body (if (assoc :no-expand params) body (if ... ... ... (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...)) (comment (if (or (string= "both" (cdr (assoc :comments params))) (string= "org" (cdr (assoc :comments params (progn (funcall org-babel-process-comment-text (buffer-substring (max ... ...) (point)) (result (list start-line file link source-name params body comment))) (if only-this-block (list (cons src-lang (list result))) result)) org-babel-tangle-single-block(1) (let ((by-lang (assoc src-lang blocks)) (block (org-babel-tangle-single-block counter))) (if by-lang (setcdr by-lang (cons block (cdr by-lang))) (setq blocks (cons (cons src-lang (list block)) blocks (if (or (string= (cdr (assq :tangle (nth 2 info))) "no") (and tangle-file (not (equal tangle-file src-tfile))) (and language (not (string= language src-lang nil (let ((by-lang (assoc src-lang blocks)) (block (org-babel-tangle-single-block counter))) (if by-lang (setcdr by-lang (cons block (cdr by-lang))) (setq blocks (cons (cons src-lang (list block)) blocks) (let* ((info (org-babel-get-src-block-info (quote light))) (src-lang (nth 0 info)) (src-tfile (