[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Bug: can not evaluate any code blocks after enabling additional lang
From: |
Rainer M Krug |
Subject: |
[O] Bug: can not evaluate any code blocks after enabling additional languages [8.3.4 (release_8.3.4-639-gd5a603 @ /Users/rainerkrug/.emacs.d/elpa/25.0/org-20151005/)] |
Date: |
Thu, 10 Mar 2016 12:44:16 +0100 |
User-agent: |
Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.92.1 (x86_64-apple-darwin15.3.0) |
* Configuration
Org-mode version 8.3.4 (release_8.3.4-639-gd5a603 @
/Users/rainerkrug/.emacs.d/elpa/25.0/org-20151005/)
GNU Emacs 25.0.92.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34 Version
10.11.3 (Build 15D21)) of 2016-03-07
init.el:
,----
| (setq package-user-dir (concat "~/.emacs.d/elpa/"
| ;; if we use emacs-version we get a
| ;; LOT of pre-release directories.
| (int-to-string emacs-major-version)
| "."
| (int-to-string emacs-minor-version)))
| (add-to-list 'Info-default-directory-list "~/.emacs.d/ess/doc")
| (add-to-list 'Info-default-directory-list "~/.emacs.d/org-mode/doc")
| (defadvice desktop-restore-file-buffer
| (around my-desktop-restore-file-buffer-advice)
| "Be non-interactive while starting a daemon."
| (if (and (daemonp)
| (not server-process))
| (let ((noninteractive t))
| ad-do-it)
| ad-do-it))
| (ad-activate 'desktop-restore-file-buffer)
|
|
| (add-to-list 'load-path "~/.emacs.d/org-mode/lisp")
| (add-to-list 'load-path "~/.emacs.d/org-mode/contrib/lisp")
| (require 'org)
|
| (setq package-archives '(
| ("ELPA" . "http://tromey.com/elpa/")
| ("Melpa" . "http://melpa.org/packages/")
| ("org" . "http://orgmode.org/elpa/")
| ("gnu" . "http://elpa.gnu.org/packages/")))
|
| (require 'package)
| (package-initialize)
|
| (unless (package-installed-p 'use-package)
| (package-refresh-contents)
| (package-install 'use-package))
| (setq use-package-verbose t)
| (require 'use-package)
| (setq use-package-verbose t)
`----
* The problem
This works:
#+begin_src emacs-lisp
(message "4")
#+end_src
#+RESULTS:
: 4
Let's enable some more languages:
#+begin_src emacs-lisp
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . nil)
(R . t)
(sh . t)))
#+end_src
#+RESULTS:
And try again:
#+begin_src emacs-lisp
(message "4")
#+end_src
Debugger message:
Debugger entered--Lisp error: (void-function org-babel-get-header)
org-babel-get-header(((:colname-names) (:rowname-names) (:result-params
"replace" "replace") (:result-type . value) (:comments . "") (:shebang . "")
(:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports .
"code") (:results . "replace") (:session . "none") (:hlines . "no")) :var)
org-babel-variable-assignments:sh(((:colname-names) (:rowname-names)
(:result-params "replace" "replace") (:result-type . value) (:comments . "")
(:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle .
"no") (:exports . "code") (:results . "replace") (:session . "none") (:hlines .
"no")))
org-babel-execute:sh("echo 4" ((:colname-names) (:rowname-names)
(:result-params "replace" "replace") (:result-type . value) (:comments . "")
(:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle .
"no") (:exports . "code") (:results . "replace") (:session . "none") (:hlines .
"no")))
funcall(org-babel-execute:sh "echo 4" ((:colname-names) (:rowname-names)
(:result-params "replace" "replace") (:result-type . value) (:comments . "")
(:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle .
"no") (:exports . "code") (:results . "replace") (:session . "none") (:hlines .
"no")))
(let ((result (funcall cmd body params))) (if (and (eq (cdr (assoc
:result-type params)) (quote value)) (or (member "vector" result-params)
(member "table" result-params)) (not (listp result))) (list (list result))
result))
(setq result (let ((result (funcall cmd body params))) (if (and (eq (cdr
(assoc :result-type params)) (quote value)) (or (member "vector" result-params)
(member "table" result-params)) (not (listp result))) (list (list result))
result)))
(if (member "none" result-params) (progn (funcall cmd body params) (message
"result silenced") (setq result nil)) (setq result (let ((result (funcall cmd
body params))) (if (and (eq (cdr (assoc :result-type params)) (quote value))
(or (member "vector" result-params) (member "table" result-params)) (not (listp
result))) (list (list result)) result))) (if (cdr (assoc :file params)) (progn
(if result (progn (let ((temp-file ...) (temp-buffer ...)) (unwind-protect
(prog1 ... ...) (and ... ...))))) (setq result (cdr (assoc :file params)))))
(if (cdr (assoc :post params)) (progn (let ((*this* (if (cdr ...)
(org-babel-result-to-file ... ...) result))) (setq result
(org-babel-ref-resolve (cdr (assoc :post params)))) (if (cdr (assoc :file
params)) (progn (setq result-params (remove "file" result-params)))))))
(org-babel-insert-result result result-params info new-hash lang))
(let* ((lang (nth 0 info)) (result-params (cdr (assoc :result-params
params))) (body (let* ((c (nthcdr 1 info))) (setcar c (if (org-babel-noweb-p
params :eval) (org-babel-expand-noweb-references info) (nth 1 info))))) (dir
(cdr (assoc :dir params))) (default-directory (or (and dir
(file-name-as-directory (expand-file-name dir))) default-directory)) (cmd
(intern (concat "org-babel-execute:" lang))) result) (if (fboundp cmd) nil
(error "No org-babel-execute function for %s!" lang)) (message "executing %s
code block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" (nth 4
info)) "")) (if (member "none" result-params) (progn (funcall cmd body params)
(message "result silenced") (setq result nil)) (setq result (let ((result
(funcall cmd body params))) (if (and (eq (cdr ...) (quote value)) (or (member
"vector" result-params) (member "table" result-params)) (not (listp result)))
(list (list result)) result))) (if (cdr (assoc :file params)) (progn (if result
(progn (let (... ...) (unwind-protect ... ...)))) (setq result (cdr (assoc
:file params))))) (if (cdr (assoc :post params)) (progn (let ((*this* (if ...
... result))) (setq result (org-babel-ref-resolve (cdr ...))) (if (cdr (assoc
:file params)) (progn (setq result-params ...)))))) (org-babel-insert-result
result result-params info new-hash lang)) (run-hooks (quote
org-babel-after-execute-hook)) result)
(cond (cache-current-p (save-excursion (goto-char
(org-babel-where-is-src-block-result nil info)) (forward-line)
(skip-chars-forward " ") (let ((result (org-babel-read-result)))
(message (replace-regexp-in-string "%" "%%" (format "%S" result))) result)))
((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params
(cdr (assoc :result-params params))) (body (let* ((c ...)) (setcar c (if ...
... ...)))) (dir (cdr (assoc :dir params))) (default-directory (or (and dir
(file-name-as-directory ...)) default-directory)) (cmd (intern (concat
"org-babel-execute:" lang))) result) (if (fboundp cmd) nil (error "No
org-babel-execute function for %s!" lang)) (message "executing %s code
block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" (nth 4 info))
"")) (if (member "none" result-params) (progn (funcall cmd body params)
(message "result silenced") (setq result nil)) (setq result (let ((result ...))
(if (and ... ... ...) (list ...) result))) (if (cdr (assoc :file params))
(progn (if result (progn ...)) (setq result (cdr ...)))) (if (cdr (assoc :post
params)) (progn (let (...) (setq result ...) (if ... ...))))
(org-babel-insert-result result result-params info new-hash lang)) (run-hooks
(quote org-babel-after-execute-hook)) result)))
(let* ((params (nth 2 info)) (cachep (and (not arg) (cdr (assoc :cache
params)) (string= "yes" (cdr (assoc :cache params))))) (new-hash (if cachep
(progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn
(org-babel-current-result-hash)))) (cache-current-p (and (not arg) new-hash
(equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char
(org-babel-where-is-src-block-result nil info)) (forward-line)
(skip-chars-forward " ") (let ((result (org-babel-read-result))) (message
(replace-regexp-in-string "%" "%%" (format "%S" result))) result)))
((org-babel-confirm-evaluate info) (let* ((lang (nth 0 info)) (result-params
(cdr (assoc :result-params params))) (body (let* (...) (setcar c ...))) (dir
(cdr (assoc :dir params))) (default-directory (or (and dir ...)
default-directory)) (cmd (intern (concat "org-babel-execute:" lang))) result)
(if (fboundp cmd) nil (error "No org-babel-execute function for %s!" lang))
(message "executing %s code block%s..." (capitalize lang) (if (nth 4 info)
(format " (%s)" (nth 4 info)) "")) (if (member "none" result-params) (progn
(funcall cmd body params) (message "result silenced") (setq result nil)) (setq
result (let (...) (if ... ... result))) (if (cdr (assoc :file params)) (progn
(if result ...) (setq result ...))) (if (cdr (assoc :post params)) (progn (let
... ... ...))) (org-babel-insert-result result result-params info new-hash
lang)) (run-hooks (quote org-babel-after-execute-hook)) result))))
(progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car
c)))) (let* ((params (nth 2 info)) (cachep (and (not arg) (cdr (assoc :cache
params)) (string= "yes" (cdr (assoc :cache params))))) (new-hash (if cachep
(progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn
(org-babel-current-result-hash)))) (cache-current-p (and (not arg) new-hash
(equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char
(org-babel-where-is-src-block-result nil info)) (forward-line)
(skip-chars-forward " ") (let ((result ...)) (message
(replace-regexp-in-string "%" "%%" ...)) result))) ((org-babel-confirm-evaluate
info) (let* ((lang (nth 0 info)) (result-params (cdr ...)) (body (let* ...
...)) (dir (cdr ...)) (default-directory (or ... default-directory)) (cmd
(intern ...)) result) (if (fboundp cmd) nil (error "No org-babel-execute
function for %s!" lang)) (message "executing %s code block%s..." (capitalize
lang) (if (nth 4 info) (format " (%s)" ...) "")) (if (member "none"
result-params) (progn (funcall cmd body params) (message "result silenced")
(setq result nil)) (setq result (let ... ...)) (if (cdr ...) (progn ... ...))
(if (cdr ...) (progn ...)) (org-babel-insert-result result result-params info
new-hash lang)) (run-hooks (quote org-babel-after-execute-hook)) result)))))
(if (org-babel-check-evaluate info) (progn (let* ((c (nthcdr 2 info)))
(setcar c (org-babel-process-params (car c)))) (let* ((params (nth 2 info))
(cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr ...))))
(new-hash (if cachep (progn (org-babel-sha1-hash info)))) (old-hash (if cachep
(progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg)
new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion
(goto-char (org-babel-where-is-src-block-result nil info)) (forward-line)
(skip-chars-forward " ") (let (...) (message ...) result)))
((org-babel-confirm-evaluate info) (let* ((lang ...) (result-params ...) (body
...) (dir ...) (default-directory ...) (cmd ...) result) (if (fboundp cmd) nil
(error "No org-babel-execute function for %s!" lang)) (message "executing %s
code block%s..." (capitalize lang) (if ... ... "")) (if (member "none"
result-params) (progn ... ... ...) (setq result ...) (if ... ...) (if ... ...)
(org-babel-insert-result result result-params info new-hash lang)) (run-hooks
(quote org-babel-after-execute-hook)) result))))))
(let* ((org-babel-current-src-block-location (or
org-babel-current-src-block-location (nth 5 info)
(org-babel-where-is-src-block-head))) (info (if info (copy-tree info)
(org-babel-get-src-block-info)))) (let* ((c (nthcdr 2 info))) (setcar c
(org-babel-merge-params (car c) params))) (if (org-babel-check-evaluate info)
(progn (let* ((c (nthcdr 2 info))) (setcar c (org-babel-process-params (car
c)))) (let* ((params (nth 2 info)) (cachep (and (not arg) (cdr ...) (string=
"yes" ...))) (new-hash (if cachep (progn ...))) (old-hash (if cachep (progn
...))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash))))
(cond (cache-current-p (save-excursion (goto-char ...) (forward-line)
(skip-chars-forward " ") (let ... ... result))) ((org-babel-confirm-evaluate
info) (let* (... ... ... ... ... ... result) (if ... nil ...) (message
"executing %s code block%s..." ... ...) (if ... ... ... ... ... ...) (run-hooks
...) result)))))))
org-babel-execute-src-block(nil)
(progn (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block
current-prefix-arg) t)
(if (memq (org-element-type (org-element-context)) (quote (inline-src-block
src-block))) (progn (org-babel-eval-wipe-error-buffer)
(org-babel-execute-src-block current-prefix-arg) t) nil)
org-babel-execute-src-block-maybe()
(or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
org-babel-execute-maybe()
(if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
org-babel-execute-safely-maybe()
run-hook-with-args-until-success(org-babel-execute-safely-maybe)
(cond ((or (and (boundp (quote org-clock-overlays)) org-clock-overlays)
org-occur-highlights) (and (boundp (quote org-clock-overlays))
(org-clock-remove-overlays)) (org-remove-occur-highlights) (message "Temporary
highlights/overlays removed from current buffer")) ((and (local-variable-p
(quote org-finish-function) (current-buffer)) (fboundp org-finish-function))
(funcall org-finish-function)) ((run-hook-with-args-until-success (quote
org-ctrl-c-ctrl-c-hook))) (t (if (save-excursion (beginning-of-line)
(looking-at "[ ]*$")) (or (run-hook-with-args-until-success (quote
org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can do nothing useful at
this location")) (let* ((context (org-element-context)) (type (org-element-type
context))) (cond ((eql type (quote link)) (setq context (org-element-property
:parent context)) (setq type (org-element-type context))) ((memql type (quote
...)) (setq context (org-element-lineage context ...)))) (if (eq type (quote
paragraph)) (progn (let (...) (if ... ...)))) (cond ((eql type (quote clock))
(org-clock-update-time-maybe)) ((eql type (quote dynamic-block))
(save-excursion (goto-char ...) (org-update-dblock))) ((eql type (quote
footnote-definition)) (goto-char (org-element-property :post-affiliated
context)) (call-interactively (quote org-footnote-action))) ((eql type (quote
footnote-reference)) (call-interactively (quote org-footnote-action))) ((memql
type (quote ...)) (save-excursion (goto-char ...) (call-interactively ...)))
((eql type (quote item)) (let* (... ... ... ... ... ...) (org-list-set-checkbox
... struct ...) (org-list-struct-fix-ind struct parents 2)
(org-list-struct-fix-item-end struct) (org-list-struct-fix-bul struct prevs)
(org-list-struct-fix-ind struct parents) (let ... ... ...))) ((eql type (quote
keyword)) (let (... ...) (if ... ...) (let ... ... --rtn)) (message "Local
setup has been refreshed")) ((eql type (quote plain-list)) (let* (... ... ...
... ... ...) (cond ... ...) (org-list-write-struct struct ... old-struct)
(org-update-checkbox-count-maybe) (save-excursion ... ...))) ((memql type
(quote ...)) (call-interactively (quote org-property-action))) ((memql type
(quote ...)) (call-interactively (quote org-update-radio-target-regexp))) ((eql
type (quote statistics-cookie)) (call-interactively (quote
org-update-statistics-cookies))) ((memql type (quote ...)) (if (eq ... ...)
(message "%s" ...) (let ... ...))) ((eql type (quote timestamp))
(org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-until-success
...) (user-error "C-c C-c can do nothing useful at this location"))))))))
org-ctrl-c-ctrl-c(nil)
funcall-interactively(org-ctrl-c-ctrl-c nil)
call-interactively(org-ctrl-c-ctrl-c nil nil)
command-execute(org-ctrl-c-ctrl-c)
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
http://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------
Emacs : GNU Emacs 25.0.92.1 (x86_64-apple-darwin15.3.0, NS appkit-1404.34
Version 10.11.3 (Build 15D21))
of 2016-03-07
Package: Org-mode version 8.3.4 (release_8.3.4-639-gd5a603 @
/Users/rainerkrug/.emacs.d/elpa/25.0/org-20151005/)
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: address@hidden
Skype: RMkrug
PGP: 0x0F52F982
signature.asc
Description: PGP signature
- [O] Bug: can not evaluate any code blocks after enabling additional languages [8.3.4 (release_8.3.4-639-gd5a603 @ /Users/rainerkrug/.emacs.d/elpa/25.0/org-20151005/)],
Rainer M Krug <=