From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: How to check regexp for syntax-errors? (There HAS to be SOME way, yes?) Date: 16 Oct 2009 13:19:04 -0400 Organization: PANIX -- Public Access Networks Corp. Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1255714877 23796 80.91.229.12 (16 Oct 2009 17:41:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2009 17:41:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 16 19:41:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MyqnT-0002T2-Kl for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Oct 2009 19:40:59 +0200 Original-Received: from localhost ([127.0.0.1]:36944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyqnS-00078w-K3 for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Oct 2009 13:40:58 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!panix!panix1.panix.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader1.panix.com 1255713544 12192 166.84.1.1 (16 Oct 2009 17:19:04 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 16 Oct 2009 17:19:04 +0000 (UTC) Original-Xref: news.stanford.edu gnu.emacs.help:173945 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69029 Archived-At: 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("  @ = ! 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