Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-09-05 Thread Han-Wen Nienhuys
On Mon, Aug 24, 2009 at 6:29 PM, Joe Neeman wrote: >> This value will be written in the output ps file, but seems to have no >> effect. >> To sum up: What's the intention of this line-width value in ps output files? > > I agree; it seems to have no effect. It also appears not to be > duplicated in

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-09-05 Thread Michael Käppler
Hi Joe, I agree; it seems to have no effect. It also appears not to be duplicated in the other backends, despite the comment. Perhaps it's obsolete code? Maybe. I hope somebody on the list (Han-Wen?) can explain why this was added. Is this a kind of meta-information, which is just stored in t

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-24 Thread Joe Neeman
On Mon, 2009-08-17 at 14:44 +0200, Michael Käppler wrote: > There's no top-level paper block, so default-paper will only contain > what's stored in paper-defaults-init.ly. > The ps output engine in framework-ps.scm:92, however, looks for a > >global< line-width. Currently, this line-width is jus

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-17 Thread Michael Käppler
Joe Neeman wrote: I think the concatenation happens in parser.yy:847. Rather than creating a new paper block every time \paper is seen, we just make a clone of the most recent \paper block and start appending stuff to it. I don't think there's a way (in the parser, at least) to tell when we've fi

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-16 Thread Joe Neeman
On Sun, 2009-08-16 at 19:31 +0200, Michael Käppler wrote: > Michael Käppler wrote: > > Hi Joe, > >> get_paper is called more than once for each paper block. The first time > >> is probably from parser.yy:847, which actually _creates_ the first paper > >> block (so no variables have been parsed at a

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-16 Thread Michael Käppler
Michael Käppler wrote: Hi Joe, get_paper is called more than once for each paper block. The first time is probably from parser.yy:847, which actually _creates_ the first paper block (so no variables have been parsed at all). Perhaps a better place for normalize() would be after parser.yy:830, wh

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-15 Thread Joe Neeman
On Fri, 2009-08-14 at 19:00 +0200, Michael Käppler wrote: > Hmm...there's a new problem I don't understand. > If I set a breakpoint in lily-parser.cc:225 (get_paper) and call > normalize() from there, it seems that all "default" variables which are > set in paper-defaults-init.ly aren't accessibl

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-14 Thread Michael Käppler
Hmm...there's a new problem I don't understand. If I set a breakpoint in lily-parser.cc:225 (get_paper) and call normalize() from there, it seems that all "default" variables which are set in paper-defaults-init.ly aren't accessible. What's the reason for this? Are the *.ly-initfiles parsed lat

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-14 Thread Michael Käppler
Probably because cloning an output-def does not copy the parent_ pointer (so recursive lookups are broken by ly:paper-params-normalize). Joe Thanks, Joe, for pointing this out. Now, after thinking a lot about it, I will try a different approach and control/modify the paper values immediat

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-13 Thread Joe Neeman
On Thu, 2009-08-13 at 23:46 +0100, Neil Puttock wrote: > 2009/8/12 Michael Käppler : > > > hmm... somehow I'm completely stuck at this moment. Why does the affected > > output-def contain no paper-width / paper-height etc.? I don't really know > > how this can be triggered by my patch since it clo

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-13 Thread Neil Puttock
2009/8/12 Michael Käppler : > hmm... somehow I'm completely stuck at this moment. Why does the affected > output-def contain no paper-width / paper-height etc.? I don't really know > how this can be triggered by my patch since it clones the output-def and > modifies only the margin and line-width

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-12 Thread Michael Käppler
Hi Neil, These are unsafe, since they return SCM_UNSPECIFIED instead of a Real if the paper variables aren't defined; using robust_scm2double () here will ensure a default is returned. You can see the consequences of variable lookup failure by running bookparts.ly (http://git.savannah.gnu.org/g

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Michael Käppler
Mark Polesky wrote: Michael, Don't forget, you need to mention on -devel that you've posted to Rietveld, and include the link. You'll also need to close it when it's approved/resolved (CG 8.7.9). Here's Michael's patch: http://codereview.appspot.com/104085 - Mark Hi Mark, first I was uns

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Mark Polesky
Michael Käppler wrote: > For a single commit it is enough to do just git-cl upload without having > to pass a commitish. > Maybe it would be useful to add this information to CG 8.7.7, too. Michael, Don't forget, you need to mention on -devel that you've posted to Rietveld, and include the lin

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Michael Käppler
It's completely separate from git. The easiest way to get it is to clone the repository, git clone git://neugierig.org/git-cl.git then add symlinks for the scripts `git-cl' and `upload.py'. Neil (or someone), can you add this info to the CG? For a single commit it is enough to do ju

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Michael Käppler
Neil Puttock wrote: This and the following docstring lines are too long. Is there a common line length for docstrings? This should also be mentioned in the CG, I think. + Real paper_width = scm_to_double (lookup_variable (ly_symbol2scm ("paper-width"))); + Real left_margin_default = scm_t

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Neil Puttock
2009/8/11 Michael Käppler : > here is the first draft of a patch concerning the margin settings for > review. Some comments: + "Checks whether @code{left-margin}, @code{right-margin} and @code{line-width)" {line-width} This and the following docstring lines are too long. + Real pap

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Neil Puttock
2009/8/11 Mark Polesky : > Neil (or someone), can you add this info to the CG? Sure, will do. Regards, Neil ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Mark Polesky
Neil Puttock wrote: > It's completely separate from git. > > The easiest way to get it is to clone the repository, > > git clone git://neugierig.org/git-cl.git > > then add symlinks for the scripts `git-cl' and `upload.py'. Neil (or someone), can you add this info to the CG? Thanks. - Mark

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Neil Puttock
2009/8/11 Michael Käppler : > Thanks, Mark. I've updated my git package and installed git-web but git-cl > doesn't work for me. > Doesn't it belong to the normal git package? It's completely separate from git. The easiest way to get it is to clone the repository, git clone git://neugierig.org/g

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Michael Käppler
Mark Polesky wrote: See CG 8.7.7 "Post patch for comments": http://kainhofer.com/~lilypond/Documentation/contributor/Adding-or-modifying-features.htm Thanks, Mark. I've updated my git package and installed git-web but git-cl doesn't work for me. Doesn't it belong to the normal git package? Che

Re: [PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Mark Polesky
Michael Käppler wrote: > here is the first draft of a patch concerning the margin > settings for review. (I would like to upload it on Rietveld but > I don't know how) See CG 8.7.7 "Post patch for comments": http://kainhofer.com/~lilypond/Documentation/contributor/Adding-or-modifying-features.htm

[PATCH] Re: feature-request / doc-actualization (right-margin)

2009-08-11 Thread Michael Käppler
Hi all, here is the first draft of a patch concerning the margin settings for review. (I would like to upload it on Rietveld but I don't know how) The goals are: - make default margin settings accessible from *.ly stuff (now in paper-defaults-init.ly) - set line-width automatically depending

Re: feature-request / doc-actualization (right-margin)

2009-08-08 Thread Michael Käppler
This is because line-spacing is done earlier than page-spacing - Lily needs a value for line-width when doing horizontal spacing. Therefore line-width isn't really discarded - but later in page.scm it is overwritten, so you can't see it in the page layout. What I wasn't unable to figure out is

Re: feature-request / doc-actualization (right-margin)

2009-08-03 Thread John Mandereau
Le dimanche 02 août 2009 à 21:27 +0200, Michael Käppler a écrit : > What I wasn't unable to figure out is at which time line-width is > calculated if you don't set it explicitly. And, much more confusing, I > don't see any procedures in C++ that actually check the line-width. A > "grep -R line-w

Re: feature-request / doc-actualization (right-margin)

2009-08-02 Thread Michael Käppler
Hi Maximilian, 1) The code in scm/page.scm is able to test whether left-margin and/or right-margin was specified by the user in the \paper block (if this isn't the case, the value is #f). However, the same doesn't seem to be true for line-width because this variable _always_ has a value (i.e., it

Re: feature-request / doc-actualization (right-margin)

2009-07-27 Thread Maximilian Albert
2009/7/27 Werner : >> Are the two sentences in "Known issues and warnings" in the Horizontal >> dimensions section clear enough? > > Sorry - I hadn't seen this. It is clear. So the doc is OK. > But the feature-request to provide right-margin remains. Wondering why this is so difficult that it has

Re: feature-request / doc-actualization (right-margin)

2009-07-27 Thread Werner
> Are the two sentences in "Known issues and warnings" in the Horizontal > dimensions section clear enough? Sorry - I hadn't seen this. It is clear. So the doc is OK. But the feature-request to provide right-margin remains. Werner ___ lilypond-deve

Re: feature-request / doc-actualization (right-margin)

2009-07-27 Thread Patrick McCarty
On Mon, Jul 27, 2009 at 08:37:41AM +, Werner wrote: > page-formatting, > paper-block, vertical an horizontal spacing: > > right-margin: if right margin is given, line-width is determined as > paper-width > (from paper-size) minus left-margin minus right-margin. > > If there is given right ma

feature-request / doc-actualization (right-margin)

2009-07-27 Thread Werner
page-formatting, paper-block, vertical an horizontal spacing: right-margin: if right margin is given, line-width is determined as paper-width (from paper-size) minus left-margin minus right-margin. If there is given right margin AND line-width, the last given argument should be used. (Maybe a war