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

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

Re: [emacs-wiki-discuss] Re: can you help me with some formatting issues


From: Joe Corneli
Subject: Re: [emacs-wiki-discuss] Re: can you help me with some formatting issues
Date: Tue, 23 Mar 2004 23:56:27 -0600

   ... Preliminary testing seems to indicate that customizing the
   following regular expression should just Do The Right Thing.
   (Wow.)
   
   (defcustom emacs-wiki-extended-link-regexp
     "\\[\\[\\([^][\t\n]+\\)\\]\\(\\[\\([^][\n]+\\)\\]\\)?\\]"
     "Regexp used to match [[extended][links]]."
     :type 'regexp
     :group 'emacs-wiki)
   
   You'll want to set it to
   
     "\\[\\[\\([^][ \t\n]+\\)\\]\\(\\[\\([^][\n]+\\)\\]\\)?\\]"
   
   (Just add a space.)


This doesn't seem to be right.  This 

[^][ \t\n]

is an _excluded_ character list (matches everything *but* bracketleft,
bracketright, space, tab, and
).

You might want something like

(setq emacs-wiki-extended-link-regexp
  
"\\[\\[\\([^][\t\n]\\)+[[:space:]]?\\([^][\t\n]\\)+\\]\\(\\[\\([^][\n]+\\)\\]\\)?\\]")

"two bracketlefts, followed by some allowed characters, followed by
an optional space, followed by some more allowed characters,
followed by a bracket right, etc."

But, N.B., this _particular_ attempt doesn't work either.  

And just giving \\([[:space:]]\\|\\([^][\t\n]\\)\\)+ seems to make
my emacs hang.




reply via email to

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