I’m using Mathematica 13.2.
Warnings and Messages are going to the Messages window (Console?) and not the the actual notebook. This used to be changeable under Settings, but now has to be done under the Options Inspector.
If I go to the Options Inspector under Global Options | Message Options, KernelMessageAction is set to “PrintToNotebook”, but they are going to the Console. In addition, these settings are all grayed-out and I can’t change them.
How do I get my warnings and messages to display in the Notebook and not in this separate window? I makes it difficult to generate Paclet Documentation that demonstrates warning and/or error conditions.
TIA,
Jeff
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=OptionInspector.png&userId=2149042
I’ve figured out how to change these parameter programmatically using either SetOptions or CurrentValue built-in functions. I have now set “ConsoleMessageAction”->“PrintToNotebook” under $FrontEnd.
Still, all messages go to the Console.
A simple 1/0 evaluation shows this.
In[12]:= 1/0
Out[12]= ComplexInfinity
Then I checked the current settings value for “KernelMessageAction” under $FronEndSession.
In[15]:= CurrentValue[$FrontEndSession, {MessageOptions, "KernelMessageAction"}]
Out[15]= "PrintToConsole"
Wait. What? How is this getting set?
Let’s change it.
In[16]:=
CurrentValue[$FrontEndSession, {MessageOptions, "KernelMessageAction"}] = "PrintToNotebook"
Out[16]= "PrintToNotebook"
Now our divide by zero test prints the error message to the Notebook.
In[17]:= 1/0
During evaluation of In[17]:= Power::infy: Infinite expression 1/0 encountered.
Out[17]= ComplexInfinity
So, how is this getting set in $FrontEndSession?
While this fixes my problem, I’m not sure how it got set this way. If I shutdown Mathematica and start it back up, it seems that the change is permanent.
Solved for now.
Looks like the act of pressing the Preview button on paclet documentation page authoring is setting this to Console (makes sense as this operation needs a place to issue messages), but is not setting it back to Notebook once the Preview is created.