From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52558: Option for easier typing of regexps Date: Tue, 28 Dec 2021 22:21:02 +0200 Message-ID: <83ee5wlbv5.fsf@gnu.org> References: <86v8zkkgxn.fsf@mail.linkov.net> <8635moe8z1.fsf@mail.linkov.net> <86wnk0ctxp.fsf@mail.linkov.net> <868rw4pmln.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: laszlomail@protonmail.com, 52558@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 28 21:23:08 2021 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 1n2J00-000A3b-3g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Dec 2021 21:23:08 +0100 Original-Received: from localhost ([::1]:58898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2Izz-0000P5-78 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Dec 2021 15:23:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Iyz-0008EI-Vc for bug-gnu-emacs@gnu.org; Tue, 28 Dec 2021 15:22:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2Iyw-0001O9-Ea for bug-gnu-emacs@gnu.org; Tue, 28 Dec 2021 15:22:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2Iyw-0003tI-Am for bug-gnu-emacs@gnu.org; Tue, 28 Dec 2021 15:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Dec 2021 20:22: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.164072287514876 (code B ref 52558); Tue, 28 Dec 2021 20:22:02 +0000 Original-Received: (at 52558) by debbugs.gnu.org; 28 Dec 2021 20:21:15 +0000 Original-Received: from localhost ([127.0.0.1]:47512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2IyB-0003rn-39 for submit@debbugs.gnu.org; Tue, 28 Dec 2021 15:21:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2Iy9-0003rW-P5 for 52558@debbugs.gnu.org; Tue, 28 Dec 2021 15:21:14 -0500 Original-Received: from [2001:470:142:3::e] (port=47010 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Iy0-00017q-I1; Tue, 28 Dec 2021 15:21:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T+A9+6VYyHQoQr8oYy9bGFICYl5QTdHAjY1PWDZpP4g=; b=CMGuOu5dJcKT c0zqda+ibKOMBuYH2XQ9HYySjxQE/8hjTVhPUSwdwe7o9FJjLOyxNlX7WyyGVfaab8H4D/WRooQgH 6uwID5EE1RfVUy9EXMAdS9iz+1IOssOXtoQZXKehRyeFvBjConFCnELozXkN0yGM6WkqJcK2S8RLk bo/hXju7dedUhHvw1gL4PO81ymExOprgoK3sPZxVf6b+PL/UuhcOjyWuua7wLRyFItJLjqYrZIQPN f/nwyTNnQUwPYu6ufogaLQ4GYUb7fIf3rr5zLtSDX9QzuK7U8k1R6oa+XAZwLVLN0LQ49v6Y85Mjp roMubYfrZFi3Y3mDl2IfRA==; Original-Received: from [87.69.77.57] (port=4902 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Ixy-0000bt-EL; Tue, 28 Dec 2021 15:21:04 -0500 In-Reply-To: <868rw4pmln.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 28 Dec 2021 21:15:32 +0200) 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:223283 Archived-At: > From: Juri Linkov > Date: Tue, 28 Dec 2021 21:15:32 +0200 > Cc: 52558@debbugs.gnu.org > > >> (setq replace-regexp-function > > > > And additional change is needed for correct highlighting: > > > > @@ -2690,7 +2693,8 @@ replace-highlight > > + (isearch-regexp-function (or replace-regexp-function > > This is pushed to master, so now it's possible to provide a custom > regexp converter for search and replace using isearch-regexp-function > and replace-regexp-function. Thanks, but the doc string of the new function is hard to understand: > +(defvar replace-regexp-function nil > + "Function to convert a search string to a regexp to replace. > +It's bound to `isearch-regexp-function' when searching > +for a string to replace.") The first sentence is unclear: what do you mean by "convert a search string to a regexp to replace"? What "search string" is being converted to regexp, and how does "replace" enter this picture? And this: It's bound to `isearch-regexp-function' when searching seems to be incorrect: it's isearch-regexp-function that's bound to replace-regexp-function, not the other way around. Can you clarify the doc string, please?