[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Joe Neeman
Subject: Re: [PATCH] Re: feature-request / doc-actualization (right-margin)
Date: Mon, 17 Aug 2009 12:47:18 +1000

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 all). Perhaps a better place
> >> for normalize() would be after parser.yy:830, where it will only be
> >> called once for each paper block
> > I recently tried to call normalize () from parser.yy:506 since 
> > parser.yy:830 won't work for top-level \paper expressions, right?
> > What I need to understand now is how the parser concatenates different 
> > \paper {} blocks. (e.g. from and the compiled 
> > source file)

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 finished
dealing with all the paper blocks. Perhaps you'll need to normalize the
paper block a bit later on (like Book::process).

> Forgot to cc' the list, sorry for that.
> Btw., another question:
> Is there a way to inspect Output_def objects with gdb to see what 
> bindings are included? Something like scm_list_modules (foo)?

You may need to do
(gdb) set overload-resolution off
and then you can inspect individual bindings with
(gdb) p od->lookup_variable(scm_str2symbol("output-scale"))
if the binding isn't included, you'll get 0x204 (SCM_UNDEFINED). I don't
know how to list all of the bindings.

A little off-topic, but I find it helpful to have the macro
def ps
  call ly_display_scm($arg0)
defined in my .gdbinit. Then you do "ps" above instead of "p".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]