[EMAIL PROTECTED] (J. David Boyd) writes:

> Subject: {{Tasks:xx}}
> I know I turned this on somewhere, but I don't like seeing it in my tasks 
> list.

You might like the following code. Replace the filename with one to a
suitably small image, or grab
http://sacha.free.net.ph/notebook/pics/screen/id-small.png . =)

;;;_+ Marking up IDs as images

(defun planner-id-image (id)
  "Return the image to mark up ID as, or nil if none."
  (save-match-data (when (string-match "Tasks" id) 
"~/notebook/pics/screen/id-small.png")))

(defun planner-id-highlight-images (beg end &optional verbose)
  "Highlight IDs as pictures from BEG to END.
VERBOSE is ignored."
  (goto-char beg)
  (while (re-search-forward "{{[^}]+}}" end t)
    (let ((image (planner-id-image (match-string 0))))
      (when image
        (emacs-wiki-inline-image (match-beginning 0)
                                 (match-end 0)
                                 image
                                 (match-string 0))))))

(add-hook 'planner-mode-hook
          (lambda () (add-hook 'emacs-wiki-highlight-buffer-hook
                               'planner-id-highlight-images)))

> What would be the consequence of turning off whatever I turned on to make this
> show up?

Nothing bad will happen, although the old IDs won't be taken out.
Just remove (require 'planner-id) from your ~/.emacs. =)

Sacha

-- 
Sacha Chua <[EMAIL PROTECTED]> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, juggling
sachac on irc.freenode.net#emacs . YM: sachachua83


_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to