From 841670d5de9e8b6cbcc44e1561d0863dc3f9ce30 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 27 Aug 2003 20:47:52 +0000 Subject: [PATCH] (read_pipe): only store and display error log if verbose not set. (read_pipe): only display log if it contains something. --- ChangeLog | 6 ++++++ input/test/move-notehead.ly | 23 +++++++++++++++++++++++ input/test/tie-cross-voice.ly | 22 ++++++++++++++++++++++ python/lilylib.py | 10 ++++++++-- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 input/test/move-notehead.ly create mode 100644 input/test/tie-cross-voice.ly diff --git a/ChangeLog b/ChangeLog index 54dd12bce4..02922cea43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-27 Han-Wen Nienhuys + + * python/lilylib.py (read_pipe): only store and display error log + if verbose not set. + (read_pipe): only display log if it contains something. + 2003-08-27 Jan Nieuwenhuizen * Documentation/misc/GNUmakefile: Re-add. diff --git a/input/test/move-notehead.ly b/input/test/move-notehead.ly new file mode 100644 index 0000000000..9a2117f33d --- /dev/null +++ b/input/test/move-notehead.ly @@ -0,0 +1,23 @@ + +\version "1.9.1" +\header { texidoc = "@cindex Scheme Move Notehead + +You can move objects around with the property extra-offset. This +example shows how to move noteheads around. It uses the +@code{\outputproperty} command. + +" } + +fragment = \notes { + \outputproperty #(make-type-checker 'note-head-interface) + #'extra-offset = #'(2 . 3) + c''2 c +} + +\paper { raggedright = ##t} + +\score { + \notes\relative c \fragment + \paper { } +} + diff --git a/input/test/tie-cross-voice.ly b/input/test/tie-cross-voice.ly new file mode 100644 index 0000000000..45e02d886f --- /dev/null +++ b/input/test/tie-cross-voice.ly @@ -0,0 +1,22 @@ +#(ly:set-option 'old-relative) +\version "1.9.1" + + + +\header { + texidoc = "Cross voice ties can be faked by blanking noteheads." + } + + +\score { +\context Staff \notes { +\relative c'' < + { + \once \property Voice.Stem \set #'transparent = ##t + b8~ b8 } + \\ + { b[ g8] } +> +} +\paper { raggedright = ##t } +} diff --git a/python/lilylib.py b/python/lilylib.py index 89104b84e9..e705cb1e15 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -241,10 +241,13 @@ def error_log (name): return tempfile.mktemp ('%s.errorlog' % name) def read_pipe (cmd, mode = 'r'): + + redirect = '' error_log_file = '' if __main__.verbose_p: progress (_ ("Opening pipe `%s\'") % cmd) + else: error_log_file = error_log (command_name (cmd)) redirect = ' 2>%s' % error_log_file @@ -259,9 +262,12 @@ def read_pipe (cmd, mode = 'r'): if status: error (_ ("`%s\' failed (%d)") % (cmd, exit_status)) + if not __main__.verbose_p: - error (_ ("The error log is as follows:")) - sys.stderr.write (open (error_log (command_name (cmd)).read ())) + contents = open (error_log_file).read () + if contents: + error (_ ("The error log is as follows:")) + sys.stderr.write (contents) exit (status) if __main__.verbose_p: -- 2.39.2