From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: regex-opt does not accept 'symbol as second arg? Date: Mon, 13 Oct 2008 18:48:27 +1100 Organization: Rapt Technologies Message-ID: <87wsgdey0k.fsf@lion.rapttech.com.au> References: <87vdvy8u2r.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223888552 27784 80.91.229.12 (13 Oct 2008 09:02:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Oct 2008 09:02:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 13 11:03:31 2008 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 1KpJKg-00036h-EF for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Oct 2008 11:03:18 +0200 Original-Received: from localhost ([127.0.0.1]:45900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpJJc-00042h-4z for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Oct 2008 05:02:12 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:wdzd/E2mDNGVKZwgqn/YyywoEFM= Original-Lines: 33 Original-NNTP-Posting-Host: 1d0b6adf.news.astraweb.com Original-X-Trace: DXC=_BhGTR`=ZX:2bYA=ja]`R_3m`W?jXH8J183]=XIQN<>C9 Original-Xref: news.stanford.edu gnu.emacs.help:163379 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:58723 Archived-At: Nikolaj Schumacher writes: > Tim X wrote: > >> In emacs 23, it appears to be working as it is supposed to. It does take >> an arbitrary symbol, but the symbol "'words" has special meaning over just a >> non-nil value e.g. > > The idea was that 'symbol or 'symbols should also have a special meaning. > >> ELISP> (regexp-opt '("This" "That" "Those") 'symbol) >> "\\(Th\\(?:at\\|is\\|ose\\)\\)" > > should return "\\_<\\(Th\\(?:at\\|is\\|ose\\)\\)\\_>" instead. > OK, I see what your getting at now. In that case, it certanly could be requested as an enhancement, but I wouldn't say that it is a bug because it was never a feature of the utility i.e. it was developed for strings rather than symbols. However, at what point do we draw the line. For example, should the symbol 'buffer be added to put a \b at each end etc. Personally, I can't see where I'd have a use for this feature. this doesn't mean there isn't a use case, I have just never come across one. On the other hand, I've used regexp-opt for matching against strings a lot. Tim tim -- tcross (at) rapttech dot com dot au