[Top][All Lists]
[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 12:24:04 -0500 |
On 11/30/05, Sacha Chua <address@hidden> wrote:
> Dale Smith <address@hidden> writes:
>
> > What must I do to get these to work again, or what is the proper
> > planner-muse way of getting the same thing?
>
> The new planner-sectionalize code trampled on our <notes> tag, but I
> have a very ugly hack at
> http://sacha.free.net.ph/notebook/emacs/planner-muse-config.el that
> gets notes working again for me. =)
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. But when I
C-x C-e (planner-notes-get-headlines) in the same page, it returns the
list of items as it should. I'm stumped. (note that the doc strings
are left over from where I cut and pasted. Sorry.)
(require 'assoc)
(aput 'planner-publish-markup-tags "notes-toc" '(nil nil
dsmith/planner-publish-notes-tag))
(aput 'planner-publish-markup-tags "index" '(nil nil
dsmith/planner-generate-index))
(defun dsmith/planner-generate-index (beg end)
"Generate an index of all Wiki pages.
List planner pages separately. If AS-LIST is non-nil, format it
as a list. If EXCLUDE-PRIVATE is non-nil, exclude anything for
which `muse-project-private-p' returns non-nil."
(delete-region beg end)
(insert (planner-index-as-string nil 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"))
- Re: [emacs-wiki-discuss] Re: <notes> and <index> tags in Planner,
Dale Smith <=