Re: Set indent based on instrument name (issue 6457049)

2012-08-04 Thread m...@mikesolomon.org
On 4 août 2012, at 09:28, k-ohara5...@oco.net wrote: > On 2012/08/01 06:45:22, MikeSol wrote: > >> Avoid measuring extents when engraving is happening because they could > be >> dependent on other callbacks which could trigger many layout decisions > before >> engraving is finished. > > > This

Re: Set indent based on instrument name (issue 6457049)

2012-08-04 Thread Keith OHara
On Sat, 04 Aug 2012 00:37:21 -0700, wrote: On 2012/08/04 07:28:29, Keith wrote: On 2012/08/01 06:45:22, MikeSol wrote: > Avoid measuring extents when engraving is happening because they could be > dependent on other callbacks which could trigger many layout decisions before > engraving

Re: Set indent based on instrument name (issue 6457049)

2012-08-04 Thread dak
On 2012/08/04 07:28:29, Keith wrote: On 2012/08/01 06:45:22, MikeSol wrote: > Avoid measuring extents when engraving is happening because they could be > dependent on other callbacks which could trigger many layout decisions before > engraving is finished. > This is a case where measuri

Re: Set indent based on instrument name (issue 6457049)

2012-08-04 Thread k-ohara5a5a
On 2012/08/01 06:45:22, MikeSol wrote: Avoid measuring extents when engraving is happening because they could be dependent on other callbacks which could trigger many layout decisions before engraving is finished. This is a case where measuring extents early seems appropriate. Phil wants

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread mtsolo
Hey Phil! First and foremost, congrats on this work. I'm thrilled to see you venturing into the C++ side. You're tackling an issue that, while just a few lines of code, uses a lot of advanced LilyPond structures, so it's not easy. My suggestions don't have to do with the math (all of it is fin

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Trevor Daniels
Graham Percival wrote Tuesday, July 31, 2012 4:41 PM > One slight quibble: if a user explicitly sets indent=1\cm, then I > think it's fair to let the instrument name go off the left-hand > side of the page. I agree. This probably means making the default for indent (and short-indent) to be call

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Graham Percival
On Tue, Jul 31, 2012 at 04:13:20PM +0100, Phil Holmes wrote: > - Original Message - From: "David Kastrup" > >So _how_ are you trying to accommodate? Increase indent until the > >instrument name fits wholly in the text width? Let it stick out > >somewhat? How much? > > Increase the inde

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: "David Kastrup" To: "Phil Holmes" Cc: Sent: Tuesday, July 31, 2012 3:40 PM Subject: Re: Set indent based on instrument name (issue 6457049) "Phil Holmes" writes: I can't actually help here since either problem descrip

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
"Phil Holmes" writes: >> I can't actually help here since either problem description or what the >> patch is trying to achieve is utterly absent from the issue. >> >> http://code.google.com/p/lilypond/issues/detail?id=2703> >> >> "Set indent based on instrument name" is all that is described >> a

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Graham Percival
On Tue, Jul 31, 2012 at 03:47:42PM +0200, David Kastrup wrote: > Graham Percival writes: > > > I think this is a bit too far. Phil is trying to solve a > > long-standing *extremely* annoying bug for documentation writers > > which has not attracted much attention from "real" programmers. > > I

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: "David Kastrup" To: Sent: Tuesday, July 31, 2012 2:47 PM Subject: Re: Set indent based on instrument name (issue 6457049) Graham Percival writes: On Tue, Jul 31, 2012 at 02:14:17PM +0200, David Kastrup wrote: And if you think this

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: To: ; ; ; ; Cc: ; Sent: Tuesday, July 31, 2012 2:36 PM Subject: Re: Set indent based on instrument name (issue 6457049) http://codereview.appspot.com/6457049/diff/4001/lily/output-def.cc File lily/output-def.cc (right): http://codereview.appspot.com

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
Graham Percival writes: > On Tue, Jul 31, 2012 at 02:14:17PM +0200, David Kastrup wrote: >> And if you think this is purely hypothetical, check out >> Documentation/snippets/incipit.ly. > > David, thank you for identifying a specific problematic example. > >> There are exceptions to every rule.

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread dak
http://codereview.appspot.com/6457049/diff/4001/lily/output-def.cc File lily/output-def.cc (right): http://codereview.appspot.com/6457049/diff/4001/lily/output-def.cc#newcode275 lily/output-def.cc:275: set_inst_name_len (Real long_inst_name_len, Real short_inst_name_len) Correct me if I am wrong

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Graham Percival
On Tue, Jul 31, 2012 at 02:14:17PM +0200, David Kastrup wrote: > And if you think this is purely hypothetical, check out > Documentation/snippets/incipit.ly. David, thank you for identifying a specific problematic example. > There are exceptions to every rule. But if you are calling for an > exc

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Bernard Hurley
On Tue, Jul 31, 2012 at 12:59:16PM +0200, David Kastrup wrote: > Graham Percival writes: > > > On Mon, Jul 30, 2012 at 11:44:28PM +0100, Bernard Hurley wrote: > >> On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote: > >> > - Original Message - From: > >> >> lily/output-def.cc:38

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
"Phil Holmes" writes: >>> Question is - is it OK to modify my code to use statics, >> >> No. Even engravers at score level are running in parallel, like when >> using a \score markup or using the part combiner or quoting music and so >> on. Static variables just don't work in this setting. > >

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: "David Kastrup" To: Sent: Tuesday, July 31, 2012 12:50 PM Subject: Re: Set indent based on instrument name (issue 6457049) "Phil Holmes" writes: - Original Message - From: "David Kastrup" To: Sent: Tuesday, July

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
"Phil Holmes" writes: > - Original Message - > From: "David Kastrup" > To: > Sent: Tuesday, July 31, 2012 12:04 PM > Subject: Re: Set indent based on instrument name (issue 6457049) > > >> "Phil Holmes" writes: >> >&g

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: "David Kastrup" To: Sent: Tuesday, July 31, 2012 12:04 PM Subject: Re: Set indent based on instrument name (issue 6457049) "Phil Holmes" writes: I'd be happy to change it if someone could suggest an improvement. When I initiall

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
"Phil Holmes" writes: > I'd be happy to change it if someone could suggest an improvement. > When I initially asked how this could be done, Keith said: > > "Maybe each Instrument_name_engraver, one for each staff, could push > information to a central location" > > which does sound rather like a

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread David Kastrup
Graham Percival writes: > On Mon, Jul 30, 2012 at 11:44:28PM +0100, Bernard Hurley wrote: >> On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote: >> > - Original Message - From: >> >> lily/output-def.cc:38: Real long_name_len = 0.0; >> >> could these be class member variables ins

Re: Set indent based on instrument name (issue 6457049)

2012-07-31 Thread Phil Holmes
- Original Message - From: "Graham Percival" To: "Bernard Hurley" Cc: "Phil Holmes" ; ; ; ; Sent: Tuesday, July 31, 2012 12:12 AM Subject: Re: Set indent based on instrument name (issue 6457049) On Mon, Jul 30, 2012 at 11:44:28PM +0100, Bernard

Re: Set indent based on instrument name (issue 6457049)

2012-07-30 Thread Graham Percival
On Mon, Jul 30, 2012 at 11:44:28PM +0100, Bernard Hurley wrote: > On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote: > > - Original Message - From: > >> lily/output-def.cc:38: Real long_name_len = 0.0; > >> could these be class member variables instead of global variables? > > >

Re: Set indent based on instrument name (issue 6457049)

2012-07-30 Thread Bernard Hurley
On Mon, Jul 30, 2012 at 10:14:37PM +0100, Phil Holmes wrote: > - Original Message - From: >> lily/output-def.cc:38: Real long_name_len = 0.0; >> could these be class member variables instead of global variables? > > I don't believe so. I'd be happy to be corrected by someone who > unders

Re: Set indent based on instrument name (issue 6457049)

2012-07-30 Thread Phil Holmes
- Original Message - From: To: ; ; Cc: ; Sent: Monday, July 30, 2012 6:54 PM Subject: Re: Set indent based on instrument name (issue 6457049) Little nitpicks based on my C++ experience in other projects, with no knowledge whatsoever of lilypond internals. http

Re: Set indent based on instrument name (issue 6457049)

2012-07-30 Thread graham
Little nitpicks based on my C++ experience in other projects, with no knowledge whatsoever of lilypond internals. http://codereview.appspot.com/6457049/diff/4001/lily/instrument-name-engraver.cc File lily/instrument-name-engraver.cc (right): http://codereview.appspot.com/6457049/diff/4001/lily/

Re: Set indent based on instrument name (issue 6457049)

2012-07-30 Thread PhilEHolmes
Please review. http://codereview.appspot.com/6457049/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: Set indent based on instrument name (issue 6457049)

2012-07-29 Thread David Kastrup
David Kastrup writes: > "Phil Holmes" writes: > >> - Original Message - >> From: >> To: ; >> Cc: ; >> Sent: Sunday, July 29, 2012 9:16 PM >> Subject: Re: Set indent based on instrument name (issue 6457049) >> >> >>

Re: Set indent based on instrument name (issue 6457049)

2012-07-29 Thread David Kastrup
"Phil Holmes" writes: > - Original Message - > From: > To: ; > Cc: ; > Sent: Sunday, July 29, 2012 9:16 PM > Subject: Re: Set indent based on instrument name (issue 6457049) > > >> On 2012/07/29 18:20:16, PhilEHolmes wrote: >>> My firs

Re: Set indent based on instrument name (issue 6457049)

2012-07-29 Thread Phil Holmes
- Original Message - From: To: ; Cc: ; Sent: Sunday, July 29, 2012 9:16 PM Subject: Re: Set indent based on instrument name (issue 6457049) On 2012/07/29 18:20:16, PhilEHolmes wrote: My first attempt at coding in LilyPond. Treat me gently... I think we should be able to do

Re: Set indent based on instrument name (issue 6457049)

2012-07-29 Thread dak
On 2012/07/29 18:20:16, PhilEHolmes wrote: My first attempt at coding in LilyPond. Treat me gently... I think we should be able to do better than just counting characters in a string. It should be possible calculating physical string width, shouldn't it? http://codereview.appspot.com/6457049

Set indent based on instrument name (issue 6457049)

2012-07-29 Thread PhilEHolmes
Reviewers: dak, Graham Percival, Message: My first attempt at coding in LilyPond. Treat me gently... Description: An attempt to set the line indent based upon the instrument name. The simple use of instrumentName.length() to add to the indent seems odd, but works in practice. Not tested with