Re: Planner: calendar code now works better

René <[email protected]>
Newsgroups gmane.emacs.wiki.general
Message-ID <[email protected]>
Michael Olson <mwolson <at> gnu.org> writes:

> Instead of all the hook-adding cruft, now all you have to do
> is put the "<calendar>" tag exactly where you want the calendar to be
> published, whether that's the header, footer, or day page template.

I just tried it and it works although it leads to the following error when
publishing the page:

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  insert(nil)
  apply(insert nil)
  muse-insert-markup(nil)
  apply(muse-insert-markup nil)
  (if (fboundp (quote muse-insert-markup)) (apply (quote muse-insert-markup)
args) (let (...) (apply ... args) (muse-publish-mark-read-only beg ...)))
  planner-insert-markup(nil)
  (let ((arrows ...) (wiki ...)) (delete-region beg end) (planner-insert-markup
"<div class=\"calendar\">\n") (planner-insert-markup (planner-calendar-from-wiki
arrows wiki)) (planner-insert-markup "</div>\n"))
  planner-publish-calendar-tag(1925 #<marker at 1925 in  *muse-temp*<2>
0xa92a114> nil)
  apply(planner-publish-calendar-tag (1925 #<marker at 1925 in  *muse-temp*<2>
0xa92a114> nil))
  muse-publish-markup-tag()
  muse-publish-markup("finalizing Planner page" ((200 "<\\(calendar\\)>" 0
muse-publish-markup-tag)))
  planner-publish-finalize-buffer()
  apply(planner-publish-finalize-buffer nil)
  byte-code("..." [keyword elem list direct value style assoc signal
muse-assertion-failed (consp style) t apply throw handled :base nil muse-style
muse-get-keyword muse-style-element base muse-publishing-current-style
muse-publishing-styles func args] 6)
  muse-style-run-hooks(:after (:base "my-planner-xhtml" :path
"~/muse-target/agenda"))
  muse-publish-markup-buffer("index" (:base "my-planner-xhtml" :path
"~/muse-target/agenda"))
  muse-publish-file("/home/jlk/muse-source/agenda/index.muse" (:base
"my-planner-xhtml" :path "~/muse-target/agenda") "~/muse-target/agenda" t)
  muse-project-publish-file("/home/jlk/muse-source/agenda/index.muse" ((:base
"my-planner-xhtml" :path "~/muse-target/agenda")) t)
  #<compiled-function (project &optional force) "...(223)" [pair forced-files
value muse-publishing-styles styles project muse-project-of-file assoc signal
muse-assertion-failed (consp project) nil 1 completing-read "Publish with style:
" t error "Cannot find a project to publish" muse-project-save-buffers
run-hook-with-args muse-before-project-publish-hook :force-publish
muse-project-file-alist muse-project-publish-file delete
muse-after-project-publish-hook message "All pages in %s have been published."
"No pages in %s need publishing at this time." --dolist-temp--73911
--dolist-temp--73912 published file-alist file muse-current-project direct list
muse-project-alist keyword force] 7
("/usr/share/xemacs21/site-lisp/muse-el/muse-project.elc" . 15741) (list
(muse-read-project "Publish project: " nil t)
current-prefix-arg)>(("WikiPlanner" ("~/muse-source/agenda" :default
"WelcomePage" :force-publish ("index") :major-mode planner-mode :visit-link
planner-visit-link) (:base "my-planner-xhtml" :path "~/muse-target/agenda")) nil)
  call-interactively(muse-project-publish)
  recursive-edit()
  byte-code("..." [buffer-read-only noninteractive debugger-buffer middlestart
debugger-args debugger-batch-max-lines pop-to-buffer debugger-mode
debugger-setup-buffer count-lines 2 "...\n" message buffer-string kill-emacs
debug backtrace-debug 3 t debugger-reenable "" nil recursive-edit
standard-output] 3)
  debug(error (wrong-type-argument char-or-string-p nil))
  insert(nil)
  apply(insert nil)
  muse-insert-markup(nil)
  apply(muse-insert-markup nil)
  (if (fboundp (quote muse-insert-markup)) (apply (quote muse-insert-markup)
args) (let (...) (apply ... args) (muse-publish-mark-read-only beg ...)))
  planner-insert-markup(nil)
  (let ((arrows ...) (wiki ...)) (delete-region beg end) (planner-insert-markup
"<div class=\"calendar\">\n") (planner-insert-markup (planner-calendar-from-wiki
arrows wiki)) (planner-insert-markup "</div>\n"))
  planner-publish-calendar-tag(1925 #<marker at 1925 in  *muse-temp* 0xa1e8e0c> nil)
  apply(planner-publish-calendar-tag (1925 #<marker at 1925 in  *muse-temp*
0xa1e8e0c> nil))
  muse-publish-markup-tag()
  muse-publish-markup("finalizing Planner page" ((200 "<\\(calendar\\)>" 0
muse-publish-markup-tag)))
  planner-publish-finalize-buffer()
  apply(planner-publish-finalize-buffer nil)
  byte-code("..." [keyword elem list direct value style assoc signal
muse-assertion-failed (consp style) t apply throw handled :base nil muse-style
muse-get-keyword muse-style-element base muse-publishing-current-style
muse-publishing-styles func args] 6)
  muse-style-run-hooks(:after (:base "my-planner-xhtml" :path
"~/muse-target/agenda"))
  muse-publish-markup-buffer("index" (:base "my-planner-xhtml" :path
"~/muse-target/agenda"))
  muse-publish-file("/home/jlk/muse-source/agenda/index.muse" (:base
"my-planner-xhtml" :path "~/muse-target/agenda") "~/muse-target/agenda" t)
  muse-project-publish-file("/home/jlk/muse-source/agenda/index.muse" ((:base
"my-planner-xhtml" :path "~/muse-target/agenda")) t)
  muse-project-publish(("WikiPlanner" ("~/muse-source/agenda" :default
"WelcomePage" :force-publish ("index") :major-mode planner-mode :visit-link
planner-visit-link) (:base "my-planner-xhtml" :path "~/muse-target/agenda")) nil)

--
René
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.