Hi Sacha,

Thanks for the hints, I now have a working planner-report and my first
patch to send to the list :-)

Besides making planner-report work with planner-muse, I also found a
small bug in the planner-report-remove-task-numbers behavior.

                    (if planner-report-remove-task-numbers
                        (setq task (planner-replace-regexp-in-string
                                    "^\\(#[A-C]\\)\\([0-9]+ +\\)"
-                                   "\\1 " task t t)))
+                                   "\\1 " task t nil)))

For some reason the literal flag was being set which meant I was
seeing "\1" show up in my report.

Anyhow, here's a patch.

Best,

+ seth

--- orig/planner-report.el
+++ mod/planner-report.el
@@ -141,8 +141,8 @@
         (while pages
           (when (caar pages)
             ;; Add only project pages, and skip other status reports
-            (unless (or (string-match planner-name-regexp (caar pages))
-                        (string-match "^StatusReport" (caar pages)))
+            (unless (or (string-match "^StatusReport" (caar pages))
+                        (string-match planner-date-regexp (caar pages)))
               (with-temp-buffer
                 (with-planner
                   (insert-file-contents-literally (cdar pages))
@@ -153,8 +153,7 @@
             ;; Insert a linked heading if we found anything
             (if (or notes tasks)
                 (insert "\n* [[" (caar pages) "]["
-                        (or (emacs-wiki-get-title-fast (cdar pages))
-                            (emacs-wiki-prettify-title (caar pages)))
+                        (muse-wiki-publish-pretty-title (caar pages))
                         "]]\n\n"))
             (when tasks
               (insert tasks "\n\n")
@@ -184,7 +183,7 @@
              (info (planner-current-note-info)))
         (when info
           (let* ((link (planner-note-link info))
-                 (date (if link (emacs-wiki-wiki-base link))))
+                 (date (if link (planner-link-base link))))
             ;; Snarf if note is associated with a date that is in range
             (and date
                  (not (string< date begin))
@@ -232,7 +231,7 @@
                    (if planner-report-remove-task-numbers
                        (setq task (planner-replace-regexp-in-string
                                    "^\\(#[A-C]\\)\\([0-9]+ +\\)"
-                                   "\\1 " task t t)))
+                                   "\\1 " task t nil)))
                    (setq result
                          (if result (concat result "\n" task) task))))))))
     result))
_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to