[frogs] output port into a string?

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Hi all,

I'm trying to un-gimpify the text markup list.  This is part of the
automatically generated notation appendices.  In particular, I'm
trying to remove the @node ... @appendixsec   from the auto-generated
file, so that those commands can be in the notation-appendices.tely
file so that we can safely regenerate the @menu...@end menu sections.

A shorter explanation: scheme generates a file.  I want to generate
that file without the first two lines.

I succeeded with mark-list-commands.tely.  Unfortunately,
markup-commands.tely is generated by dumping text into a port, which
is a file -- instead of the (IMO much more sensible) way of generating
a string, them putting that string into a file.  The other notation
appendices are generated that way.

One option is to copy the dump-node definition in
scm/documentation-lib.scm, name the copy dump-non-node, and remove the
@node @section portion of the function.  But this feels like a crappy
"solution" to me.


Can scheme redirect an output port into a file?  If I could convert
this into a string, I can happily cut off the first 20 chars or so,
then dump the remainder into a file.

An alternate, and probably much better, solution is to rewrite
markup-doc-node in scm/document-markup.scm so that it returns a string
rather than using the <texi-node> thing, but I'm not eager to get into
such a rewrite.

If anybody has other suggestions for handling markup-commands.tely, or
wants to work on this themselves, that would be quite nice.  :)


This patch does the markup-line-commands.tely stuff:
http://codereview.appspot.com/2140041

Cheers,
- Graham

---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/