clarified message channel for 'print_state' (NB: the command was originally for TTY or Proof General);
authorwenzelm
Wed, 07 Sep 2022 11:25:49 +0200
changeset 76077 0f48e873e187
parent 76076 6508c21734f1
child 76078 1600fb749c54
clarified message channel for 'print_state' (NB: the command was originally for TTY or Proof General);
NEWS
src/Pure/Pure.thy
--- a/NEWS	Wed Sep 07 11:17:46 2022 +0200
+++ b/NEWS	Wed Sep 07 11:25:49 2022 +0200
@@ -37,6 +37,13 @@
 in building a session.
 
 
+*** Isabelle/jEdit Prover IDE ***
+
+* Command 'print_state' outputs a plain message ("writeln" instead of
+"state"). Thus it is displayed in the Output panel, even if the option
+"editor_output_state" is disabled.
+
+
 *** Isabelle/VSCode Prover IDE ***
 
 * VSCodium, an open-source distribution of VSCode without MS telemetry,
--- a/src/Pure/Pure.thy	Wed Sep 07 11:17:46 2022 +0200
+++ b/src/Pure/Pure.thy	Wed Sep 07 11:25:49 2022 +0200
@@ -1302,7 +1302,7 @@
   Outer_Syntax.command \<^command_keyword>\<open>print_state\<close>
     "print current proof state (if present)"
     (opt_modes >> (fn modes =>
-      Toplevel.keep (Print_Mode.with_modes modes (Output.state o Toplevel.string_of_state))));
+      Toplevel.keep (Print_Mode.with_modes modes (Output.writeln o Toplevel.string_of_state))));
 
 val _ =
   Outer_Syntax.command \<^command_keyword>\<open>welcome\<close> "print welcome message"