Add a New Comment (Rich Markup)
Oh, so this is with the GUI setting "Startup path" set to a directory with m-files in it? I agree, using that setting it does not warn when Octave starts like it would if Octave was run from that directory. The GUI is probably calling Fchdir under the hood, which is probably why this behaves similar to calling "cd" or "chdir" in the interpreter later and not printing a warning.
I think you are still thinking about the cli way of using octave. I am thinking about the gui users.(myself included) When only working in the gui mode (most of windows users) after you make a folder your pwd, and then close octave, on the next startup it starks in that folder. In my case it is called Mfiles. ( a place I keep all my M files) So the gui always starts up using this folder and never reports and shadowing. I would like it to report any shadowing on startup for this startup folder.
Would we really want to change this behavior? 1. chdir(dir) or cd(dir) → no warning I could cd to a directory just to look at things, and then cd back out, without ever having any intention to execute the flip.m m-file. I think it might be annoying to get lots of false positive warnings about m-files which are not really problems. I second Mike's experiments in that the GUI and the CLI both reproduce the same set of warnings under the same set of circumstances. I also can reproduce the difference between a compiled function and an m-file. That seems small, so I lowered the priority, but worth fixing if it would be easy to do so.
I do see a warning when the GUI starts, and also when using addpath in the GUI. So I don't see any difference between command-line and GUI with regards to this behavior. The difference only has to do with how the function override is added to the path. 1. chdir(dir) or cd(dir) → no warning 2. addpath(dir) → warning 3. start Octave in dir → warning 4. start Octave with --path $dir option → no warning However, if the override is a compiled builtin, for example "exp" instead of "flip", then a warning is issued when the --path option is given. This probably has to do with the order of path initialization and of initial scanning of m-files and oct-files in the load path.
Whe warning "function foo.m shadows a core library function" is missing for some circumstances. The following statements assumes that there is a function "flip.m" that shadows a core library function. 1) When starting octave with "octave-cli" It checks the pwd for any function that shadows and reports it at start up. When starting octave with "octave" (run GUI) there is no warning. 2) Running octave-cli and then addpath to a folder that has "flip.m" octave then gives a warning. Running octave-cli and then CD to a folder that has "flip.m" and no warning is given. 3) Running GUI and CD or addpath there is no warning issued.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11