From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: Re: workflow, matlab+latex in org file Date: Fri, 20 Oct 2017 13:03:15 +0200 Message-ID: <87d15iozd8.fsf@mat.ucm.es> References: <8760sc8ids.fsf@mat.ucm.es> <87shvg6z9i.fsf@mat.ucm.es> <5e1e71e3698e415ca51a0b9e3cab5dac@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87h931qa9f.fsf@ucl.ac.uk> <87tw70dysj.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5V5R-0001k9-FE for emacs-orgmode@gnu.org; Fri, 20 Oct 2017 07:03:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5V5O-0007IQ-7f for emacs-orgmode@gnu.org; Fri, 20 Oct 2017 07:03:33 -0400 Received: from [195.159.176.226] (port=41129 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5V5O-0007Gx-0x for emacs-orgmode@gnu.org; Fri, 20 Oct 2017 07:03:30 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1e5V58-0006tv-Su for emacs-orgmode@gnu.org; Fri, 20 Oct 2017 13:03:14 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org >>> "John" == John Kitchin writes: This message is from July, but meanwhile I upgraded to Ubuntu 16.04 matlab 2016b which includes the python engine/kernel and finally I installed the Jupiter matlab kernel via pip, however I tried to follow your recommendations below: > You might dig around in ob-octave to see how it works. It should be able > to Matlab (and on Linux/Mac I believe it might). On Windows, it has been > broken for a long time due to the lack of a proper shell (maybe that can > be adapted in win10 though). > I vaguely recall making that matlab function to try it out on Windows > some years ago. > There is a Jupyter Matlab kernel now. > https://github.com/Calyro/matlab_kernel > I was able to use this (and installing the kernel, and making sure a > matlab is on the path): > #+BEGIN_SRC emacs-lisp > (add-to-list 'org-src-lang-modes '("matlab" . matlab)) > ;; set default headers for convenience > (setq org-babel-default-header-args:matlab > '((:results . "output replace") > (:session . "matlab") > (:kernel . "matlab") > (:exports . "code") > (:cache . "no") > (:noweb . "no") > (:hlines . "no") > (:tangle . "no"))) > (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) > (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) > (defalias 'org-babel-matlab-initiate-session 'org-babel-ipython-initiate-session) > #+END_SRC > #+RESULTS: > : org-babel-matlab-initiate-session That I obtain > To enable this: > #+BEGIN_SRC matlab :results output org drawer > x = [1, 2, 3, 4, 5]; > fprintf('|%d', x) > #+END_SRC Here I obtain the following error: Debugger entered--Lisp error: (void-function org-babel-execute:matlab) org-babel-execute:matlab("x = [1, 2, 3, 4, 5];\nfprintf('|%d', x)" ((:colname-names) (:rowname-names) (:result-params "replace" "output" "drawer") (:result-type . output) (:results . "replace output drawer") (:exports . "code") (:session . "matlab") (:kernel . "matlab") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))) org-babel-execute-src-block(nil ("matlab" "x = [1, 2, 3, 4, 5];\nfprintf('|%d', x)" ((:colname-names) (:rowname-names) (:result-params "drawer" "output" "replace") (:result-type . output) (:results . "drawer output replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:kernel . "matlab") (:session . "matlab")) "" nil 671 "(ref:%s)")) 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) What is the problem? Which package do I miss, ipython is installed in /usr/local/bin Thanks Uwe Brauer