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: Wed, 29 Dec 2021 14:32:24 +0200 Message-ID: <83bl0zlhgn.fsf@gnu.org> References: <86v8zkkgxn.fsf@mail.linkov.net> <8635moe8z1.fsf@mail.linkov.net> <86wnk0ctxp.fsf@mail.linkov.net> <868rw4pmln.fsf@mail.linkov.net> <83ee5wlbv5.fsf@gnu.org> <867dboo4rv.fsf@mail.linkov.net> <83czlglb7c.fsf@gnu.org> <86pmpgmp1e.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22733"; 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 Wed Dec 29 13:33:10 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 1n2Y8j-0005iY-IY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Dec 2021 13:33:09 +0100 Original-Received: from localhost ([::1]:57914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2Y8h-0002Yq-TL for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Dec 2021 07:33:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Y8c-0002Yd-4s for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 07:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2Y8b-0001Ta-S2 for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 07:33:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n2Y8b-0000iz-LH for bug-gnu-emacs@gnu.org; Wed, 29 Dec 2021 07:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Dec 2021 12:33:01 +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.16407811511872 (code B ref 52558); Wed, 29 Dec 2021 12:33:01 +0000 Original-Received: (at 52558) by debbugs.gnu.org; 29 Dec 2021 12:32:31 +0000 Original-Received: from localhost ([127.0.0.1]:48174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2Y86-0000Ti-SB for submit@debbugs.gnu.org; Wed, 29 Dec 2021 07:32:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2Y83-0000NM-VI for 52558@debbugs.gnu.org; Wed, 29 Dec 2021 07:32:29 -0500 Original-Received: from [2001:470:142:3::e] (port=36920 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 1n2Y7y-0001Q5-2j; Wed, 29 Dec 2021 07:32:22 -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=etml0HahdTy8aJNtXwf8gCU68vzy/82tfb4Ag2xm+gI=; b=ehrvTBUS7sG9 0SxNZlTbnFEGj9WxLZKqBjKMKyHIfPAaFUnZTCiKjRoFn7gdY4zEfYMFiKMl2p66HxOxcDXt7lj+s dAQKWACrrsMj8AlXm1JFD5OkPSnMrRkaUczFmzLiTyz3Sf0j7sktQysL0gJU/OYg1/xIvrN32QPyy /YbtuLrI3vCoblfUrntGknaRXLRnjF7nzsxn5TdcLnkAQc/KClNene58R2KJ9Hp89Dbm1gp/yItDI gMozo/2Vi3E7R/W64/sMWh4BxnPNK6F50zZt0bha8oESrbRPaQ7XLFaMrO3Pd3Pg+vFxInrXsXkrv 3zzHU958XMGSnjFxqrbp/A==; Original-Received: from [87.69.77.57] (port=1033 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 1n2Y7y-00043M-1k; Wed, 29 Dec 2021 07:32:22 -0500 In-Reply-To: <86pmpgmp1e.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 28 Dec 2021 22:51:09 +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:223318 Archived-At: > From: Juri Linkov > Cc: laszlomail@protonmail.com, 52558@debbugs.gnu.org > Date: Tue, 28 Dec 2021 22:51:09 +0200 > > >> >> +(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? > >> > >> It has a reference to `isearch-regexp-function' that has > >> a complete explanation to avoid duplication of the docstring. > > > > I don't think this is enough. First, the first sentence of the above > > doc string doesn't have any such reference, so Apropos commands, which > > show only the first sentence, will not have that reference. > > But "isearch-regexp-function" is too long for the first sentence. Yes. But I didn't mean to include that name in the first sentence, I meant to say that we should say there something to better explain the purpose. > > And second, the doc string of isearch-regexp-function says nothing > > about replacements. > > It should say nothing about replacements. This is explained > in the second sentence: > > `isearch-regexp-function' is bound to it when searching > for a string to replace. So we have now made a full circle, and came back to what I said initially: "searching for a string to replace" doesn't explain itself, because the relevance of this to some search of a string and to some replacement is not clear. How about if you try to explain it to me in your own words, without paying attention to the constraints of a doc string, and I will then try to propose a more formal wording? Thanks.