[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: Extra brackets in Planner-Muse
From: |
Michael Olson |
Subject: |
[emacs-wiki-discuss] Re: Extra brackets in Planner-Muse |
Date: |
Mon, 07 Nov 2005 15:13:37 -0500 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Jim Ottaway <address@hidden> writes:
>>>>>> Sacha Chua <address@hidden> 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
pgpuju_Vj0MwP.pgp
Description: PGP signature
- Re: [emacs-wiki-discuss] Extra brackets in Planner-Muse, (continued)
- Re: [emacs-wiki-discuss] Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/05
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Marco Gidde, 2005/11/05
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/05
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/05
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Marco Gidde, 2005/11/05
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/05
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Sacha Chua, 2005/11/05
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/06
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Sacha Chua, 2005/11/06
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/06
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse,
Michael Olson <=
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/07
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Sacha Chua, 2005/11/08
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/08
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Michael Olson, 2005/11/20
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/20
- Re: [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Jim Ottaway, 2005/11/07
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Marco Gidde, 2005/11/06
- [emacs-wiki-discuss] Re: Extra brackets in Planner-Muse, Michael Olson, 2005/11/20