emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: Hello World!, and Node Categories?


From: Michael Olson
Subject: [emacs-wiki-discuss] Re: Hello World!, and Node Categories?
Date: Fri, 01 Apr 2005 13:41:13 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

JM Ibanez <address@hidden> writes:

> I've been using emacs-wiki.el for a few months now, in particular via
> PlannerMode. I was wondering-- is it possible to 'categorize' nodes?
> For example, is it possible to tag SomePage as belonging to
> CategorySundryPages and then have CategorySundryPages have a tag which
> inserts the list of pages which are part of CategorySundryPages ? I'm
> unfortunately not very familiar with elisp (or LISP for that matter),
> and would gladly code this if possible-- maybe hack
> emacs-wiki-backlink and some magic to display that in pages which are
> named Category* with a <index> tag?

That sounds like a good idea.  I don't have time to fully implement
this, but here's a code snippet that might help you get started.

(defun get-matched-list (regexp)
  "Return the name and destination of Wiki pages that match REGEXP."
  (let ((list nil))
    (dolist (file-and-destination (emacs-wiki-file-alist))
      (when (string-match regexp (car file-and-destination))
        (push file-and-destination list)))
    list))

To test this out, copy it to the *scratch* buffer and hit C-M-x (alt +
control + x).  Then bring up a Wiki page and hit M-: (alt + shift + :
or ;).  Type (get-matched-list "foo") and you will see a list of pages
that match "foo".

You might need to (require 'cl-macs), but I don't know for certain.

Your site looks quite nice, by the way.

-- 
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Jabber: mwolson_at_hcoop.net -- IRC: mwolson on freenode.net: #muse, #pulug
  /` |\ | | |
 |_] | \| |_|   Interests: anime, Debian GNU/Linux, XHTML, wiki, Lisp

Attachment: pgpw9dcG7Ze7E.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]