emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] strange output when executing matlab using babel, strange ,


From: Uwe Brauer
Subject: [O] strange output when executing matlab using babel, strange ,
Date: Fri, 31 May 2019 15:08:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)


Hi 

I am running Ubuntu 16.06, matlab 2018b and  I am using the python
kernel to use matlab from within org mode


Thanks to John Kitchin, I have the following setting

* Lisp setting
#+BEGIN_SRC emacs-lisp
(setq org-confirm-babel-evaluate nil)   ;don't prompt me to confirm everytime I 
want to evaluate a block

;;; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
    

(add-to-list 'org-src-lang-modes '("matlab" . matlab))
(setq python-shell-interpreter "python3")

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


* The problem

When I run 

#+begin_src matlab :results output latex :exports results  :eval never-export 
disp('*Step 3:*')
disp('*Step 3:*  Calculate this')
#+end_src


On obtain 
#+RESULTS:
#+begin_export latex
,*Step 3:*
,*Step 3:*  Calculate this
#+end_export


Instead of 

#+begin_export latex
*Step 3:*
*Step 3:*  Calculate this
#+end_export


Does anybody have an idea what is wrong there?

Uwe Brauer 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]