unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: emacsq via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 54017@debbugs.gnu.org
Subject: bug#54017: add regexp translation option to read-regexp
Date: Thu, 17 Feb 2022 10:55:22 +0000	[thread overview]
Message-ID: <9LWah4VVitpa2lng3EOUtAFaCtAdV_OJKWGiRVz5TmrajnJ3gWDmhpqy4_Ac-1F4Qv2xmVGckjS35Ity5cq9M4BFd5DJxH2JklOkKR5r6c0=@protonmail.com> (raw)
In-Reply-To: <86pmnlew9d.fsf@mail.linkov.net>

> a pair of two translation functions should be provided:
> one to translate a custom regexp syntax to the default regexp syntax
>(to be used on the return value of read-regexp), and another translation
> from the default regexp syntax to the custom regexp syntax (to be used
> to translate the default regexp value added to the minibuffer)?

The purpose of regexp translation is that all user facing regexps by
read-regexp should use the translated format, so if there is a need
for a function which converts to the convenient format then the
user should provide that as well. Maybe there should be one function only
with  an argument specifying the direction of the translation.

BTW, ideally the variables you mentioned ('search-default-mode' and
'replace-regexp-function') should be merged with this option, because
it's unlikely the user wants one regexp syntax for one command and a
different syntax for an other one, so there should be a single
translation function which works everywhere where user facing
regexps occur.






      parent reply	other threads:[~2022-02-17 10:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 20:21 bug#54017: add regexp translation option to read-regexp emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-16 18:25 ` Juri Linkov
2022-02-16 19:28   ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-17  8:24     ` Juri Linkov
2022-02-17  9:09       ` Juri Linkov
2022-02-17  9:18       ` Eli Zaretskii
2022-02-17 10:04         ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-17 17:40         ` Juri Linkov
2022-02-20 19:06           ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-20 20:02             ` Eli Zaretskii
2022-02-20 22:46             ` bug#54017: [External] : " Drew Adams
2022-02-17 10:55       ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

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='9LWah4VVitpa2lng3EOUtAFaCtAdV_OJKWGiRVz5TmrajnJ3gWDmhpqy4_Ac-1F4Qv2xmVGckjS35Ity5cq9M4BFd5DJxH2JklOkKR5r6c0=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=54017@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=laszlomail@protonmail.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).