[Top][All Lists]

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

Re: [Texmacs-dev] [TeXmacs] Octave plugin status

From: David E. Miller
Subject: Re: [Texmacs-dev] [TeXmacs] Octave plugin status
Date: Tue, 14 May 2013 00:55:19 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

Denis and TeXmacs Users and Devs:

Based on the suggestion by Denis (see his reply below) concerning the apparent bug in the Octave plugin I did some further investigation and tried his "patch" and it fixed the issue I raised. However, this fix required the deletion of several lines of existing code in the tmrepl.m file. I was not exactly comfortable with tossing out that much existing code even though this fixed the issue described below. So I looked at the existing code of the tmrepl.m file to see if I could find the reason that the patch by Denis worked. I found that the following statement which is located third from the bottom in the code snippet below
which is:


needed to be changed to


The single quotes ('s') were changed to double quotes ("s").

With the change the Octave plugin appears to be functioning properly now and it also eliminated the warning message Octave was generating at session

I would have to dig into the Octave documentation in order to determine exactly what is involved here with why this syntax change appears to have fixed the issue. In any case this may be of interest to those TeXmacs users that have had to deal with the bug in the plugin, since with this change it now appears to be working as expected. However, note that I have not had time to do any comprehensive tests to be sure that all Octave input and output is working as expected. It is merely that this change seems to have fixed this obvious bug as far as I can determine.

Any feedback is welcome.

Note to TeXmacs developers. If this fix is a good one, then this needs to be changed in future releases.

David Miller

function tmrepl()
    prompt=sprintf("%cchannel:prompt%coctave> %c",2,5,5);
    r=input(prompt, "s");
    while ( 1 )
        if r(length(r))!=";"
        r=sprintf("%ctexmacs%c; %s;",39,39,r);
        if dispans & isnewans(ans)
        r=input(prompt, 's');

On 4/9/2013 11:11 PM, David E. Miller wrote:
Hi Denis:

I have not been able to get the Octave plugin to work correctly on any version of TeXmacs up to and including This includes the MS Windows, OS X, and GNU/Linux ports/packages. I use GNU/Linux 95% of the time. However, I am not familiar with the Octave installer package in the form of an executable that you reference below. I personally don't plan on using the MS Windows version of TeXmacs, and so I will probably not install any MS Windows Octave port again in any case. I plan to stay with GNU/Linux (Lubuntu is what I use) and forgo all of these extra compatibility issues.

However, I am interested in knowing whether or not the installer you reference modified the the PATH environment by adding the path to the Octave executable? The TeXmacs Octave plugin will not work at all if this is not done either by the user or by the installer. The Octave session will be missing or dead in that case.

It might be of value for you to send a email message to the user list with the URL link to the octave-3.6.2-vs2010-setup.exe you reference. The package i used was from a link located on the Octave project website page. It is not "painful," but it is "clumsy" by my way of thinking - certainly not a typical "click-and-go" executable installer program like you reference..

Also, thanks for the tip on the plugin modification. I have not tried this yet, but it looks like this addresses the Octave plugin anomaly I describe. I will let you know as soon as I get a chance to take a swing at this. If this modification fixes the issue, then this needs to be conveyed to the TeXmacs developers, and then hats off to you for fixing this.

I have been using Octave through the Oct2Py Python module from a TeXmacs Python plugin session. This has worked flawlessly so far, but a standalone Octave plugin that works correctly would be nice to have.

Best Wishes,

David Miller
PIckerington, Ohio

On 4/5/2013 5:58 AM, Denis RAUX wrote:
It's completely right when i integrate a plugin in the windows version, i make the very simple test 1 + 1. The main reasons are i have no idea how they should work and no left time to dig. So a windows port must be similar to the linux version.

Concerning the Octave installation, I fetched a true windows package with an installer : octave-3.6.2-vs2010-setup.exe. I don't remember it was painful to install. If you make the installation in the standard locations, texmacs must find it automatically.

I didn't know anything about the plugins author intentions when he wrote it. But if you want make Octave running with the test cases you gave, you have to modify the tmrepl.m file located in C:\Program Files\TeXmacs\plugins\octave\octave\™

  function tmrepl()
    prompt=sprintf("%cchannel:prompt%coctave> %c",2,5,5);
    while ( 1 )

This should give to you :

  octave>  A = 1 + 2

A =  3
octave>  B = [1,2,3]

B =

    1   2   3

octave>  5 + 5

ans =  10

I hope this will be convenient.

Denis Raux

Le 18 mars 2013 à 20:06, David E. Miller a écrit :

Octave plugin status. The TeXmacs website says:

"The current Windows version of TeXmacs only supports a reduced set of plug-ins. As of version, Maxima, Mathemagix, Octave, Pari and Python should run out of the box after a standard installation."

From what I have experienced the Octave plugin is defective. This is the case for Linux, OS X and MS Windows. It is the plugin and not the operating systems. Any reference to an Octave expression using the Octave plugin from TeXmacs that involves a variable returns "texmacs" and not the expected answer. Expressions with numbers only are okay, but obviously this is not "running out of the box" as stated.

Also the phrase "standard installation" may be misleading. TeXmacs may have a standard installation using MS Windows, but it is a stretch to describe the installation of the MS Windows version of Octave as "standard" in any sense. The installation of Octave on MS Windows requires a number of manual steps and configuration items before TeXmacs shows Octave as an available plugin. This includes modification of the PATH environment variable. After successfully jumping that hurdle (which is not documented anywhere), the plugin will start an Octave session that does not work normally with the same symptoms whether using GNU/Linux, OS X, or MS Windows:

octave> A = [1,2,3]

octave> 1+1

octave> sqrt(2)

octave> a=sqrt(2)

David Miller

Texmacs-dev mailing list

reply via email to

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