[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: xr
From: |
Clément Pit-Claudel |
Subject: |
Re: [ELPA] New package: xr |
Date: |
Fri, 1 Feb 2019 13:41:48 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 01/02/2019 10.51, Mattias Engdegård wrote:
> 1 feb. 2019 kl. 16.25 skrev Clément Pit-Claudel <address@hidden>:
>>
>> 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.
- [ELPA] New package: xr, Mattias Engdegård, 2019/02/01
- Re: [ELPA] New package: xr, Clément Pit-Claudel, 2019/02/01
- Re: [ELPA] New package: xr, Eli Zaretskii, 2019/02/01
- Re: [ELPA] New package: xr, Mattias Engdegård, 2019/02/01
- Re: [ELPA] New package: xr,
Clément Pit-Claudel <=
- Re: [ELPA] New package: xr, Mattias Engdegård, 2019/02/02
- Re: [ELPA] New package: xr, Mattias Engdegård, 2019/02/02
- Re: [ELPA] New package: xr, Clément Pit-Claudel, 2019/02/02
- Re: [ELPA] New package: xr, Mattias Engdegård, 2019/02/03
- Re: [ELPA] New package: xr, Juri Linkov, 2019/02/03
- Re: [ELPA] New package: xr, Mattias Engdegård, 2019/02/03
- Re: [ELPA] New package: xr, Clément Pit-Claudel, 2019/02/03
Re: [ELPA] New package: xr, Stefan Monnier, 2019/02/05