From unknown Sun Aug 10 09:47:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7161 <7161@debbugs.gnu.org> To: bug#7161 <7161@debbugs.gnu.org> Subject: Status: 23.2; M-x highlight-phrase RET [[:space:]] RET --error--> Invalid regexp: "Invalid character class name" Reply-To: bug#7161 <7161@debbugs.gnu.org> Date: Sun, 10 Aug 2025 16:47:11 +0000 retitle 7161 23.2; M-x highlight-phrase RET [[:space:]] RET --error--> Inva= lid regexp: "Invalid character class name" reassign 7161 emacs submitter 7161 twb@cybersource.com.au (Trent W. Buck) severity 7161 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 05 00:54:08 2010 Received: (at submit) by debbugs.gnu.org; 5 Oct 2010 04:54:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2zXT-0006iV-LP for submit@debbugs.gnu.org; Tue, 05 Oct 2010 00:54:08 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2zQ7-0006fI-NM for submit@debbugs.gnu.org; Tue, 05 Oct 2010 00:46:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2zT8-0007Tc-E2 for submit@debbugs.gnu.org; Tue, 05 Oct 2010 00:49:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2zT8-0007TX-A0 for submit@debbugs.gnu.org; Tue, 05 Oct 2010 00:49:38 -0400 Received: from [140.186.70.92] (port=35206 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2zT6-0006Bq-Rz for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2010 00:49:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2zT5-0007Sx-8K for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2010 00:49:36 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:57958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2zT4-0007Si-T1 for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2010 00:49:35 -0400 Received: by pzk26 with SMTP id 26so3867189pzk.0 for ; Mon, 04 Oct 2010 21:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:mime-version:content-type; bh=aaPpTCba19a8zq2XucgEGIfNznW2/MeEcDnr4l+T5Ds=; b=rssaY0wHgD4uS9R3aL9lhNxOVJ7QWvke+pC7EDOnR5G+yP/KukSXbHWW0G5Xp79xY0 DEIb3ohafVsGQVnoDRbS/Cvv97ucnk60v1XHsgxTzwBMwTPK6eN3vjNu7ITqijszhJsF 8NIOygIFDTPCbMMUc3dlCByz3bdygfJWFdSx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:mime-version:content-type; b=Q/mRHYzklmCE/ZaEct7gBAyJ9xEXbj5G5JRD4cxB7Y8iFPV/kgdOS2FX4Ozd4XRLVf l0SxrDAHFIdCOpzNx2Q3aU1FGwCys9K0JUl1QzU7ERUOPBwhvAPTO5M/+wjSLpTQJIbO lLAadin8O38PPZs7HRXzhwQk2OxHN3xJQkbiw= Received: by 10.114.60.3 with SMTP id i3mr12919651waa.75.1286254173317; Mon, 04 Oct 2010 21:49:33 -0700 (PDT) Received: from localhost (nat064.cyber.com.au [203.7.155.64]) by mx.google.com with ESMTPS id d2sm10651168wam.14.2010.10.04.21.49.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 04 Oct 2010 21:49:32 -0700 (PDT) From: twb@cybersource.com.au (Trent W. Buck) To: bug-gnu-emacs@gnu.org Subject: 23.2; M-x highlight-phrase RET [[:space:]] RET --error--> Invalid regexp: "Invalid character class name" Date: Tue, 05 Oct 2010 15:49:27 +1100 Message-ID: <878w2db5wo.fsf@cybersource.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 05 Oct 2010 00:54:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) When I mistakenly typed a regexp into highlight-phrase, it returned an error instead of searching for the phrase (i.e. literal string) I typed. I guess (highlight-phrase x) expands to (higlight-regexp (escape x)), and there's a bug in the escape function. With t-d-o-e on, I get Debugger entered--Lisp error: (invalid-regexp "Invalid character class name") string-match("[[:[Ss]pace:]]" "") hi-lock-regexp-okay("[[:[Ss]pace:]]") (list (hi-lock-regexp-okay (hi-lock-process-phrase ...)) (hi-lock-read-face-name)) call-interactively(highlight-phrase t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) NOTE: this problem DOES NOT occur when manually calling M-: (highlight-phrase "[[:space:]]"). In that case, it acts as if I had run (highlight-regexp "[[:space:]]"), i.e. it highlights every \S- char. In GNU Emacs 23.2.1 (x86_64-pc-linux-gnu) of 2010-08-15 on barber, modified by Debian configured using `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=no' '--without-gconf' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: xterm-mouse-mode: t ido-everywhere: t savehist-mode: t icomplete-mode: t partial-completion-mode: t show-paren-mode: t delete-selection-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: Recent messages: Loading /etc/emacs/site-start.d/50haskell-mode.el (source)... Loading /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file.el (source)...done Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...done Loading /etc/emacs/site-start.d/50paredit-el.el (source)...done Loading /etc/emacs/site-start.d/50psvn.el (source)...done Loading /etc/emacs/site-start.d/50puppet-el.el (source)...done Loading /etc/emacs/site-start.d/50w3m-el-snapshot.el (source)...done Loading /etc/emacs/site-start.d/51debian-el.el (source)...done Ido mode enabled For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/23.2/site-lisp/haskell-mode/inf-haskell /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-site-file /usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-simple-indent /usr/share/emacs/site-lisp/haskell-mode/haskell-mode hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-mode /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-indentation /usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-indent /usr/share/emacs/site-lisp/haskell-mode/haskell-hugs hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-hugs /usr/share/emacs/site-lisp/haskell-mode/haskell-ghci hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-ghci /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-font-lock /usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-doc /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-decl-scan /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-cabal /usr/share/emacs/site-lisp/haskell-mode/haskell-c hides /usr/share/emacs/23.2/site-lisp/haskell-mode/haskell-c /usr/share/emacs/23.2/site-lisp/puppet-el/puppet-mode hides /usr/share/emacs/site-lisp/puppet-mode /usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug jka-compr edmacro kmacro xt-mouse ido savehist icomplete complete paren delsel saveplace debian-el debian-el-loaddefs w3m-load emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode dpkg-dev-el dpkg-dev-el-loaddefs ediff-hook vc-hooks lisp-float-type lisp-mode register page menu-bar rfn-eshadow timer select mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 06 20:30:01 2012 Received: (at 7161-done) by debbugs.gnu.org; 7 Oct 2012 00:30:01 +0000 Received: from localhost ([127.0.0.1]:58755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKekq-0003Tt-OR for submit@debbugs.gnu.org; Sat, 06 Oct 2012 20:30:01 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:38637 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKeko-0003Tm-VI for 7161-done@debbugs.gnu.org; Sat, 06 Oct 2012 20:29:59 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TKekV-0002O3-BB; Sat, 06 Oct 2012 20:29:39 -0400 From: Glenn Morris To: 7161-done@debbugs.gnu.org Subject: Re: bug#7161: 23.2; M-x highlight-phrase RET [[:space:]] RET --error--> Invalid regexp: "Invalid character class name" References: <878w2db5wo.fsf@cybersource.com.au> X-Spook: eavesdropping anthrax Cohiba kilo class BLU-114/B Saddam X-Ran: *P1mFev[d~0*TEC{,1of*Q{5WRCHa64R^[bdplEM7d[QzCyNY)M*%+xGXj:Q%DjX{aNga| X-Hue: black X-Attribution: GM Date: Sat, 06 Oct 2012 20:29:39 -0400 In-Reply-To: <878w2db5wo.fsf@cybersource.com.au> (Trent W. Buck's message of "Tue, 05 Oct 2010 15:49:27 +1100") Message-ID: <06lifjcefg.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 7161-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Version: 24.3 Sorry for the delay. The problem is due to hi-lock-process-phrase, which tries to do various transformations on interactive input. I've tried to improve it, so it now handles your example. But I think it might be better to just get rid of it altogether (and use case-fold-search and search-spaces-regexp instead). From unknown Sun Aug 10 09:47:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 04 Nov 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator