emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] Re: <notes> and <index> tags in Planner


From: Dale Smith
Subject: Re: [emacs-wiki-discuss] Re: <notes> and <index> tags in Planner
Date: Thu, 1 Dec 2005 15:18:47 -0500

On 12/1/05, Dale Smith <address@hidden> wrote:
> Thanks Sachac.  Based on that code, I've come up with this.  The
> <index> works. (Yay!), but the <notes-toc> does not. :(   It seems
> that planner-notes-get-headlines is always returning nil.
>
> (defun dsmith/planner-publish-notes-tag (beg end)
>   "Replace the region BEG to END with the notes for this page.
> Idiosyncratic."
>   (delete-region beg end)
>   (insert "\n")
>   (mapcar
>    (lambda (item)
>      (insert (format " - [[%s%s][%s]]\n"
>                      (planner-page-name)
>                      (car item)
>                      (cdr item))))
>    (planner-notes-get-headlines))
>   (insert "\n"))

Ok. I think I've figured out what's going on, but I'm not sure how to fix it.

By the time this function is called, we are in some kind of temporary
buffer that will eventually become the .html file (or whatever).  This
buffer has already been heavily modified buy the time this is called,
and the notes are no longer recognizable to
planner-notes-get-headlines.

I can think of two solutions.

1. Switch to the .muse buffer while calling
planner-notes-get-headlines.  I don't know how to find the name of
this buffer.  Is there some planner or muse function that returns
this?

2. Write something similar to planner-notes-get-headline that
understands the current transformed-to-xml buffer.

Any suggestions?

  -Dale




reply via email to

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