0

I have TeXmacs and Octave installed, both working properly otherwise. I have also added the path to octave executable (i.e. C:\Octave\Octave-5.1.0.0\mingw64\bin) to the Windows environment variables and octave runs in cmd/PowerShell terminals and Jupyter with no hassle. However, when running Octave inside TeXmacs through Toolbar > insert > session > octave it gets stuck on Busy..., the same reaction for any other commands as well:


   
                     Octave gets stuk on Busy... inside TeXmacs.

This is my environment:

  • TeXmacs 1.99.9
  • Octave 5.1.0 (installed through Chocolatey)
  • Windows 10 version 1809

I would appreciate if you could help me know what is the problem and how I can solve it.

P.S. I have reported this issue in the TeXmacs repo.

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
  • I don't know whether this question is on topic in SO, or specifically, whether TeXmacs is considered as a software tool commonly used by programmers. For the moment there is no SE for TeXmacs. However, there is [a proposal](https://area51.stackexchange.com/proposals/121978/texmacs) in Area51. You can join and ask there. – Yai0Phah Jun 14 '19 at 10:29
  • I do follow that proposal. But for the moment I don't know any better place to ask this question ¯\\_(ツ)_/¯ – Foad S. Farimani Jun 14 '19 at 10:58
  • It seems that octave does not send back to texmacs the message to close output and so things get stuck since texmacs is still waiting for them while maybe octave is waiting already for input. I tried on mac and is the same problem. Maybe something changed in the last versions of the program, you should fiddle a bit around and see what happened. – mgubi Jul 11 '19 at 23:17
  • 1
    Recently, I'm developing on the octave plugin. – sadhen Jun 11 '20 at 02:50
  • 1
    I think it has been fixed in GNU TeXmacs 2.1.1 – sadhen Mar 31 '22 at 09:30

3 Answers3

3

@Foad. I wrote an updated Octave plugin for Texmacs. I tried it on Windows, OSX and Linux, works on the systems I have access to. If you are interested to test it, you can download the zipped archive from here https://lists.gnu.org/archive/html/texmacs-dev/2019-12/msg00005.html.

To install it, unzip the archive and copy the octaveX directory in the application plugins folder, alongside all the plugins that come with the standard Texmacs installation. Won’t work if installed in ~/.Texmacs/plugins. If everything goes fine, you should find a new Insert/Session/OctaveX menu (note: I changed the session name). If not, try to refresh the plugin system with the menu Tools/Update/Plugins. If you try it, please let me know, especially if you find troubles. In case I will do my best to fix them.

A fundamental prerequisite is a working octave-cli command in a operating system shell. Should be standard on Linux, may require some additional setup on Windows (environmental variables) or OSX (.bash_profile). You can find some help and more details under the menu Help/Plug-ins/OctaveX.

Concerning the error you found, as far I understand there are some issues with the standard distributed plugin: first, a .octaverc file is missing, so several variables are not initialized, in addition the Windows version calls a not existent file. Moreover the plotting functions are quite old and are not compatibile with Octave newer than version 2 (or maybe 3, anyway a quite old version).

Lorenzo
  • 31
  • 1
2

You could try to run the command in

%TEXMACS_PATH%/plugins/octave/bin/tm_octave.bat

from the terminal to see what happens. There is a problem with this plugin and it does not work also on Mac but I do not know enough Octave to fix it. Somehow it does not manage to find the files which are in

%TEXMACS_PATH%/plugins/octave/octave

Please try to modify tm-start.m to look like

d=getenv("TEXMACS_PATH");
if (length(d) > 0)
    addpath("tm:polynomial:plot")
    tmrepl
endif
mgubi
  • 141
  • 4
  • great. I'm happy to see you are going across different social media and answer different questions. hopefully Twitter will be the next – Foad S. Farimani Jun 28 '19 at 18:42
  • 1
    Please try to modify tm-start.m to look like ``` d=getenv("TEXMACS_PATH"); if (length(d) > 0) addpath("tm:polynomial:plot") tmrepl endif ``` – mgubi Jun 28 '19 at 20:59
0

In windows, octave should be run using the scripts octave.bat (in the mingw64\bin directory of the octave install) or octave.vbs (in the install directory) for the GUI

You should not run octave.exe directly.

lostbard
  • 5,065
  • 1
  • 15
  • 17
  • Thanks but you actually did not answer my question. I would appreciate if you could help me know what is the problem and how I can solve it. – Foad S. Farimani Jun 13 '19 at 15:07
  • @Foad Why is your question not answered with this? Don't use the exe directly, use the .vbs – Andy Jun 13 '19 at 17:39
  • Dear @Andy are you able to run Octave inside the TeXmacs using the above instructions? See, I'm not running the `Octave.exe` at all and the only reason I mentioned it in the question was to show that the binary folder is added to the environment variables and known to the OS. Besides, I should mention that Octave works fine on Jupyter, so there should be some other issue. Unless I'm missing something here? – Foad S. Farimani Jun 13 '19 at 19:53
  • You said "I have also added the path to octave executable (i.e. C:\Octave\Octave-5.1.0.0\mingw64\bin)", so what exactly is TeXmacs running ? It should be octave.bat – lostbard Jun 14 '19 at 12:24
  • @lostbard That I'm not sure. The plugin for calling Octave can be seen [here](https://github.com/texmacs/plugins/tree/master/octave) I'm not sure which file it is calling to. – Foad S. Farimani Jun 18 '19 at 10:06