From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52558: Option for easier typing of regexps Date: Sat, 22 Jan 2022 21:01:53 +0200 Organization: LINKOV.NET Message-ID: <86y237zja6.fsf@mail.linkov.net> References: <86v8zkkgxn.fsf@mail.linkov.net> <8635moe8z1.fsf@mail.linkov.net> <86wnk0ctxp.fsf@mail.linkov.net> <87tudvj1cw.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20448"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: ndame , 52558@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 22 20:04:42 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nBLgo-00057A-4C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jan 2022 20:04:42 +0100 Original-Received: from localhost ([::1]:37986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBLgi-0004ce-Bd for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jan 2022 14:04:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBLgA-0004bP-QA for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 14:04:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBLgA-0001nr-E5 for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 14:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBLgA-0003eL-8z for bug-gnu-emacs@gnu.org; Sat, 22 Jan 2022 14:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jan 2022 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 52558-submit@debbugs.gnu.org id=B52558.164287819813968 (code B ref 52558); Sat, 22 Jan 2022 19:04:02 +0000 Original-Received: (at 52558) by debbugs.gnu.org; 22 Jan 2022 19:03:18 +0000 Original-Received: from localhost ([127.0.0.1]:37910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBLfS-0003dD-8D for submit@debbugs.gnu.org; Sat, 22 Jan 2022 14:03:18 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:45989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBLfQ-0003cy-0X for 52558@debbugs.gnu.org; Sat, 22 Jan 2022 14:03:17 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id F06D220004; Sat, 22 Jan 2022 19:03:07 +0000 (UTC) In-Reply-To: <87tudvj1cw.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 22 Jan 2022 15:23:27 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:224855 Archived-At: >>> If you want to use M-x query-replace directly, >>> then simpler would be add replace-regexp-function >>> that you can use with: >>> >>> (setq replace-regexp-function >> >> And additional change is needed for correct highlighting: >> >> diff --git a/lisp/replace.el b/lisp/replace.el >> index 0e81b15a09..4302868520 100644 >> --- a/lisp/replace.el >> +++ b/lisp/replace.el >> @@ -2690,7 +2693,8 @@ replace-highlight >> (if query-replace-lazy-highlight >> (let ((isearch-string search-string) >> (isearch-regexp regexp-flag) >> - (isearch-regexp-function (or delimited-flag >> + (isearch-regexp-function (or replace-regexp-function >> + delimited-flag >> (and replace-char-fold > > Re-skimming this thread, I think these extensions make sense, so perhaps > you should just push them? (With a NEWS item, I guess.) This patch was pushed, but does it really need a NEWS item? It was intended as a basis for a new user-facing feature that could be now implemented and described in NEWS.