From unknown Sat Aug 16 15:58:43 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#4392 <4392@debbugs.gnu.org> To: bug#4392 <4392@debbugs.gnu.org> Subject: Status: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Reply-To: bug#4392 <4392@debbugs.gnu.org> Date: Sat, 16 Aug 2025 22:58:43 +0000 retitle 4392 (Regexp Functions): The PAREN argument to `regexp-opt' can be = `symbols'. reassign 4392 emacs submitter 4392 Devon Sean McCullough severity 4392 wishlist tag 4392 wontfix thanks From Devon@Jovi.Net Thu Sep 10 14:53:01 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 10 Sep 2009 21:53:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8ALqxpH006592 for ; Thu, 10 Sep 2009 14:53:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlrZb-0002Zm-Lw for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlrZX-0002Xk-6A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:59 -0400 Received: from [199.232.76.173] (port=54891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlrZX-0002Xb-2A for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:55 -0400 Received: from jovi.net ([66.161.136.54]:4206) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlrZW-0005hm-E1 for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2009 17:52:54 -0400 Received: from jovi.net (localhost [127.0.0.1]) by jovi.net (8.14.1/8.14.1) with ESMTP id n8ALmPfZ058847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Sep 2009 17:48:25 -0400 (EDT) (envelope-from Devon@Jovi.Net) Received: (from devon@localhost) by jovi.net (8.14.1/8.14.1/Submit) id n8ALm8wq058841; Thu, 10 Sep 2009 14:48:08 -0700 (PDT) (envelope-from Devon@Jovi.Net) Date: Thu, 10 Sep 2009 14:48:08 -0700 (PDT) Message-Id: <200909102148.n8ALm8wq058841@jovi.net> X-Authentication-Warning: jovi.net: devon set sender to Devon@Jovi.Net using -f From: Devon Sean McCullough To: bug-gnu-emacs@gnu.org Subject: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; envelope-from= Received-SPF: Pass (client IP white listed); receiver=localhost; client-ip=127.0.0.1; helo= X-DCC-Misty-Metrics: grant.org 1170; Body=2 Fuz1=2 Fuz2=2 X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 Please patch REGEXP-OPT to take a PAREN 'symbols argument. Index: emacs/doc/lispref/searching.texi =================================================================== RCS file: /sources/emacs/emacs/doc/lispref/searching.texi,v retrieving revision 1.18 diff -u -r1.18 searching.texi --- emacs/doc/lispref/searching.texi 27 Aug 2009 04:24:02 -0000 1.18 +++ emacs/doc/lispref/searching.texi 10 Sep 2009 20:20:36 -0000 @@ -921,6 +921,7 @@ returned regular expression is always enclosed by at least one parentheses-grouping construct. If @var{paren} is @code{words}, then that construct is additionally surrounded by @samp{\<} and @samp{\>}. +Likewise if @var{paren} is @code{symbols}, by @samp{\_<} and @samp{\_>}. This simplified definition of @code{regexp-opt} produces a regular expression which is equivalent to the actual value Index: emacs/lisp/emacs-lisp/regexp-opt.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/regexp-opt.el,v retrieving revision 1.42 diff -u -r1.42 regexp-opt.el --- emacs/lisp/emacs-lisp/regexp-opt.el 5 Jan 2009 03:21:08 -0000 1.42 +++ emacs/lisp/emacs-lisp/regexp-opt.el 10 Sep 2009 20:20:36 -0000 @@ -96,7 +96,7 @@ (concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close)) If PAREN is `words', then the resulting regexp is additionally surrounded -by \\=\\< and \\>." +by \\=\\< and \\>. Likewise if PAREN is `symbols', by \\_< and \\_>." (save-match-data ;; Recurse on the sorted list. (let* ((max-lisp-eval-depth 10000) @@ -104,11 +104,14 @@ (completion-ignore-case nil) (completion-regexp-list nil) (words (eq paren 'words)) + (symbols (eq paren 'symbols)) (open (cond ((stringp paren) paren) (paren "\\("))) (sorted-strings (delete-dups (sort (copy-sequence strings) 'string-lessp))) (re (regexp-opt-group sorted-strings (or open t) (not open)))) - (if words (concat "\\<" re "\\>") re)))) + (cond (words (concat "\\<" re "\\>")) + (symbols (concat "\\_<" re "\\_>")) + (t re))))) ;;;###autoload (defun regexp-opt-depth (regexp) Peace --Devon /~\ \ / Health Care X not warfare / \ From rgm@gnu.org Thu Sep 10 17:05:41 2009 Received: (at control) by emacsbugs.donarmstrong.com; 11 Sep 2009 00:05:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.6 required=4.0 tests=AWL,ONEWORD,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8B05eJ5031402 for ; Thu, 10 Sep 2009 17:05:41 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mltdz-0000i3-Fb; Thu, 10 Sep 2009 20:05:39 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19113.37971.425129.749132@fencepost.gnu.org> Date: Thu, 10 Sep 2009 20:05:39 -0400 From: Glenn Morris To: control Subject: control X-Debbugs-No-Ack: yes forcemerge 1402 4392 From monnier@iro.umontreal.ca Fri Sep 11 12:17:29 2009 Received: (at 4392) by emacsbugs.donarmstrong.com; 11 Sep 2009 19:17:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from tomts5-srv.bellnexxia.net (tomts5-srv.bellnexxia.net [209.226.175.25]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8BJHSOv009701; Fri, 11 Sep 2009 12:17:29 -0700 Received: from toip6.srvr.bell.ca ([209.226.175.125]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20090911191727.PFZS7787.tomts5-srv.bellnexxia.net@toip6.srvr.bell.ca>; Fri, 11 Sep 2009 15:17:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwFAEo/qkpGN458/2dsb2JhbACBU9wchBgF Received: from bas1-montreal42-1178046076.dsl.bell.ca (HELO ceviche.home) ([70.55.142.124]) by toip6.srvr.bell.ca with ESMTP; 11 Sep 2009 15:09:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 8A3DEB40D4; Fri, 11 Sep 2009 15:17:27 -0400 (EDT) From: Stefan Monnier To: Devon Sean McCullough Cc: 4392@debbugs.gnu.org Subject: Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. Message-ID: References: <200909102148.n8ALm8wq058841@jovi.net> Date: Fri, 11 Sep 2009 15:17:27 -0400 In-Reply-To: <200909102148.n8ALm8wq058841@jovi.net> (Devon Sean McCullough's message of "Thu, 10 Sep 2009 14:48:08 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tag 4392 +wontfix thanks > Please patch REGEXP-OPT to take a PAREN 'symbols argument. As the person responsible for adding the `words' value to PAREN, I'm going to reject this request. I think the `words' value was itself a mistake. It's just as easy to add (concat "\\<" ... "\\>") around the call to regexp-opt. Actually, the whole `paren' argument should disappear (i.e. be hardcoded to "\\(?:"). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 09 14:49:23 2011 Received: (at 4392-done) by debbugs.gnu.org; 9 Jul 2011 18:49:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wh-RH for submit@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:23 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfcag-0000wW-7Y for 4392-done@debbugs.gnu.org; Sat, 09 Jul 2011 14:49:22 -0400 Received: from localhost ([127.0.0.1]:36674) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qfcaa-0006a7-JI; Sat, 09 Jul 2011 14:49:16 -0400 From: Glenn Morris To: 4392-done@debbugs.gnu.org Subject: Re: bug#4392: (Regexp Functions): The PAREN argument to `regexp-opt' can be `symbols'. References: <200909102148.n8ALm8wq058841@jovi.net> X-Spook: Aladdin Ortega Capricorn broadside anarchy Zachawi War on X-Ran: D0A8?U'P(YTe(:o(}3}4Sm[/t6)u-M$#d$^X%%dC{ X-Hue: cyan X-Attribution: GM Date: Sat, 09 Jul 2011 14:49:16 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 11 Sep 2009 15:17:27 -0400") Message-ID: 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.4 (------) X-Debbugs-Envelope-To: 4392-done 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: -6.4 (------) Version: 24.1 There seems no point keeping this report open. A SYMBOLS option was added 2010-10-07, despire the following: Stefan Monnier wrote: > As the person responsible for adding the `words' value to PAREN, I'm > going to reject this request. I think the `words' value was itself > a mistake. It's just as easy to add (concat "\\<" ... "\\>") around the > call to regexp-opt. Actually, the whole `paren' argument should > disappear (i.e. be hardcoded to "\\(?:"). From unknown Sat Aug 16 15:58:43 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, 07 Aug 2011 11:24:04 +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