From 80bb174de95ebb8a08e5bdfae0855c525b8e7736 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 28 Mar 2004 12:04:31 +0000 Subject: [PATCH] * input/mutopia/W.A.Mozart/mozart-hrn-3.ly: Mozart died in 1791 * python/lilylib.py (command_name): don't return 1st path component. * scripts/lilypond-book.py (Lilypond_snippet.is_outdated): treat .png case separately. * python/lilylib.py (system): typo. --- ChangeLog | 12 ++++++++++++ VERSION | 2 +- input/mutopia/W.A.Mozart/mozart-hrn-3.ly | 2 +- python/lilylib.py | 9 ++++++--- scm/font.scm | 18 ++++++++---------- scripts/lilypond-book.py | 12 ++++++------ 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index af39afdeb1..a6b69ee620 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-03-28 Han-Wen Nienhuys + + * input/mutopia/W.A.Mozart/mozart-hrn-3.ly: Mozart died in 1791 + + * python/lilylib.py (command_name): don't return 1st path + component. + + * scripts/lilypond-book.py (Lilypond_snippet.is_outdated): treat + .png case separately. + + * python/lilylib.py (system): typo. + 2004-03-28 Jan Nieuwenhuizen * Documentation/user/preface.itely: Run texinfo-all-menus-update. diff --git a/VERSION b/VERSION index aeaa26a910..a2757e59c0 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_LEVEL=34 +PATCH_LEVEL=35 MY_PATCH_LEVEL= diff --git a/input/mutopia/W.A.Mozart/mozart-hrn-3.ly b/input/mutopia/W.A.Mozart/mozart-hrn-3.ly index 482b81fa7f..5091326ac3 100644 --- a/input/mutopia/W.A.Mozart/mozart-hrn-3.ly +++ b/input/mutopia/W.A.Mozart/mozart-hrn-3.ly @@ -1,7 +1,7 @@ \header{ title = "Konzert Nr. 3 Es dur" subtitle = "für Horn und Orchester" - composer = "Wolfgang Amadeus Mozart (1756-1792)" + composer = "Wolfgang Amadeus Mozart (1756-1791)" enteredby = "HWN" opus = "KV 447" diff --git a/python/lilylib.py b/python/lilylib.py index 7bac5a445f..a705e7d0fc 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -234,10 +234,13 @@ def setup_temp (): return __main__.temp_dir def command_name (cmd): - return re.match ('^[^a-z0-9_-]*([a-z0-9_-]*)', cmd).group (1) + + # deal with "((latex ) >& 1 ) .." too + cmd = re.match ("([\(\)]*)([^ ]*)", cmd).group(2) + return os.path.split (cmd)[1] def error_log (name): - name = re.sub('[^a-z]','x',name) + name = re.sub('[^a-z]','x', name) return tempfile.mktemp ('%s.errorlog' % name) def read_pipe (cmd, mode = 'r'): @@ -326,7 +329,7 @@ Exit status of CMD ''' error (msg) if not progress_p and error_log_file: error (_ ("The error log is as follows:")) - sys.stderr.write (error_log_file).read () + sys.stderr.write (open (error_log_file).read ()) if error_log_file: os.unlink (error_log_file) exit (status) diff --git a/scm/font.scm b/scm/font.scm index ec561cc5ab..ffe7b00ce5 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -118,25 +118,23 @@ ((qual (font-qualifier node)) (def (font-default node)) (val (chain-assoc-get qual alist-chain def)) - (desired-font (lookup-font - (hashq-ref (font-children node) - val) alist-chain)) - - (default (hashq-ref (font-children node) def)) - (font (if desired-font - desired-font - (g-lookup-font (hashq-ref (font-children node) - def) alist-chain))) + (desired-child (hashq-ref (font-children node) val)) ) - font)) + + (if desired-child + (g-lookup-font desired-child alist-chain) + (g-lookup-font (hashq-ref (font-children node) def) alist-chain) + ))) (define-method (g-lookup-font (node ) alist-chain) node) +;; two step call is handy for debugging. (define (lookup-font node alist-chain) (g-lookup-font node alist-chain)) + (define-public (make-font-tree factor) (let* ((n (make-font-tree-node 'font-encoding 'music)) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 4f90a8efd6..b84d2976cd 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -511,12 +511,12 @@ class Lilypond_snippet (Snippet): def is_outdated (self): base = self.basename () - ## FIXME: adding PNG to is_outdated test fixes - ## interrupted (web) builds. - ## should only do this if PNG is actually target - if os.path.exists (base + '.ly') \ - and os.path.exists (base + '.tex') \ - and os.path.exists (base + '.png') \ + + require = ['.ly', '.tex'] + if format == HTML: + require.append ('.png') + require = [os.path.exists (base + x) for x in require] + if reduce (lambda a,b: a and b, require) \ and (use_hash_p \ or self.ly () == open (base + '.ly').read ()): # TODO: something smart with target formats -- 2.39.2