octave-maintainers
[Top][All Lists]
Advanced

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

Re: Newer Versions of Octave Struggle with Character Strings


From: Doug Stewart
Subject: Re: Newer Versions of Octave Struggle with Character Strings
Date: Tue, 4 Jul 2017 17:19:01 -0400



On Tue, Jul 4, 2017 at 5:11 PM, Mike Miller <address@hidden> wrote:
On Tue, Jul 04, 2017 at 11:23:31 -0700, evansste wrote:
> My .octaverc file contains the following lines:
>
> cd /home/evansste/octdir
> page_screen_output(0);
> page_output_immediately(1);
> somevar = 42;
>
> However, when I try to run .m scripts, which are contained in the "octdir"
> directory, Octave doesn't recognize them.  If I use the same "cd" command,
> by typing it while Octave is running, it changes to the directory, and will
> then run my scripts from that directory.  However, for some reason, it
> doesn't change to the directory based on the command in the .octaverc file.
> Any ideas what may be causing this?

I assume you are using Octave's GUI. There is a known race condition
between the GUI starting and setting the preferred initial directory and
the ~/.octaverc using the cd command. The best workaround is to not use
cd in your ~/.octaverc at this point. If you want Octave to always start
in a particular directory, use the Preferences dialog, General tab, and
set the Octave startup path there.

I don't think this problem will affect you if you are using Octave's
command line interface, this only has to do with GUI initialization.

BTW, you may just want to use addpath instead of cd. The addpath
function would add the octdir directory to your function / script search
path without requiring it to be the current working directory.

https://savannah.gnu.org/bugs/?46544

--
mike


I was about to say that the Startup path for the GUI might override the cd even if the cd worked.

--
DASCertificate for 206392


reply via email to

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