Groups | Search | Server Info | Login | Register


Groups > comp.text.interleaf > #10

Re: Creating TOC/Index using a lisp script

Date 2012-07-18 08:38 -0400
From Dick Margulis <margulisd@comcast.net>
Newsgroups comp.text.interleaf
Subject Re: Creating TOC/Index using a lisp script
References <4fdf683c-0d15-4d06-bb14-e9a1ee6fcaa7@googlegroups.com> <lvqdnSdHzZWk3JnNnZ2dnUVZ_gKdnZ2d@supernews.com> <c6e5c571-e288-46d6-a56f-c7633a706818@googlegroups.com>
Message-ID <IKadnTDjQdr5M5vNnZ2dnUVZ_jednZ2d@supernews.com> (permalink)

Show all headers | View raw


On 7/16/2012 1:21 PM, RalfN wrote:
> Am Montag, 16. Juli 2012 18:28:14 UTC+2 schrieb Dick Margulis:
>> On 7/16/2012 10:57 AM, RalfN wrote:
>> &gt;
>> &gt; (defun create-toc-for-all (container)
>> &gt; ;creates a TOC for all docs in the conainer
>> &gt;     (let (children child)
>> &gt;       ;get all the unselected children
>> &gt;       (setq children (dt-children container :not-selected))
>> &gt;       ;select them
>> &gt;       (while (setq child (pop children))
>> &gt;         (tell child mid:set-props :selected t))
>> &gt;       ;create table of contents for all chidren
>> &gt;       (toc-create-selected container)
>> &gt; ))
>> &gt;
>> &gt; Unfortunately it does not work. It seems that there happens nothing.
>> &gt; Are there any ideas to make it work?
>> &gt;
>>
>> If you actually copied and pasted your script into your post (rather
>> than rekeying it), it&#39;s possible that the typo in the third line from
>> the bottom  (&quot;chidren&quot; instead of &quot;children&quot;) is the cause of your problem.
>
>
> Anything following a semicolon is a comment, so the typo will not take effect.
> I didn't expect such a fast response! :-)
>

Sorry, I'm an editor and book designer, not a Lisp programmer. I failed 
to take note of the semicolon, but my eye was drawn to the typo. Please 
ignore my irrelevant suggestion.

Back to comp.text.interleaf | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-16 07:57 -0700
  Re: Creating TOC/Index using a lisp script Dick Margulis <margulisd@comcast.net> - 2012-07-16 12:28 -0400
    Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-16 10:21 -0700
      Re: Creating TOC/Index using a lisp script Dick Margulis <margulisd@comcast.net> - 2012-07-18 08:38 -0400
        Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-18 11:44 -0700
  Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-08-02 11:04 -0700

csiph-web