Re: [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/)]

2016-03-10 Thread Kyle Meyer
Rainer M Krug  writes:

> OK - thanks. This is solved now. But now I am stuck with the following,
> where again, org-element-cache-reset is in the emacs packed org-mode,
> while orgmode() is in the git version, and the changed org-set-local()
> causes an error. Any suggestions?

As you mention, the org-element-cache-reset being called belongs to a
version older than the current master because org-set-local is no longer
used.  But I'm pretty sure it's not from the Org that comes with Emacs,
because I think 8.2.10 predates org-element-cache-reset.

So maint must somehow be getting loaded, perhaps from stale *.elc files
in the repo or from an ELPA install.

-- 
Kyle



Re: [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/)]

2016-03-10 Thread Rainer M Krug
Kyle Meyer  writes:

> Rainer M Krug  writes:
>
>> Nicolas Goaziou  writes:
>>
>>> Hello,
>>>
>>> Rainer M Krug  writes:
>>>
 Debugger entered--Lisp error: (void-function org-babel-get-header)
>>>
>>> This looks like a mixed installation. This function was removed in
>>> development version and code base doesn't use it anymore.
>>
>> I don't think so - I use org from git uncompiled and, as you can see int
>> the init.el, initialize it (require 'org) before calling 
>> (package-initialize).
>>
>> For some unknown reasons, the function
>> org-babel-execute-src-block(nil) (in the org-git directory) calls
>> org-babel-execute:sh in the installation directory of emacs.
>>
>> So wy is this the case? I see that the file ob.sh.el seems to be renamed
>> in ob-shell.el - is this the case? Do I have to change the language sh
>> to shell?
>
> This has been reported on the list a few times.  See
> http://thread.gmane.org/gmane.emacs.orgmode/102877/focus=102882.

OK - thanks. This is solved now. But now I am stuck with the following,
where again, org-element-cache-reset is in the emacs packed org-mode,
while orgmode() is in the git version, and the changed org-set-local()
causes an error. Any suggestions?

,
| Debugger entered--Lisp error: (void-function org-set-local)
|   org-set-local(org-element--cache [cl-struct-avl-tree- [nil nil nil 0] 
org-element--cache-compare])
|   org-element-cache-reset()
|   (let ((delay-mode-hooks t)) (outline-mode) (setq major-mode (quote 
org-mode)) (setq mode-name "Org") (progn (if (get (quote outline-mode) (quote 
mode-class)) (put (quote org-mode) (quote mode-class) (get (quote outline-mode) 
(quote mode-class (if (keymap-parent org-mode-map) nil (set-keymap-parent 
org-mode-map (current-local-map))) (let ((parent (char-table-parent 
org-mode-syntax-table))) (if (and parent (not (eq parent 
(standard-syntax-table nil (set-char-table-parent org-mode-syntax-table 
(syntax-table (if (or (abbrev-table-get org-mode-abbrev-table :parents) (eq 
org-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put 
org-mode-abbrev-table :parents (list local-abbrev-table (use-local-map 
org-mode-map) (set-syntax-table org-mode-syntax-table) (setq local-abbrev-table 
org-mode-abbrev-table) (if (featurep (quote xemacs)) (if (boundp (quote 
outline-mode-menu-heading)) (progn (easy-menu-remove outline-mode-menu-heading) 
(easy-menu-remove outline-mode-menu-show) (easy-menu-remove 
outline-mode-menu-hide))) (define-key org-mode-map [menu-bar headings] (quote 
undefined)) (define-key org-mode-map [menu-bar hide] (quote undefined)) 
(define-key org-mode-map [menu-bar show] (quote undefined))) 
(org-load-modules-maybe) (if (featurep (quote xemacs)) (progn (easy-menu-add 
org-org-menu) (easy-menu-add org-tbl-menu))) (org-install-agenda-files-menu) 
(if org-descriptive-links (progn (add-to-invisibility-spec (quote 
(org-link) (add-to-invisibility-spec (quote (org-cwidth))) 
(add-to-invisibility-spec (quote (org-hide-block . t))) (if (featurep (quote 
xemacs)) (progn (set (make-local-variable (quote line-move-ignore-invisible)) 
t))) (set (make-local-variable (quote outline-regexp)) org-outline-regexp) (set 
(make-local-variable (quote outline-level)) (quote org-outline-level)) (setq 
bidi-paragraph-direction (quote left-to-right)) (if (and org-ellipsis (fboundp 
(quote set-display-table-slot)) (boundp (quote buffer-display-table)) (fboundp 
(quote make-glyph-code))) (progn (if org-display-table nil (setq 
org-display-table (make-display-table))) (set-display-table-slot 
org-display-table 4 (vconcat (mapcar (function (lambda ... ...)) (if (stringp 
org-ellipsis) org-ellipsis "..." (setq buffer-display-table 
org-display-table))) (org-set-regexps-and-options) (org-set-font-lock-defaults) 
(if (and org-tag-faces (not org-tags-special-faces-re)) (progn 
(org-set-tag-faces (quote org-tag-faces) org-tag-faces))) (set 
(make-local-variable (quote calc-embedded-open-mode)) "# ") 
(modify-syntax-entry 64 "w") (modify-syntax-entry 34 "\"") (modify-syntax-entry 
92 "_") (modify-syntax-entry 126 "_") (set (make-local-variable (quote 
font-lock-unfontify-region-function)) (quote org-unfontify-region)) (set 
(make-local-variable (quote org-table-may-need-update)) t) (org-add-hook (quote 
before-change-functions) (quote org-before-change-function) nil (quote local)) 
(org-add-hook (quote kill-buffer-hook) (quote org-check-running-clock) nil 
(quote local)) (org-macro-initialize-templates) 
(org-update-radio-target-regexp) (set (make-local-variable (quote 
indent-line-function)) (quote org-indent-line)) (set (make-local-variable 
(quote indent-region-function)) (quote org-indent-region)) (org-setup-filling) 
(org-setup-comments-handling) (org-element-cache-reset) (set 
(make-local-variable (quote beginning-of-defun-function)) (quote 
org-backward-element)) (set (make-local-variable (quote end-of-defun-function)) 
(function (lambda nil (if (not (org-at-heading-p)) (org-forward-element) 
(org-f

Re: [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/)]

2016-03-10 Thread Kyle Meyer
Rainer M Krug  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
>>> Debugger entered--Lisp error: (void-function org-babel-get-header)
>>
>> This looks like a mixed installation. This function was removed in
>> development version and code base doesn't use it anymore.
>
> I don't think so - I use org from git uncompiled and, as you can see int
> the init.el, initialize it (require 'org) before calling (package-initialize).
>
> For some unknown reasons, the function
> org-babel-execute-src-block(nil) (in the org-git directory) calls
> org-babel-execute:sh in the installation directory of emacs.
>
> So wy is this the case? I see that the file ob.sh.el seems to be renamed
> in ob-shell.el - is this the case? Do I have to change the language sh
> to shell?

This has been reported on the list a few times.  See
http://thread.gmane.org/gmane.emacs.orgmode/102877/focus=102882.

-- 
Kyle



Re: [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/)]

2016-03-10 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> Debugger entered--Lisp error: (void-function org-babel-get-header)
>
> This looks like a mixed installation. This function was removed in
> development version and code base doesn't use it anymore.

I don't think so - I use org from git uncompiled and, as you can see int
the init.el, initialize it (require 'org) before calling (package-initialize).

For some unknown reasons, the function
org-babel-execute-src-block(nil) (in the org-git directory) calls
org-babel-execute:sh in the installation directory of emacs.

So wy is this the case? I see that the file ob.sh.el seems to be renamed
in ob-shell.el - is this the case? Do I have to change the language sh
to shell?


>
> It was still called in a few Babel libraries within contrib/, but I just
> fixed them.
>
>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [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/)]

2016-03-10 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> Debugger entered--Lisp error: (void-function org-babel-get-header)

This looks like a mixed installation. This function was removed in
development version and code base doesn't use it anymore.

It was still called in a few Babel libraries within contrib/, but I just
fixed them.


Regards,

-- 
Nicolas Goaziou



Re: [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/)]

2016-03-10 Thread Rainer M Krug
Sorry for tp:

Additional info:

Works under Org-mode version 8.3.4 (8.3.4-dist @ 
/Users/rainerkrug/.emacs.d/elpa/25.0/org-20151005/)

Rainer M Krug  writes:

> * 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 
>

[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/)]

2016-03-10 Thread Rainer M Krug

* 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) (