[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
spurious autload warning
From: |
John W. Eaton |
Subject: |
spurious autload warning |
Date: |
Thu, 22 Mar 2007 14:20:16 -0400 |
On 21-Mar-2007, David Bateman wrote:
| If I do something like "addpath(genpath('./'))" and the sub directories
| of the current directory contain PKG_ADD files with autoload commands
| like discussed previously, (ie. 'autoload ("bar", fullfile (fileparts
| (mfilename ("fullpath")),"foo.oct"));' ), then I get spurious messages like
|
| warning: autoload: `.//foobar/foo.oct' is not an absolute file name
|
| Doing instead "addpath(genpath(pwd()))" and it works fine. It seems to
| me that this warning is therefore more of a pain than its worth..
How about the following change? Then you can use
warning off Octave:autoload-relative-file-name
in your ~/.octaverc file.
jwe
src/ChangeLog:
2007-03-22 John W. Eaton <address@hidden>
* src/parse.y (Fautoload): Use warning_with_id.
Index: src/parse.y
===================================================================
RCS file: /cvs/octave/src/parse.y,v
retrieving revision 1.275
diff -u -u -r1.275 parse.y
--- src/parse.y 2 Mar 2007 22:08:07 -0000 1.275
+++ src/parse.y 22 Mar 2007 18:18:13 -0000
@@ -3568,8 +3568,9 @@
std::string nm = argv[2];
if (! octave_env::absolute_pathname (nm))
- warning ("autoload: `%s' is not an absolute file name",
- nm.c_str ());
+ warning_with_id ("Octave:autoload-relative-file-name",
+ "autoload: `%s' is not an absolute file name",
+ nm.c_str ());
autoload_map[argv[1]] = nm;
}