all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: xr
Date: Fri, 1 Feb 2019 13:41:48 -0500	[thread overview]
Message-ID: <ba5c6e6e-5f0f-854d-2555-e42f3b61fe21@gmail.com> (raw)
In-Reply-To: <2C8B37D2-2A22-451C-AA9E-E3CD73A90ABC@acm.org>

On 01/02/2019 10.51, Mattias Engdegård wrote:
> 1 feb. 2019 kl. 16.25 skrev Clément Pit-Claudel <cpitclaudel@gmail.com>:
>>
>> Looks great. Here's a feature request: can you combine this with a font-lock rule to display existing regexps in rx syntax?  Something like prettify-symbols-mode, but for regular expressions.
> 
> You mean a mode so that when the user is looking at the elisp source
> 
>   (if (looking-at "regexp-string") ...
> 
> he would actually see
> 
>   (if (looking-at (rx translated-expression)) ...
> 
> ? Could be done, I suppose, but since there is no special syntax for regexp strings, it would probably either need to rely on a list of well-known functions with regexp arguments, or second-guess it from their argument names (like REGEXP or PATTERN). It sounds a bit fragile.

I would suggest neither; instead, it would convert only strings that contain regexp constructs (these are the ones that are hard to read in the first place).
That;'s more or less what I do in https://github.com/cpitclaudel/easy-escape, and it works OK.



  reply	other threads:[~2019-02-01 18:41 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 14:09 [ELPA] New package: xr Mattias Engdegård
2019-02-01 15:25 ` Clément Pit-Claudel
2019-02-01 15:42   ` Eli Zaretskii
2019-02-01 18:39     ` Clément Pit-Claudel
2019-02-01 15:51   ` Mattias Engdegård
2019-02-01 18:41     ` Clément Pit-Claudel [this message]
2019-02-02  9:43       ` Mattias Engdegård
2019-02-02 15:15         ` Mattias Engdegård
2019-02-02 18:41           ` Clément Pit-Claudel
2019-02-03  9:37             ` Mattias Engdegård
2019-02-03 20:11             ` Juri Linkov
2019-02-03 21:04               ` Mattias Engdegård
2019-02-03 21:13               ` Clément Pit-Claudel
2019-02-05 16:15 ` Stefan Monnier
2019-02-05 22:37   ` Michael Heerdegen
2019-02-06  0:04     ` Mattias Engdegård
2019-02-05 23:00   ` Michael Heerdegen
2019-02-06  0:11     ` Stefan Monnier
2019-02-06  0:25       ` Noam Postavsky
2019-02-06  0:34         ` Michael Heerdegen
2019-02-06  1:36         ` Stefan Monnier
2019-02-06 12:43       ` Mattias Engdegård
2019-02-07  4:34         ` pcre2el Richard Stallman
2019-02-07  7:11           ` pcre2el John Wiegley
2019-02-07 14:54           ` pcre2el Stefan Monnier
2019-02-06  0:02   ` [ELPA] New package: xr Mattias Engdegård
2019-02-06  0:14     ` Stefan Monnier
2019-02-06  7:02   ` Richard Stallman
2019-02-06 15:39     ` Eli Zaretskii
2019-02-07  4:36       ` Richard Stallman
2019-02-07 14:37         ` Eli Zaretskii
2019-02-08  3:21           ` Richard Stallman
2019-02-08  3:50             ` Stefan Monnier
2019-02-08  7:18               ` Eli Zaretskii
2019-02-08 10:06                 ` Stephen Berman
2019-02-09  3:37                   ` Richard Stallman
2019-02-09  8:03                     ` Eli Zaretskii
2019-02-09  3:38                 ` Richard Stallman
2019-02-09  8:05                   ` Eli Zaretskii
2019-02-10  5:51                     ` Richard Stallman
2019-02-10 15:14                       ` Eli Zaretskii
2019-02-10  5:51                     ` Richard Stallman
2019-02-10 15:12                       ` Eli Zaretskii
2019-02-11  5:38                         ` Richard Stallman
2019-02-09  3:37               ` Richard Stallman
2019-02-27 15:06 ` Michael Heerdegen
2019-02-27 16:22   ` Mattias Engdegård
2019-02-27 17:09     ` Michael Heerdegen
2019-02-28 14:10       ` Mattias Engdegård
2019-02-28 14:34         ` Clément Pit-Claudel
2019-02-28 23:06         ` Stefan Monnier
2019-03-01 13:39           ` Mattias Engdegård
2019-03-01 13:51             ` Stefan Monnier
2019-03-01  5:29         ` Van L
2019-03-01 13:54           ` Stefan Monnier
2019-03-01 15:25         ` Michael Heerdegen

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=ba5c6e6e-5f0f-854d-2555-e42f3b61fe21@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.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.