Does warning ID "Octave:text_interpreter" exist?

I happened to be reviewing the list of Octave warning IDs in warning_ids.m and came across

## @item Octave:text_interpreter
## If the @code{Octave:text_interpreter} warning is enabled, a warning is
## printed when the @qcode{"interpreter"} property of a text graphics object
## is set to the unsupported value of @qcode{"latex"}.  Even when enabled,
## the warning message is printed just once per Octave session.
## By default, the @code{Octave:glyph-render} warning is enabled.
##

Does this ID exist? I couldn’t find it with grep in the code. Also, it looks like this might be a possible copy&paste error because the bottom of the help text refers to Octave:glyph-render which is a real ID.

If this is unused I’d like to delete it from the stable branch ahead of the 7.1 release.

When the latex interpreter is requested and Octave can’t find a suitable latex tool chain, it now emits a warning with ID Octave:LaTeX:internal-error. So, at least, the statement in warning_ids.m should be removed or changed to mention Octave:LaTeX:internal-error instead.

Okay, I added the correct warning ID to the file warning_ids.m. See octave: b20da6bed444.

Yes, the warning still exists. It is used in scripts/plot/util/private/__gnuplot_draw_axes__.m:

$ grep -r "Octave:text_interpreter"
doc/interpreter/octave.info-2:‘Octave:text_interpreter’
doc/interpreter/octave.info-2:     If the ‘Octave:text_interpreter’ warning is enabled, a warning is
scripts/plot/util/print.m:      warning ("off", "Octave:text_interpreter", "local");
scripts/plot/util/private/__gnuplot_draw_axes__.m:      do_warn = (warning ("query", "Octave:text_interpreter")).state;
scripts/plot/util/private/__gnuplot_draw_axes__.m:        warning ("Octave:text_interpreter",
scripts/plot/util/private/__gnuplot_draw_axes__.m:        do_warn = (warning ("query", "Octave:text_interpreter")).state;
scripts/plot/util/private/__gnuplot_draw_axes__.m:          warning ("Octave:text_interpreter",

If the warning had been removed since, you could have also used hg grep --diff "Octave:text_interpreter" to find the commits that last added or removed it (it was first added with cset d17eecaf4a14)

1 Like

@Pantxo: Would the warning id in these functions need to be replaced by the new one, too?

The origin and the signification of the two warnings are very different, so I guess no. We probably need to add Octave:text_interpreter back in warning_ids.m and make it clear that it is Gnuplot only.

1 Like

That’s the “right” thing to do. Although, since Octave support for gnuplot is minimal and declining it’s only if someone wants to. I should have used grep -r but was led astray by the references to glyph-render and so only searched in the libinterp/ directory.