Sun 09 Feb 2014 10:52:57 PM UTC, comment #9:
Felipe: I don't think Jordi was referring to this particular setting when he was referring to "stupid" cosmetic things. I suspect he was referring to things like fixed_point_format and struct_levels_to_print, which don't change behavior but only serve to make results harder to read.
I would certainly welcome some kind of discussion and come to a consensus agreement on what kinds of things should and should not be configured with the --traditional option. This bug report is probably not the place for that discussion, and since it is fixed for version 4.0, this bug should now be closed again.
|
Sun 09 Feb 2014 10:51:50 PM UTC, comment #8:
Rik: I see, you are right of course, I was testing with stable. This was fixed for the upcoming 4.0 release:
http://hg.savannah.gnu.org/hgweb/octave/rev/d96747f74b1e
So yes, this is fixed.
|
Sun 09 Feb 2014 10:40:27 PM UTC, comment #7:
My point in comment #4 is that we already seem to be adding the line numbers to backtraces anyways. I don't think we need to change any code at all as the option is already on by default for regular and --traditional users.
|
Sun 09 Feb 2014 09:56:40 PM UTC, comment #6:
there's no need to call any user's preferences stupid.
if this is going to be octave's default setting, fine.
otherwise, ex-matlab users would be pleased to have it.
the arguments against having this in --traditional
could equally be made against any of the other settings
currently existing in --traditional, such as:
page_screen_output (false)
print_empty_dimensions (false)
struct_levels_to_print (0)
sure, every new user could rediscover these exist
and set heir own octaverc accordingly, but why
relegate only the unimportant stuff to --traditional?
|
Sun 09 Feb 2014 08:57:45 PM UTC, comment #5:
That's what it looks like to me in the bug history as well. The point seemed to be made that if the user wants it, the preference is in place to set that, but it is not enabled by default. The user is expected to call
in a personal or site octaverc file. Felipe's contribution is to want to enable this setting by default with --traditional, similar to how other variables are set to different defaults with --traditional. I'm not sure I agree with that approach, I've made the argument to him on other bugs that Octave is configurable and users should be able to set up octaverc files that set defaults and keybindings, and not defer to --traditional to set even more things to certain baked-in "braindead" defaults.
|
Sun 09 Feb 2014 08:44:36 PM UTC, comment #4:
The bug was closed because the original question had been addressed. At any rate, I think Jordi is right that if we always want to enable backtrace for warnings then the fix doesn't belong in the option handler for '--traditional'. It would need to be in the initialization routine for warning(). But, this seems to be the case already. Take a look at error.cc where I find
Isn't Octave doing the right thing already?
|
Sun 09 Feb 2014 06:16:57 PM UTC, comment #3:
I think you misunderstand the nature of --traditional. It is not a magical "make everything look like Matlab" feature. Normally, we are trying to make everything look like Matlab, even without --traditional. We only use it for cosmetic things that Matlab does that are just plain stupid, as many traditions are, and we don't typically want to emulate them. That's why "--braindead" is an alias to "--traditional".
In this case, this patch should probably always be enabled, since I agree that it's not very helpful to get warnings without immediately knowing where they're happening.
Also, why is this report closed? I'm reopening.
|
Fri 07 Feb 2014 09:53:04 PM UTC, comment #2:
could you please apply the patch attached,
which enable such behavior be default on --traditional.
thanks.
(file #30483)
|
Wed 11 Aug 2010 06:31:14 AM UTC, comment #1:
Try warning("on", "backtrace").
|
Wed 04 Aug 2010 11:13:11 PM UTC, original submission:
I often get this warning, and would like to know what line generates it:
"warning: implicit conversion from scalar to string"
I imagine it can use dbstack to gather the information, at least in an m-file?
|