unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Noam Postavsky <npostavs@gmail.com>
Cc: "Michael Heerdegen" <michael_heerdegen@web.de>,
	"Mattias Engdegård" <mattiase@acm.org>,
	36237@debbugs.gnu.org, kevin.legouguec@gmail.com
Subject: bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Date: Sun, 16 Jun 2019 08:35:01 -0400	[thread overview]
Message-ID: <jwv8su1af13.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87fto9yawl.fsf@gmail.com> (Noam Postavsky's message of "Sun, 16 Jun 2019 08:25:46 -0400")

> I'm not sure that it is, e.g., python-rx might bind it too (if it
> weren't for the fact that python.el needs to maintain backwards
> compatibility with older Emacs).

I think that would still be "python-rx using internals of rx".
And that could be fixed if we can rewrite it with rx-macrolet, right?

> regexp does exactly what it did before, i.e., it accepts only a constant
> string.  Likewise regexp-quote accepts only a constant string, which
> makes it pointless to use in rx-to-string (just use a plain STRING
> directly), but I didn't disallow it.

Good, thanks.

>>> - What is now the correct way of including a compile-time regexp expression,
>>> such as a defconst? (regexp (eval-when-compile EXPR))? Still a mouthful, but
>>> perhaps outside the scope of this bug.
> Oh, hmm.  That might be a reason to keep using `eval'.

It could make people reluctant to change, yes, but that still wouldn't
be a valid reason in my book.

>> FWIW, I have the impression that in most cases where this could be
>> useful, a better solution would be to provide something like
>> `rx-defmacro` and/or `rx-macrolet`.
> I guess that could replace the "old crusty" rx-constituents thing too.

That's the idea, yes.


        Stefan






  reply	other threads:[~2019-06-16 12:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15 23:43 bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR))) Noam Postavsky
2019-06-16  0:03 ` Michael Heerdegen
2019-06-16  0:28   ` Noam Postavsky
2019-06-16 10:03 ` Mattias Engdegård
2019-06-16 11:34   ` Stefan Monnier
2019-06-16 12:25     ` Noam Postavsky
2019-06-16 12:35       ` Stefan Monnier [this message]
2019-06-16 19:50         ` Noam Postavsky
2019-06-16 20:04           ` Stefan Monnier
2019-06-16 20:25           ` Drew Adams
2019-06-16 20:34             ` Mattias Engdegård
2019-06-16 21:09               ` Drew Adams
2019-06-17 20:57             ` Juri Linkov
2019-06-18 19:45       ` Mattias Engdegård
2019-06-19  1:34         ` Noam Postavsky
2019-06-19 15:42           ` Mattias Engdegård
2019-06-20  0:29             ` Noam Postavsky
2019-06-20 10:26               ` Mattias Engdegård
2019-06-22 22:05                 ` Noam Postavsky
2019-06-23 11:09                   ` Mattias Engdegård
2019-06-23 15:46                     ` Noam Postavsky
2019-06-24  3:50                       ` Stefan Monnier
2019-06-24 10:52                         ` Mattias Engdegård
2019-06-26  2:07                       ` Noam Postavsky
2019-06-23 14:45                   ` Drew Adams
2019-06-26 12:23 ` Andy Moreton
2019-06-26 12:56   ` Noam Postavsky
2019-06-26 13:08 ` Andy Moreton

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=jwv8su1af13.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=36237@debbugs.gnu.org \
    --cc=kevin.legouguec@gmail.com \
    --cc=mattiase@acm.org \
    --cc=michael_heerdegen@web.de \
    --cc=npostavs@gmail.com \
    /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).