all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: How to check regexp for syntax-errors?  (There HAS to be SOME way, yes?)
@ 2009-10-20 12:05 martin rudalics
  0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2009-10-20 12:05 UTC (permalink / raw)
  To: dkcombs; +Cc: help-gnu-emacs

 > Isn't there some .el that that will try to parse a regexp, and tell
 > me where it got confused, and what to look for for errors?

You might want to have a look at:

http://lists.gnu.org/archive/html/gnu-emacs-sources/2005-11/msg00004.html

martin




^ permalink raw reply	[flat|nested] 7+ messages in thread
* How to check regexp for syntax-errors?  (There HAS to be SOME way, yes?)
@ 2009-10-16 17:19 David Combs
  2009-10-16 17:39 ` rustom
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: David Combs @ 2009-10-16 17:19 UTC (permalink / raw)
  To: help-gnu-emacs

Trying to get this to work:

Trying to come up with a "dired-do-rename-regexp" that will transform
filenames like in these Dired-lines, I get an error printout.



  -rw-rw-rw-   1 David    root      10895733 10-16 09:51 091005_100001pilotmon.MP3
  -rw-rw-rw-   1 David    root      10895675 10-16 09:49 091012_100001pilotmon.MP3
  -rw-rw-rw-   1 David    root      10895673 10-16 09:49 091012_080001dn.MP3
  -rw-rw-rw-   1 David    root      10982376 10-16 09:48 091015_090001freeforum.MP3
  -rw-rw-rw-   1 David    root      10895675 10-16 09:47 091015_080001dn.MP3    ,

So, I simplify to an Occur, and so do M-: on this:

(Occur "\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)_\\([0-9][0-9][0-9][0-9][0-9][0-9]\\)1\\([a-zA-Z\\][0-9a-zA-Z]*\\).mp3")     ,

But here's what I get back:


Debugger entered--Lisp error: (void-function Occur)
  (Occur "\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)_\\([0-9][0-9][0-9][0-9][0-9][0-9]\\)1\\([a-zA-Z\\][0-9a-zA-Z]*\\).mp3")
  eval((Occur "\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)_\\([0-9][0-9][0-9][0-9][0-9][0-9]\\)1\\([a-zA-Z\\][0-9a-zA-Z]*\\).mp3"))
  eval-expression((Occur "\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)_\\([0-9][0-9][0-9][0-9][0-9][0-9]\\)1\\([a-zA-Z\\][0-9a-zA-Z]*\\).mp3") nil)
  call-interactively(eval-expression)
  recursive-edit()
  byte-code(" \x10	@ = !


Which is completely "Greek" to me!




Isn't there some .el that that will try to parse a regexp, and tell
me where it got confused, and what to look for for errors?


Thanks!




David




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

end of thread, other threads:[~2009-10-20 12:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 12:05 How to check regexp for syntax-errors? (There HAS to be SOME way, yes?) martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2009-10-16 17:19 David Combs
2009-10-16 17:39 ` rustom
2009-10-16 18:24   ` Joost Kremers
2009-10-16 22:55 ` Andreas Politz
2009-10-17  6:01 ` tomas
2009-10-20  7:54 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.