# HG changeset patch # User wenzelm # Date 1573570949 -3600 # Node ID f31903cc57b01d5a9e6dd29e5c1eb9cf15bdbe59 # Parent 20c1b9516d271396dc972280ab814383fcc68fa5 clarified Console_Progress.echo: include empty lines as in other Progress instances, especially relevant for Progress.bash (e.g. "isabelle phabricator ./bin/config help"); diff -r 20c1b9516d27 -r f31903cc57b0 src/Pure/General/output.scala --- a/src/Pure/General/output.scala Mon Nov 11 17:32:40 2019 +0100 +++ b/src/Pure/General/output.scala Tue Nov 12 16:02:29 2019 +0100 @@ -21,25 +21,25 @@ def error_message_text(msg: String): String = cat_lines(split_lines(clean_yxml(msg)).map("*** " + _)) - def writeln(msg: String, stdout: Boolean = false) + def writeln(msg: String, stdout: Boolean = false, include_empty: Boolean = false) { - if (msg != "") { + if (msg.nonEmpty || include_empty) { if (stdout) Console.print(writeln_text(msg) + "\n") else Console.err.print(writeln_text(msg) + "\n") } } - def warning(msg: String, stdout: Boolean = false) + def warning(msg: String, stdout: Boolean = false, include_empty: Boolean = false) { - if (msg != "") { + if (msg.nonEmpty || include_empty) { if (stdout) Console.print(warning_text(msg) + "\n") else Console.err.print(warning_text(msg) + "\n") } } - def error_message(msg: String, stdout: Boolean = false) + def error_message(msg: String, stdout: Boolean = false, include_empty: Boolean = false) { - if (msg != "") { + if (msg.nonEmpty || include_empty) { if (stdout) Console.print(error_message_text(msg) + "\n") else Console.err.print(error_message_text(msg) + "\n") } diff -r 20c1b9516d27 -r f31903cc57b0 src/Pure/System/progress.scala --- a/src/Pure/System/progress.scala Mon Nov 11 17:32:40 2019 +0100 +++ b/src/Pure/System/progress.scala Tue Nov 12 16:02:29 2019 +0100 @@ -60,7 +60,7 @@ class Console_Progress(verbose: Boolean = false, stderr: Boolean = false) extends Progress { override def echo(msg: String): Unit = - Output.writeln(msg, stdout = !stderr) + Output.writeln(msg, stdout = !stderr, include_empty = true) override def theory(theory: Progress.Theory): Unit = if (verbose) echo(theory.message)