unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: "Paul Eggert" <eggert@cs.ucla.edu>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Daniel Colascione <dancol@dancol.org>,
	emacs-devel@gnu.org
Subject: Re: regex.c simplification
Date: Sat, 16 Jun 2018 09:17:49 -0700	[thread overview]
Message-ID: <46d21fcaaf2cfc13654190d2879d54cd.squirrel@dancol.org> (raw)
In-Reply-To: <d31f6149-d3b1-08c8-da4a-95e004217816@cs.ucla.edu>

> Eli Zaretskii wrote:
>> I think we still haven't abandoned the hope of updating to the latest
>> glibc/gnulib versions of regex.c, although I'm not sure how practical
>> these hopes are at this point.
>
> That's been on my list of things to do for ages. I don't know if it'll
> ever get
> done, or even whether it's worth doing.
>
> As far as I know, Emacs is the only package that still uses the "old"
> regex.c
> code derived from pre-2002 glibc. Everybody else has migrated to the "new"
> regex.c code that was contributed to glibc in 2002 and is in Gnulib. So,
> in some
> sense regex.c has already forked; we just haven't made it official.
>
> A complication: src/regex.c is compiled twice, once within lib-src (for
> etags)
> and once within src (for Emacs proper), and the "#if defined emacs" stuff
> in
> src/regex.c matters for this.
>
> If we wanted to make the fork more official, we could simplify src/regex.c
> to
> not worry about lib-src, by having etags use Glibc/Gnulib regex rather
> than
> Emacs regex.

That's probably a good idea. The other approach would be to run etags
inside a real Emacs context somehow, and that seems too complicated.

> That would be easy for me to arrange, if you like.

Thanks.

> While we're on the topic, a couple of more comments about regex code.

The regex API could be a lot better too. It'd be nice to expose the
pattern compilation machinery to lisp as some kind of new pattern pvec
object, then let lisp manage the cache. The nice thing about doing it this
way is that you could transparently support having multiple different
kinds of pattern --- e.g., PEGs, PCRE-syntax REs --- and use them
transparently, since you'd be able to supply a pattern object anywhere you
pass a regex string today.




  reply	other threads:[~2018-06-16 16:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16 15:35 regex.c simplification Daniel Colascione
2018-06-16 15:53 ` Eli Zaretskii
2018-06-16 16:11   ` Paul Eggert
2018-06-16 16:17     ` Daniel Colascione [this message]
2018-06-16 18:06     ` Andreas Schwab
2018-06-16 19:27       ` Perry E. Metzger
2018-06-17 16:50         ` Clément Pit-Claudel
2018-06-18 14:08     ` Stefan Monnier
2018-07-17 23:58       ` Paul Eggert
2018-07-20  0:33         ` Stefan Monnier
2018-07-20  0:59           ` Paul Eggert
2018-07-20  1:42             ` Stefan Monnier
2018-07-20  6:59               ` Eli Zaretskii
2018-07-20 21:49                 ` Paul Eggert
2018-07-21  6:43                   ` Eli Zaretskii
2018-07-21  7:17                     ` Paul Eggert
2018-08-01  0:17                       ` Paul Eggert
2018-08-01  2:38                         ` Brett Gilio
2018-07-20  6:58             ` Eli Zaretskii
2018-06-16 16:12   ` Daniel Colascione
2018-06-16 16:43     ` Perry E. Metzger
2018-06-16 16:09 ` Noam Postavsky
2018-06-16 16:35 ` Perry E. Metzger
2018-06-16 16:42   ` Daniel Colascione
2018-06-16 16:55     ` Eli Zaretskii
2018-06-16 18:24       ` Perry E. Metzger
2018-06-16 18:29         ` Eli Zaretskii
2018-06-16 18:58           ` Perry E. Metzger
2018-06-16 19:27             ` Eli Zaretskii
2018-06-18  9:36               ` Robert Pluim

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46d21fcaaf2cfc13654190d2879d54cd.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).