re: recompilation failure

2011-12-14 Thread 胡海鹏 - Hu Haipeng
Dear David,
  I just came back from Osaka, Japan. I just tried the latest build with 
modified mydefs.ly, and there are errors on #(define-music-function... at the 
second half of the file. But some such functions don't generate error. Why?

Regards
Haipeng




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure

2011-12-14 Thread David Kastrup
胡海鹏 - Hu Haipeng hhpmu...@163.com writes:

 Dear David,
   I just came back from Osaka, Japan. I just tried the latest build
 with modified mydefs.ly, and there are errors on #
 (define-music-function... at the second half of the file. But some
 such functions don't generate error. Why?

If you fixed the function where identifiers were broken in half, the
current build should compile fine (in particular, it should not be
disturbed by the Lilypond problems that hampered the last try).

And I would expect the error messages to be useful for pinpointing your
problem.

So how about posting them?

Some things break, and some things don't break.  Why? does not give
enough information for a programmer to give an answer, so you might want
to try asking a philosopher instead, or refine your question.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-06 Thread David Kastrup
胡海鹏 - Hu Haipeng hhpmu...@163.com writes:

 Hello,
   I modified some notes in my overture, and tried to recompile it. But
 Lilypond 2.15.20 suddenly aborted without any messages left in the
 log. It's at about bar 160, but I can't detect any error, because it
 compiled well when i use 2.13. I don't use anything changed during
 these months, except markuplines. I know the files are big, but could
 anyone tell me why lilypond aborted this way and how to find the
 error?

First, of course you use something changed during this month, and

convert-ly -ed *.ly

consequently makes a lot of changes.  It can't help, however, with
spurious newlines created by editing mistakes or botched copypaste
jobs.

So I recommend that you first try to get your document into a shape
where it would actually compile with a version of 2.13, then try
convert-ly on it.

And then there is one thing that is quite non-obvious and needs fixing:
a comment.

% direction (either #UP or #DOWN)

# and $ in comments inside of #{ ... #} are not completely
unproblematic.  $ was much more dangerous, now both $ and # are a bit
more low-profile.  I doubt that except for quite a short time in the
life cycle of 2.15 that this has ever worked.

With current 2.15, it will start working again if you put a space after
#DOWN.

The thing is that the Scheme reader engages after # and reads one
expression, and as opposed to a space, it can't silently swallow ) and
it can't back it up either.

I don't really think that creating convert-ly rules for this case
(defusing comments inside of #{ ... #}) makes all that much sense, but
it would be possible.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-06 Thread David Kastrup
David Kastrup d...@gnu.org writes:

 And then there is one thing that is quite non-obvious and needs fixing:
 a comment.

 % direction (either #UP or #DOWN)

 # and $ in comments inside of #{ ... #} are not completely
 unproblematic.  $ was much more dangerous, now both $ and # are a bit
 more low-profile.

[...]

 With current 2.15, it will start working again if you put a space after
 #DOWN.

Actually, the comment alone does not faze #(define-... #{ #}) so there
is something quite more fishy going on.  It still works when adding that
above-mentioned space, however.

I'll have to see what else is up here.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-06 Thread David Kastrup
David Kastrup d...@gnu.org writes:

 David Kastrup d...@gnu.org writes:

 And then there is one thing that is quite non-obvious and needs fixing:
 a comment.

 % direction (either #UP or #DOWN)

 # and $ in comments inside of #{ ... #} are not completely
 unproblematic.  $ was much more dangerous, now both $ and # are a bit
 more low-profile.

 [...]

 With current 2.15, it will start working again if you put a space after
 #DOWN.

 Actually, the comment alone does not faze #(define-... #{ #}) so there
 is something quite more fishy going on.  It still works when adding that
 above-mentioned space, however.

 I'll have to see what else is up here.

Crapola.  The Scheme reader _does_ read the trailing ), but does not
complain.  Instead it pushes it back to the port where it is digested
when the _next_ # is coming up.

So yes, I guess it should be possible to fix 2.15.x so that not even the
above comment will give it a hickup.  I'll take a look.

-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-06 Thread David Kastrup
David Kastrup d...@gnu.org writes:

 David Kastrup d...@gnu.org writes:

 David Kastrup d...@gnu.org writes:

 And then there is one thing that is quite non-obvious and needs fixing:
 a comment.

 % direction (either #UP or #DOWN)

 # and $ in comments inside of #{ ... #} are not completely
 unproblematic.  $ was much more dangerous, now both $ and # are a bit
 more low-profile.

 [...]

 With current 2.15, it will start working again if you put a space after
 #DOWN.

 Actually, the comment alone does not faze #(define-... #{ #}) so there
 is something quite more fishy going on.  It still works when adding that
 above-mentioned space, however.

 I'll have to see what else is up here.

 Crapola.  The Scheme reader _does_ read the trailing ), but does not
 complain.  Instead it pushes it back to the port where it is digested
 when the _next_ # is coming up.

 So yes, I guess it should be possible to fix 2.15.x so that not even the
 above comment will give it a hickup.  I'll take a look.

Currently doing the regtests, but the following trivial patch should be
able to defuse this comment if you can't wait until it has made it
through the channels.  The other problem in mydefs.ly is you
accidentally hitting return in the middle of a word.

From 208f17c5f239887caf59d6fc3f054791c2171d18 Mon Sep 17 00:00:00 2001
From: David Kastrup d...@gnu.org
Date: Tue, 6 Dec 2011 11:13:55 +0100
Subject: [PATCH] Fix an obscure  problem with #{ ... #xxx) #} where ) gets
 read twice

---
 scm/parser-ly-from-scheme.scm |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scm/parser-ly-from-scheme.scm b/scm/parser-ly-from-scheme.scm
index 7e17571..a2bc74c 100644
--- a/scm/parser-ly-from-scheme.scm
+++ b/scm/parser-ly-from-scheme.scm
@@ -43,6 +43,9 @@ from @var{port} and return the corresponding Scheme music expression.
 			 (if (or (char=? c #\#) (char=? c #\$))
  (let* ((p (ftell out))
 	(expr (read copycat)))
+   ;; kill unused lookahead, it has been
+   ;; written out already
+   (drain-input copycat)
    ;; only put symbols and non-quote
    ;; lists into closures -- constants
    ;; don't need lexical environments
-- 
1.7.5.4



-- 
David Kastrup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


re: recompilation failure

2011-12-06 Thread 胡海鹏 - Hu Haipeng
Dear David,
  Thank you for the further patch. I can wait for the fix, but don't know what 
you mean my hiding of return in mydefs.ly. This file was created mainly from 
many lilyponders' macros, and my ones are only text variables such as \rit, 
\allegro and some contexts.

Haipeng




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure

2011-12-06 Thread David Kastrup
胡海鹏 - Hu Haipeng hhpmu...@163.com writes:

 Dear David,
   Thank you for the further patch. I can wait for the fix, but don't
 know what you mean my hiding of return in mydefs.ly. This file was
 created mainly from many lilyponders' macros, and my ones are only
 text variables such as \rit, \allegro and some contexts.

The original mydefs.ly contains _several_ lines in the definition of
movement which have been split in the middle of identifiers.

movement =
#(define-music-function (parser location text duration count music)
  (string? string? integer? ly:music?)
  #{
\set Score . metronomeMarkFormatter = #(make-format-movement-
  markup-function $text)
\set Score . tempoWholesPerMinute = #$(ly:duration-length (string-
  duration duration))
\set Score . tempoUnitDuration = #$(string-duration duration)
\set Score . tempoUnitCount = #$count
$music
\set Score . metronomeMarkFormatter = #format-metronome-markup
  #})


-- 
David Kastrup


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-05 Thread m...@apollinemike.com
Le Dec 6, 2011 à 4:37 AM, 胡海鹏 - Hu Haipeng a écrit :

 Hello,
   I modified some notes in my overture, and tried to recompile it. But 
 Lilypond 2.15.20 suddenly aborted without any messages left in the log. It's 
 at about bar 160, but I can't detect any error, because it compiled well when 
 i use 2.13. I don't use anything changed during these months, except 
 markuplines. I know the files are big, but could anyone tell me why lilypond 
 aborted this way and how to find the error?
 
 Haipeng
 
  

Haipeng,

I'm having trouble compiling the documents.  In mydefs.ly, you have a few music 
functions that are not compiling at all.  Are you able to successfully launch 
the compilation at all?  Specifically, LilyPond is not liking tspan and 
movement.

Cheers,
MS

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: recompilation failure, strange

2011-12-05 Thread James
Haipeng,

2011/12/6 胡海鹏 - Hu Haipeng hhpmu...@163.com

 Hello,
   I modified some notes in my overture, and tried to recompile it. But
 Lilypond 2.15.20 suddenly aborted without any messages left in the log.
 It's at about bar 160, but I can't detect any error, because it compiled
 well when i use 2.13. I don't use anything changed during these months,
 except markuplines. I know the files are big, but could anyone tell me why
 lilypond aborted this way and how to find the error?


 How are you compiling your files?

For example are you using the command line

lilypond --pdf yourfile.ly

or are you using something else like drag and dropping the file (if you use
Windows)?

-- 
--

James
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user