NEW: For a prettier blog interface, see the Wordpress version!
Tasks
| C1 | C | Feature: Write an aggregator that adds notes to planner plan pages--this is planner-search-notes-with-body for now {{Tasks:629}} (2004.04.22) |
| C2 | C | Support RSS 0.92 publication {{Tasks:588}} (2004.04.23) |
| C3 | X | Figure out how to put absolute URLs into the wiki feed {{Tasks:628}} (PlannerModeRSS) (2004.04.17) |
| C4 | X | Feature: Make it possible to use functions in the categorizing list {{Tasks:585}} {{Schedule:16:00-16:30}} (2004.05.15) |
Notes
1. Publishing absolute URLs in RSS feeds
(defvar sacha/emacs-wiki-use-absolute-url-flag nil
"Non-nil means publish absolute URLs.")
(defadvice planner-rss-add-note (around sacha/absolute-urls activate)
"Publish absolute URLs."
(let ((sacha/emacs-wiki-use-absolute-url-flag t))
ad-do-it))
(require 'w3m)
(defadvice emacs-wiki-markup-link (around sacha activate)
"Resolve the matched wiki-link into its ultimate <a href> form.
Images used the <img> tag."
;; avoid marking up urls that appear to be inside existing HTML
(when (and (not (eq (char-after (point)) ?\"))
(not (eq (char-after (point)) ?\>)))
(let* (string
(wiki-link (match-string 0))
(url (emacs-wiki-link-url wiki-link))
(name (emacs-wiki-escape-html-string
(emacs-wiki-wiki-visible-name wiki-link))))
(when url
(unless (emacs-wiki-wiki-url-p url)
(setq url
(file-relative-name
url
(if (string-match "public_html" url)
"../../public_html/notebook/plans"
"../../notebook/plans")))
(when sacha/emacs-wiki-use-absolute-url-flag
(setq url
(w3m-expand-url
url
"http://sacha.sachachua.com/notebook/wiki")))))
(setq string
(if (null url)
(if (and emacs-wiki-serving-p
(emacs-wiki-editable-p
(emacs-wiki-wiki-base wiki-link)))
(format
"<a class=\"nonexistent\" href=\"editwiki?%s\">%s</a>"
(emacs-wiki-wiki-base wiki-link) name)
(format "<a class=\"nonexistent\" href=\"%s\">%s</a>"
emacs-wiki-maintainer name))
(if (save-match-data
(string-match emacs-wiki-image-regexp url))
(if (string-equal url name)
(format "<img src=\"%s\" />" url)
(format "<img src=\"%s\" alt=\"%s\" />" url name))
(if (save-match-data
(string-match emacs-wiki-image-regexp name))
(format "<a href=\"%s\"><img src=\"%s\" /></a>" url name)
(format "<a href=\"%s\">%s</a>" url name)))))
(add-text-properties 0 (1- (length string))
'(rear-nonsticky (read-only) read-only
t) string)
(setq ad-return-value string))))
(defvar sacha/emacs-wiki-use-absolute-url-flag nil "Non-nil means publish absolute URLs.") (defadvice planner-rss-add-note (around sacha/absolute-urls activate) "Publish absolute URLs." (let ((sacha/emacs-wiki-use-absolute-url-flag t)) ad-do-it)) (require 'w3m) (defadvice emacs-wiki-markup-link (around sacha activate) "Resolve the matched wiki-link into its ultimate <a href> form. Images used the <img> tag." ;; avoid marking up urls that appear to be inside existing HTML (when (and (not (eq (char-after (point)) ?\")) (not (eq (char-after (point)) ?\>))) (let* (string (wiki-link (match-string 0)) (url (emacs-wiki-link-url wiki-link)) (name (emacs-wiki-escape-html-string (emacs-wiki-wiki-visible-name wiki-link)))) (when url (unless (emacs-wiki-wiki-url-p url) (setq url (file-relative-name url (if (string-match "public_html" url) "../../public_html/notebook/plans" "../../notebook/plans"))) (when sacha/emacs-wiki-use-absolute-url-flag (setq url (w3m-expand-url url "http://sacha.sachachua.com/notebook/wiki"))))) (setq string (if (null url) (if (and emacs-wiki-serving-p (emacs-wiki-editable-p (emacs-wiki-wiki-base wiki-link))) (format "<a class=\"nonexistent\" href=\"editwiki?%s\">%s</a>" (emacs-wiki-wiki-base wiki-link) name) (format "<a class=\"nonexistent\" href=\"%s\">%s</a>" emacs-wiki-maintainer name)) (if (save-match-data (string-match emacs-wiki-image-regexp url)) (if (string-equal url name) (format "<img src=\"%s\" />" url) (format "<img src=\"%s\" alt=\"%s\" />" url name)) (if (save-match-data (string-match emacs-wiki-image-regexp name)) (format "<a href=\"%s\"><img src=\"%s\" /></a>" url name) (format "<a href=\"%s\">%s</a>" url name))))) (add-text-properties 0 (1- (length string)) '(rear-nonsticky (read-only) read-only t) string) (setq ad-return-value string))))
I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at sacha@sachachua.com .