emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question aboug Regexp
@ 2006-05-23  3:02 Todd Neal
  2006-05-23  3:58 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Todd Neal @ 2006-05-23  3:02 UTC (permalink / raw)
  To: emacs-orgmode



I am looking at why the following link does not work:

[[elisp: (+ 1 2 3)]]

I think that the problem lies with this regexp:

     1	(defconst org-link-re-with-space2
     2	  (concat
     3	   "<?\\(" (mapconcat 'identity org-link-types "\\|") "\\):"
     4	   "\\([^" org-non-link-chars " ]"
     5	   "[^]\t\n\r]*"
     6	   "[^" org-non-link-chars " ]\\)>?")
     7	   "Matches a link with spaces, optional angular brackets around it.")


I am more used to PCRE so I may be incorrect, but is the "[^]" a typo?


Also we have the following definition:

(defconst org-non-link-chars "]\t\n\r<>")


Doesn't this make line 4 evaluate to:

"\\([^]\t\n\r<> ]"

or is the right-bracket escaped somehow?


Todd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-23  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-23  3:02 Question aboug Regexp Todd Neal
2006-05-23  3:58 ` Carsten Dominik
2006-05-23  4:10   ` Todd Neal

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).