From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: regex-opt does not accept 'symbol as second arg?
Date: Mon, 13 Oct 2008 18:48:27 +1100 [thread overview]
Message-ID: <87wsgdey0k.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.880.1223806646.25473.help-gnu-emacs@gnu.org
Nikolaj Schumacher <me@nschum.de> writes:
> Tim X <timx@nospam.dev.null> 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
prev parent reply other threads:[~2008-10-13 7:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 10:02 regex-opt does not accept 'symbol as second arg? Xah
2008-10-11 11:41 ` Lennart Borgman
2008-10-11 12:10 ` Nikolaj Schumacher
2008-10-11 12:20 ` Lennart Borgman
2008-10-11 13:01 ` Nikolaj Schumacher
2008-10-11 14:03 ` Lennart Borgman
[not found] ` <mailman.850.1223727025.25473.help-gnu-emacs@gnu.org>
2008-10-12 1:45 ` Tim X
2008-10-12 10:17 ` Nikolaj Schumacher
[not found] ` <mailman.880.1223806646.25473.help-gnu-emacs@gnu.org>
2008-10-13 7:48 ` Tim X [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wsgdey0k.fsf@lion.rapttech.com.au \
--to=timx@nospam.dev.null \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.