Dear John and Uwe, Thanks very much for sending your hint. I very much appreciate it.
It turns out it was a bug in org codes (I already report it). In case someone else in this community is also dealing with it. Here’s the solution: In "ob-octave.el" line 94, instead of (format "print -dpng %S\nans=%S" gfx-file gfx-file)) should be (format "print -dpng %s" gfx-file)) otherwise, the figure is not saved (and thus an empty inline figure will appear). I already test it with MATLAB and can confirm it. Lastly, thanks very much again for maintaining the emacs matlab-mode. Best wishes, Shervin -------------------------------------------------------------------- Shervin Safavi Postdoctoral fellow :: Max Planck Institute for Biological Cybernetics Computational Neuroscience (Peter Dayan Lab) :: University of Tübingen Department of Computer Science Max-Planck-Ring 8, 72076 Tübingen, Germany Web: shervinsafavi.org Twitter: @neuroprinciples Tel: +49 7071 601 1683 Fax: +49 7071 601 652 -------------------------------------------------------------------- Shervin On Thu 17. Aug 2023 at 20:29, John Ciolfi <cio...@mathworks.com> wrote: > Hi > > If you have the latest https://sourceforge.net/projects/matlab-emacs/, > take a look at > https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/examples/matlab-and-org-mode/matlab-and-org-mode.org > > This should get matlab working with Emacs nicely (we use this with Emacs > 27 and it works for us). > > I have had on my todo list for a while to send in change requests to > org-mode to fix the integration problems. > ------------------------------ > *From:* Shervin Safavi <neuroprincipl...@gmail.com> > *Sent:* Wednesday, August 16, 2023 4:33 PM > *To:* Matlab-emacs-discuss <matlab-emacs-discuss@lists.sourceforge.net> > *Subject:* [Matlab-emacs-discuss] issue with figure generated by a matlab > org src block > > Dear everyone, > > I'm setting up matlab-mode on a new laptop with Ubuntu 22. Most things > (related to matlab-mode) are working smoothly, but some don't. Most > importantly the figure results of an org code block do not appear below the > plot (just an empty box appear there). I had a similar issue, in an earlier > version and I realized that I was using the wrong syntax. So, the last > functioning syntax is the following: > > #+BEGIN_SRC matlab :file test2.png :results file graphics > imagesc(rand(10)) > #+END_SRC > > But it doesn't work anymore. I guess just the syntax changed recently that > I'm not aware of (and couldn't find it online). I was wondering if any of > you know what wrong? > > Thanks very much in advance, and thanks also for keeping this wonderful > community running. > > Best wishes, > Shervin >
_______________________________________________ Matlab-emacs-discuss mailing list Matlab-emacs-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss