Code review - Issue 4888046: Fix 1816: Lilypond-Book: don't clear the auto-detected line-with, rather modify ithttps://codereview.appspot.com/2011-08-27T04:34:13+00:00rietveld
Message from unknown
2011-08-15T15:11:31+00:00Reinholdurn:md5:eaf81795470de8729fe515e95c60d7a8
Message from percival.music.ca@gmail.com
2011-08-15T21:34:16+00:00Graham Percival (old account)urn:md5:97370331aec4f3f45a89c8b53558e586
Thanks so much for looking into this!
http://codereview.appspot.com/4888046/diff/1/python/book_snippets.py
File python/book_snippets.py (left):
http://codereview.appspot.com/4888046/diff/1/python/book_snippets.py#oldcode424
python/book_snippets.py:424: if type == 'lilypond':
This part is only executed if we do not have a line width (line 404). But I thought we were getting the line width from latex? Does that info not get stored in self.option_dict for some reason?
I'm content to trust you that it works, but I'm having trouble following the logic of has_line_width and self.option_dict[LINE_WIDTH].
Message from reinhold.kainhofer@gmail.com
2011-08-15T21:50:51+00:00Reinholdurn:md5:5aabd2032ca4139f8870559c96c65ac6
http://codereview.appspot.com/4888046/diff/1/python/book_snippets.py
File python/book_snippets.py (left):
http://codereview.appspot.com/4888046/diff/1/python/book_snippets.py#oldcode424
python/book_snippets.py:424: if type == 'lilypond':
On 2011/08/15 21:34:16, Graham Percival wrote:
> This part is only executed if we do not have a line width (line 404).
Nope. In line 404 the dictionary contains just the explicitly given options. The default (e.g. auto-detected from LaTeX) are then later inserted in line 412.
has_line_width == True means that line-width was explicitly given as a snippet option.
> But I
> thought we were getting the line width from latex? Does that info not get
> stored in self.option_dict for some reason?
That's what lines 410-412 are doing.
> I'm content to trust you that it works, but I'm having trouble following the
> logic of has_line_width and self.option_dict[LINE_WIDTH].
That's why I added those two comments in lines 404 and 410 ;-)
Message from percival.music.ca@gmail.com
2011-08-26T03:11:59+00:00Graham Percival (old account)urn:md5:22ccbf44b6893c8319cb706530445f06
LGTM
Message from percival.music.ca@gmail.com
2011-08-27T04:34:13+00:00Graham Percival (old account)urn:md5:20f7009f4cce15b9a0096dc271ce8b0d
countdown over, please please push so that we can get a better idea of how many outstanding patches there are.