From: VanL <van@scratch.space>
To: Juri Linkov <juri@linkov.net>
Cc: 31953@debbugs.gnu.org
Subject: bug#31953: feature request - `highlight-rx` interactively
Date: Sat, 02 Nov 2019 19:30:46 +1100 [thread overview]
Message-ID: <m2h83md6ix.fsf_-_@vogel.localnet> (raw)
In-Reply-To: <87h843ptuk.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 20 Oct 2019 18:49:39 +0300")
Juri Linkov <juri@linkov.net> writes:
>>> i.e. These would be equivalent:
>>>
>>> M-x highlight-rx RET (or "foo" "bar") RET
>>> M-x highlight-regexp RET \(foo\|bar\) RET
>>
>> What I can tell from the emacs-devel list and the git log is the rx
>> feature is being worked on. I'd like to use rx everywhere regexp occurs
>> and highlight-rx would be the first easy use case.
>
> Do you mean using rx also in all search and replace commands?
I guess so if that makes sense to do farther down the track.
The advantage to using rx is to avoid those repeating
pathological toothpick sequences that are difficult to track.
For now, highlight-rx for searching is enough.
> But the documentation says:
>
> The ‘rx’ notation is mainly useful in Lisp code; it cannot be used in
> most interactive situations where a regexp is requested, such as when
> running ‘query-replace-regexp’ or in variable customisation.
For search and replace, I don't know if it would be possible to
use in org-mode in the future, say, a table of three columns
having
1. input pattern
2. output 'desired' pattern
3. rx pattern which is generated automatically for 2
>> At the limit there are things expressible in regexp that rx won't be
>> able to. And, in that case, I'd like to see in the rx documentation
>> a sign post to regexp at depth for that. And, if there are patterns
>> rx and/or regexp are unable to express then providing a see also for
>> those would be a help.
>
> There is still some shortcomings in the current rx shorthands: ...
I guess the rx keywords will evolve to fit better with
experience. Statistics are beginning to be collected on the
reported bugs. Perhaps, rx can be used there where it makes
sense.
next prev parent reply other threads:[~2019-11-02 8:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-24 7:47 bug#31953: feature request - `highlight-rx` interactively Van L
2019-10-09 22:02 ` Lars Ingebrigtsen
2019-10-14 23:54 ` bug#31953: [VanL] " Lars Ingebrigtsen
2019-10-15 0:35 ` Lars Ingebrigtsen
2019-10-15 2:39 ` Phil Sainty
2019-10-15 7:53 ` Lars Ingebrigtsen
2019-10-15 8:37 ` Michael Heerdegen
2019-10-15 8:43 ` Lars Ingebrigtsen
2019-10-15 9:09 ` Michael Heerdegen
2019-10-15 14:34 ` Drew Adams
2019-11-03 22:27 ` Juri Linkov
2019-10-20 6:34 ` bug#31953: [VanL] " VanL
2019-10-20 15:49 ` Juri Linkov
2019-10-20 23:35 ` Noam Postavsky
2019-10-21 21:19 ` Juri Linkov
2019-11-02 8:30 ` VanL [this message]
2019-11-18 21:42 ` Juri Linkov
2019-11-19 12:34 ` VanL
2019-11-19 21:39 ` VanL
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=m2h83md6ix.fsf_-_@vogel.localnet \
--to=van@scratch.space \
--cc=31953@debbugs.gnu.org \
--cc=juri@linkov.net \
/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.