From: Han-Wen Nienhuys Date: Wed, 27 Nov 2002 00:02:50 +0000 (+0000) Subject: * scripts/ly2dvi.py (include_path): print warning if failing anything. X-Git-Tag: release/1.7.9~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=722c6964353630deed172f199b674280ebc24061;p=lilypond.git * scripts/ly2dvi.py (include_path): print warning if failing anything. * python/lilylib.py (error): add space --- diff --git a/ChangeLog b/ChangeLog index e735d83733..38b675de5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2002-11-27 Han-Wen Nienhuys + + * scripts/ly2dvi.py (include_path): print warning if failing anything. + + * python/lilylib.py (error): add space + +2002-11-25 Han-Wen Nienhuys + + * GNUmakefile.in (EXTRA_DIST_FILES): add lilypond.words for + distribution. + +2002-11-24 Han-Wen Nienhuys + + * lily/paper-outputter.cc (Paper_outputter): close port when + finishing score. + 2002-11-26 Jan Nieuwenhuizen * scm/sodipodi.scm: Fixes. @@ -93,7 +109,8 @@ 2002-11-20 Han-Wen Nienhuys - * lily/beam-engraver.cc (stop_translation_timestep): reset now_stop_ev_ + * lily/beam-engraver.cc (stop_translation_timestep): reset + now_stop_ev_ * lily/scm-option.cc: add parse-protect to ly:set-option @@ -104,15 +121,16 @@ * lily/include/ligature-bracket.hh: removed * lily/ligature-bracket.cc: removed - * lilypond-mode.el (LilyPond-expand-alist): set LaTeX extension to .tex + * lilypond-mode.el (LilyPond-expand-alist): set LaTeX extension to + .tex * lily/beam.cc (set_beaming): don't change beam count on rests. (brew_molecule): always set flag-width > 0. 2002-11-19 Heikki Junes - * lilypond-mode.el: LilyPond-imenu-generic-re: only alphabetic chars, - remove instructions; instead, refer to lilypond-init.el and + * lilypond-mode.el: LilyPond-imenu-generic-re: only alphabetic + chars, remove instructions; instead, refer to lilypond-init.el and Documentation/topdocs/INSTALL.texi. * lilypond.words: add identifiers and reserved words. diff --git a/GNUmakefile.in b/GNUmakefile.in index fb3ad034c9..242c59b712 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -20,7 +20,7 @@ SCRIPTS = configure aclocal.m4 autogen.sh README_FILES = ChangeLog COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore lexer-gcc-3.1.sh +EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore lexer-gcc-3.1.sh lilypond.words NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) INSTALLATION_DIR=$(local_lilypond_datadir) INSTALLATION_FILES=$(configuration) VERSION diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 6e36de07d4..aa3acc9966 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -23,28 +23,27 @@ LY_DEFINE (ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0, LY_DEFINE (ly_get_grob_property, "ly:get-grob-property", 2, 0, 0, (SCM grob, SCM sym), - "Get the value of a value in grob @var{g} of property @var{sym}. It -will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set. - -Grob properties are stored as GUILE association lists, with symbols as -keys. All lookup functions identify undefined properties with -end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C) - -Properties are stored in two ways: -@itemize @bullet -@item mutable properties. -Grob properties that change from object to object. The storage of -these are private to a grob. For example pointers to other grobs are -always stored in the mutable properties. - -@item immutable properties. -Grob properties that are shared across different grobs of the same -type. The storage is shared, and hence it is read-only. Typically, this -is used to store function callbacks, and default settings. They are -initially read from @file{scm/grob-description.scm}. -@end itemize - -") + "Get the value of a value in grob @var{g} of property @var{sym}. It\n" +"will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.\n" +"\n" +"Grob properties are stored as GUILE association lists, with symbols as\n" +"keys. All lookup functions identify undefined properties with\n" +"end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C)\n" +"\n" +"Properties are stored in two ways:\n" +"@itemize @bullet\n" +"@item mutable properties.\n" +"Grob properties that change from object to object. The storage of\n" +"these are private to a grob. For example pointers to other grobs are\n" +"always stored in the mutable properties.\n" +"\n" +"@item immutable properties.\n" +"Grob properties that are shared across different grobs of the same\n" +"type. The storage is shared, and hence it is read-only. Typically, this\n" +"is used to store function callbacks, and default settings. They are\n" +"initially read from @file{scm/grob-description.scm}.\n" +"@end itemize\n" +"\n") { Grob * sc = unsmob_grob (grob); SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob"); diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 45001766d6..ce4bc59a0b 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -52,7 +52,8 @@ Paper_outputter::Paper_outputter (String name) Paper_outputter::~Paper_outputter () { - + scm_close_port (file_); + file_ = SCM_EOL; } diff --git a/lily/scm-option.cc b/lily/scm-option.cc index bded4946d7..ddcfecb6f7 100644 --- a/lily/scm-option.cc +++ b/lily/scm-option.cc @@ -121,18 +121,14 @@ LY_DEFINE (ly_set_option, "ly:set-option", 2, 0, 0, (SCM var, SCM val), */ - ; } else { warning (_("Unknown internal option!")); } - return SCM_UNSPECIFIED; } - - diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index d860e60024..2666360e23 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -3,5 +3,5 @@ % % Running LilyPond on this file generates the documentation % -#(ly:set-parse-protect #f) +#(ly:set-option 'parse-protect #f) #(load-from-path "generate-documentation.scm") diff --git a/python/lilylib.py b/python/lilylib.py index 683585d0a8..2eeb328440 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -120,10 +120,10 @@ def progress (s): sys.stderr.write (s) def warning (s): - sys.stderr.write (__main__.program_name + ":" + _ ("warning: ") + s + '\n') + sys.stderr.write (__main__.program_name + ": " + _ ("warning: ") + s + '\n') def error (s): - sys.stderr.write (__main__.program_name + ":" + _ ("error: ") + s + '\n') + sys.stderr.write (__main__.program_name + ": " + _ ("error: ") + s + '\n') def exit (i): if __main__.verbose_p: diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 95b83cb1d6..8fba5384cf 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -406,6 +406,27 @@ Rest can contain a list of beat groupings (not (eq? #f (memq symbol (ly:get-grob-property elt 'interfaces)))))) +;; +(define-public (smart-bar-check n) + "Make a bar check that checks for a specific bar number. +" + (let* + ( + (m (make-music-by-name 'ApplyContext)) + ) + + (define (checker tr) + (let* ((bn (ly:get-context-property tr 'currentBarNumber))) + (if (= bn n) + #t + (error + (format "Bar check failed, we should have reached ~a, instead at ~a\n" + n bn )) + ))) + + (ly:set-mus-property! m 'procedure checker) + m + )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; warn for bare chords at start. diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index c614059fda..ab2e5b0422 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -530,8 +530,22 @@ None. if extra['orientation'] and extra['orientation'][0] == 'landscape': opts = opts + ' -tlandscape' + if 'PDF' in targets: - opts = opts + ' -Ppdf -G0 -u lilypond.map' + where = os.popen ('kpsewhich feta20.pfa').read() + + pfa_file = None + if where: + try: + pfa_file = open (where, 'r') + except IOError: + pass + + if pfa_file: + opts = opts + ' -Ppdf -G0 -u lilypond.map' + else: + ly.warning (_ ('''Trying create PDF, but no PFA fonts found. +Using bitmap fonts instead. This will look poorly.''')) cmd = 'dvips %s -o%s %s' % (opts, outbase + '.ps', outbase + '.dvi') ly.system (cmd) @@ -737,19 +751,19 @@ if 1: try: run_lilypond (files, dep_prefix) except: + ### ARGH. This also catches python programming errors. + ### this should only catch lilypond nonzero exit status + ### --hwn + + # TODO: friendly message about LilyPond setup/failing? # - # TODO: lilypond should fail with different - # error codes for: - # - guile setup/startup failure - # - font setup failure - # - init.ly setup failure - # - parse error in .ly - # - unexpected: assert/core dump targets = [] if verbose_p: traceback.print_exc () - + else: + ly.warning (_("Running LilyPond failed. Rerun with --verbose for a trace.")) + # Our LilyPond pseudo filter always outputs to 'lelie' # have subsequent stages and use 'lelie' output. if pseudo_filter_p: @@ -779,11 +793,14 @@ if 1: if 'PS' in targets: try: run_dvips (outbase, extra_init) + except: if 'PS' in targets: targets.remove ('PS') if verbose_p: traceback.print_exc () + else: + ly.warning (_("Failed to make PS file. Rerun with --verbose for a trace.")) if 'PNG' in targets: ly.make_preview (outbase) @@ -808,6 +825,9 @@ if 1: targets.remove ('PS') if verbose_p: traceback.print_exc () + else: + ly.warning (_("Running LaTeX falied. Rerun with --verbose for a trace.")) + # add DEP to targets? if track_dependencies_p: