Jim Ottaway <[EMAIL PROTECTED]> writes:
>>>>>> Sacha Chua <[EMAIL PROTECTED]> writes: > >> Right. We need a link regexp that matches both implicit and >> explicit links, and we propbably shouldn't hardcode that. On my >> system, I've added a sacha/muse-link-regexp, but that's hackish >> like anything. > > Perhaps muse-wiki-wikiword-regexp could be used. Hmm. Loading > muse-wiki actually installs it into muse as well. It probably > shouldn't do that. Why not? If you don't want bare WikiWords to be matched, just set muse-wiki-use-wikiword to nil. > Assuming it has been made possible to require muse-wiki without > actually installing it, the regexp could be a squashing together of > muse-explicit-link-regexp, muse-wiki-wikiword-regexp, and a version > of planner-date-regexp that matches on substrings. I'm really not a fan of making a generic regexp that matches both explicit and implicit links. It was a lot simpler to make Muse do what it does now, which is as follows. Term :: a "handler" is a routine that cycles through a list of functions, passing the link to each one that is called - a distinct regexp for explicit links - a handler for explicit links that can "intercept" the links before they are put in final form -- if no function handles the link, still accept it - a very generic regexp for implicit links, which is only used by muse-link-at-point - a handler for implicit links detected by this generic regexp that calls a customizable list of functions -- at least one function must provide a match, or the link is ignored > For the date regexp, I suppose one would have something like > > (defvar planner-date-regexp-substring > "\\([1-9][0-9][0-9][0-9]\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\'" > > (defvar planner-date-regexp > (concat "\\`" planner-date-regexp-substring "\\'")) > > in planner.el. That could potentially useful. Or even: (defvar planner-date-regexp "\\([1-9][0-9][0-9][0-9]\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)") and use (concat "\\`" planner-date-regexp "\\'") whenever the entire string must be a date. -- Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: anime, Debian, XHTML, wiki, Emacs Lisp /` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG |_] | \| |_| Jabber: mwolson_at_hcoop.net
pgpR6ytu8QZHQ.pgp
Description: PGP signature
_______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss