all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: emacsq <laszlomail@protonmail.com>
Cc: 54017@debbugs.gnu.org
Subject: bug#54017: add regexp translation option to read-regexp
Date: Thu, 17 Feb 2022 10:24:14 +0200	[thread overview]
Message-ID: <86pmnlew9d.fsf@mail.linkov.net> (raw)
In-Reply-To: <LGUyh2fUS4Ytjp-GoIyY7nxUy-0G1fk163TDxRNFKcqNthT9HRzBCBsDYYO6IMfaD7VMxCNL049F0JJHPQ6CgRrSunT9w-s0ZoiELyorKRQ=@protonmail.com> (emacsq's message of "Wed, 16 Feb 2022 19:28:14 +0000")

>> This user option already exists. It's name is 'search-default-mode'.
>
> Does that option affect every command where read regexp is used?
> Because this bug is about that.
>
> So regexp translation for occur, flush/keep-lines, highlight-regexp,
> dired-mark-files-regexp, etc., so anywhere where read-regexp is used.

Sorry, I misread your feature request, I thought it's continuation
of adding custom regexp types to search/replace.  You are right
that read-regexp misses support for custom regexp formats.

It's easy to add regexp translation to the return value of read-regexp.
But there is one complication: the default value returned by
read-regexp-defaults-function might be a function like
find-tag-default-as-regexp that returns a regexp in the
default format created by regexp-quote.

Do you agree that 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)?





  reply	other threads:[~2022-02-17  8:24 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 [this message]
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

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=86pmnlew9d.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=54017@debbugs.gnu.org \
    --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 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.