From: Eli Zaretskii <eliz@gnu.org>
To: Dima Kogan <dima@secretsauce.net>
Cc: emacs-devel@gnu.org
Subject: Re: Embedded modifiers in the regex engine
Date: Thu, 25 Feb 2016 18:15:52 +0200 [thread overview]
Message-ID: <83oab4g407.fsf@gnu.org> (raw)
In-Reply-To: <87ziupinhq.fsf@secretsauce.net> (message from Dima Kogan on Wed, 24 Feb 2016 17:32:01 -0800)
> From: Dima Kogan <dima@secretsauce.net>
> Date: Wed, 24 Feb 2016 17:32:01 -0800
>
> I've been thinking of ways to make some fancier aspects of isearch and
> hi-lock work better, specifically, the way we handle the different
> modes: case-fold, char-fold, lax-whitespace, etc.
>
> The relevant bugs I filed recently:
>
> http://debbugs.gnu.org/22541
> http://debbugs.gnu.org/22520
> http://debbugs.gnu.org/22479
>
> In short, different parts of emacs (isearch, isearch history, hi-lock,
> etc) treat these modes inconsistently, which results in unexpected
> behavior.
>
> The best solution I can think of to clean this up is also the most
> intrusive: adding support for pcre-style embedded modifiers to
> activate/deactivate the modes.
>
> So for instance "\\(?i\\)asdf" would be interpreted as a case-folding
> regex regardless of the value of case-fold-search. I think this would be
> a great thing to have in general, but for the specific issues in the
> bugs above, it'd make things simpler and more correct.
I hope you are not proposing this as a replacement for the M-s
toggles, because if so, I'm very much opposed.
> As an example, currently hi-lock generates a complicated-looking regex
> to emulate char-folding and case-folding. If we supported the modifiers,
> this change would simply be a prepend of "\\(?i\\)" or whatever other
> modes we want. This is simple and expected to be bug-free on the hi-lock
> level. Bugs such as hi-lock not supporting char-fold and case-fold at
> the same time would not happen.
They will also not happen once character-folding is implemented via
translation tables, instead of regular expressions. The current
implementation will go away at some point (one hopes).
next prev parent reply other threads:[~2016-02-25 16:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 1:32 Embedded modifiers in the regex engine Dima Kogan
2016-02-25 6:11 ` John Wiegley
2016-02-25 21:05 ` Stefan Monnier
2016-02-25 16:15 ` Eli Zaretskii [this message]
2016-02-26 7:19 ` Dima Kogan
2016-02-26 9:08 ` Eli Zaretskii
2016-02-28 1:50 ` Dima Kogan
2016-02-28 16:00 ` Eli Zaretskii
2016-02-29 13:30 ` Richard Stallman
2016-03-01 0:49 ` Aurélien Aptel
2016-03-01 16:55 ` Richard Stallman
2016-03-09 0:34 ` Dima Kogan
2016-03-28 0:23 ` Dima Kogan
2016-03-28 15:28 ` Eli Zaretskii
2016-03-28 18:05 ` Dima Kogan
2016-03-28 18:24 ` Eli Zaretskii
2016-03-29 21:23 ` Dima Kogan
2016-03-31 16:28 ` Eli Zaretskii
2016-04-23 4:17 ` Dima Kogan
2016-04-23 7:48 ` Eli Zaretskii
2016-04-24 7:34 ` Dima Kogan
2016-03-28 16:09 ` Stefan Monnier
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=83oab4g407.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dima@secretsauce.net \
--cc=emacs-devel@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.