Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: RalfN Newsgroups: comp.text.interleaf Subject: Re: Creating TOC/Index using a lisp script Date: Thu, 2 Aug 2012 11:04:04 -0700 (PDT) Organization: http://groups.google.com Lines: 25 Message-ID: <99557991-9e15-4e6e-a968-c9f8e12540f9@googlegroups.com> References: <4fdf683c-0d15-4d06-bb14-e9a1ee6fcaa7@googlegroups.com> NNTP-Posting-Host: 31.150.72.83 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1343930742 18027 127.0.0.1 (2 Aug 2012 18:05:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 2 Aug 2012 18:05:42 +0000 (UTC) In-Reply-To: <4fdf683c-0d15-4d06-bb14-e9a1ee6fcaa7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=31.150.72.83; posting-account=Z8GX-woAAAA29SCZhFNeDWtejPVYnCAA User-Agent: G2/1.0 X-Received-Bytes: 2006 Xref: csiph.com comp.text.interleaf:12 > > I found some code for creating a toc, but for Ileaf 5. > (defun create-toc-for-all (container) > ;creates a TOC for all docs in the conainer > (let (children child) > ;get all the unselected children > (setq children (dt-children container :not-selected)) > ;select them > (while (setq child (pop children)) > (tell child mid:set-props :selected t)) > ;create table of contents for all chidren > (toc-create-selected container) > )) > Unfortunately it does not work. It seems that there happens nothing. > Are there any ideas to make it work? Randyl Kent Plampin helped me in his competent way to make it work and patiently answered my questions. The original example in Weinberger's book was correct. The only reason it did not work at first was the missing code that actually invokes the example. ; Here is the missing code (create-toc-for-all (dt-child-selected (dt-pointer-container))) Now it works fine!