addpath behavior

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

addpath behavior

Amit Saha-3
Hi!

When I add a path via 'addpath', it look like it doesn't add the
subdirectories. So, this means that I have to add each sub-dir
individually. Is this correct? If yes, then how do I tell Octave to
include all the sub-dirs under a dir as well without having to tell
Octave addpath ( ) for each directory.

Also, I faced this non-reproducible behavior:

octave:1> addpath("/home/r00t/Writings/new/octave/part4/")
octave:2> maximum(1,2,4)
error: `maximum' undefined near line 2 column 1
octave:2> addpath("/home/r00t/Writings/new/octave/part4/octave-scripts")
panic: impossible state reached in file `load-path.cc' at line 657
panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete

Next time, the same thing worked.

Your comments/suggestions are much appreciated.

Best,
Amit

--
Journal: http://amitksaha.wordpress.com
µ-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave

octave-core (156 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: addpath behavior

David Bateman
Amit Saha wrote:
> Hi!
>
> When I add a path via 'addpath', it look like it doesn't add the
> subdirectories. So, this means that I have to add each sub-dir
> individually. Is this correct? If yes, then how do I tell Octave to
> include all the sub-dirs under a dir as well without having to tell
> Octave addpath ( ) for each directory.

addpath (genpath (.....));

>
> Also, I faced this non-reproducible behavior:
>
> octave:1> addpath("/home/r00t/Writings/new/octave/part4/")
> octave:2> maximum(1,2,4)
> error: `maximum' undefined near line 2 column 1
I presume you mean

max ([1,2,4])

> octave:2> addpath("/home/r00t/Writings/new/octave/part4/octave-scripts")
> panic: impossible state reached in file `load-path.cc' at line 657
> panic: Aborted -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
Ok that looks like a bug.. Can you give more details?

>
> Next time, the same thing worked.
>
> Your comments/suggestions are much appreciated.
>
> Best,
> Amit
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>  


--
David Bateman                                [hidden email]
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: addpath behavior

Amit Saha-3
David Bateman wrote:

> Amit Saha wrote:
>> Hi!
>>
>> When I add a path via 'addpath', it look like it doesn't add the
>> subdirectories. So, this means that I have to add each sub-dir
>> individually. Is this correct? If yes, then how do I tell Octave to
>> include all the sub-dirs under a dir as well without having to tell
>> Octave addpath ( ) for each directory.
>
> addpath (genpath (.....));

Thanks! I missed the genpath ( ) in the docs.

>
>>
>> Also, I faced this non-reproducible behavior:
>>
>> octave:1> addpath("/home/r00t/Writings/new/octave/part4/")
>> octave:2> maximum(1,2,4)
>> error: `maximum' undefined near line 2 column 1
> I presume you mean
>
> max ([1,2,4])

No, I have a user-defined function.
>
>> octave:2> addpath("/home/r00t/Writings/new/octave/part4/octave-scripts")
>> panic: impossible state reached in file `load-path.cc' at line 657
>> panic: Aborted -- stopping myself...
>> attempting to save variables to `octave-core'...
>> save to `octave-core' complete
> Ok that looks like a bug.. Can you give more details?

Like? Does the list support attachments, then I have the core file.

1. GNU Octave, version 3.2.2 ,Octave was configured for "i486-pc-linux-gnu".

Pls. let me know how I can help.

Best Regards,
Amit


--
Journal: http://amitksaha.wordpress.com
µ-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: addpath behavior

Svante Signell-3
On Sat, 2010-03-13 at 20:43 +0530, Amit Saha wrote:
> David Bateman wrote:
> > Amit Saha wrote:
> >> Hi!
...

> >> octave:2> addpath("/home/r00t/Writings/new/octave/part4/octave-scripts")
> >> panic: impossible state reached in file `load-path.cc' at line 657
> >> panic: Aborted -- stopping myself...
> >> attempting to save variables to `octave-core'...
> >> save to `octave-core' complete
> > Ok that looks like a bug.. Can you give more details?
>
> Like? Does the list support attachments, then I have the core file.
>
> 1. GNU Octave, version 3.2.2 ,Octave was configured for "i486-pc-linux-gnu".
>
I see that you are using octave 3.2.x. These versions have a bug then
calling addpath twice in a row:
addpath('./')
addpath('./')

see
http://www-old.cae.wisc.edu/pipermail/bug-octave/2010-March/010480.html
and
http://www-old.cae.wisc.edu/pipermail/bug-octave/2009-August/009350.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave