From unknown Tue Sep 23 02:47:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41692 <41692@debbugs.gnu.org> To: bug#41692 <41692@debbugs.gnu.org> Subject: Status: 26.3; Enhancement request, `query-replace': let user use text at point as default Reply-To: bug#41692 <41692@debbugs.gnu.org> Date: Tue, 23 Sep 2025 09:47:08 +0000 retitle 41692 26.3; Enhancement request, `query-replace': let user use text= at point as default reassign 41692 emacs submitter 41692 Drew Adams severity 41692 wishlist tag 41692 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 03 14:35:54 2020 Received: (at submit) by debbugs.gnu.org; 3 Jun 2020 18:35:54 +0000 Received: from localhost ([127.0.0.1]:44546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgYEz-0007BZ-V1 for submit@debbugs.gnu.org; Wed, 03 Jun 2020 14:35:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:33256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgYEy-0007BR-8L for submit@debbugs.gnu.org; Wed, 03 Jun 2020 14:35:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgYEy-0008Mj-1p for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 14:35:52 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:42858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgYEw-0005Kj-7w for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 14:35:51 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 053IVwtH033962 for ; Wed, 3 Jun 2020 18:35:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=FfILFJV+34BvyUm1SDFzOdrcrj/lsbuW+0M1rMck+Bg=; b=rYWqkeqs1iTRvGhDA85Ur/9n3ccuPxPEbhVv1kLDHMWJfxH148HxsG9fqCvtu6HVLOD8 PADhgPisdlTUoFEuiNNWtX0cDnpa4SD+nQABXvjfm1x3TC82owwUK4wwLUQUre5b61nF Odncssniq6VzYiXByxtdox+F96YUYb432ZGZAWKRd6qSyzRR3PGYp5RS4ZprwLI+yoS2 fyug/cZ3aeh/t55ZA0UvW+oLXpFMDnyuz4JjYt2upF2xywopZieUm93qxsj8bJEFSx/y uvXhnaoOUpUkAAjNdWt2N1MgFmR28g/5xAh2BbXLb+9xibcASx1L76/qL8SnKzC6J05M tg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 31bewr2wse-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 03 Jun 2020 18:35:46 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 053ITSxA160123 for ; Wed, 3 Jun 2020 18:35:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 31c12ra3x5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 03 Jun 2020 18:35:45 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 053IZiom020265 for ; Wed, 3 Jun 2020 18:35:44 GMT MIME-Version: 1.0 Message-ID: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> Date: Wed, 3 Jun 2020 11:35:41 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.3; Enhancement request, `query-replace': let user use text at point as default X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9641 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=1 spamscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006030143 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9641 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 bulkscore=0 phishscore=0 suspectscore=1 impostorscore=0 cotscore=-2147483648 lowpriorityscore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006030143 Received-SPF: pass client-ip=156.151.31.86; envelope-from=drew.adams@oracle.com; helo=userp2130.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/03 14:35:46 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) If you want to default the FROM or TO text for `query-replace' to some text at point, you currently need to first isearch for it. This request is essentially to be able to skip doing that. As an example (only), in my own code, my version of `query-replace-read-from' can get the default any of these ways: * Text of nonempty active region, if option `search/replace-region-as-default-flag' is non-nil. * Text of secondary selection, if option `search/replace-2nd-sel-as-default-flag' is non-nil. * What the (function) value of option `search/replace-default-fn' returns, when called. This defaults to a function that grabs text at point. (If the function returns a list of strings, then those are the multiple default values.) (As with vanilla query-replace, you can also use the history lists, and you can enter nothing to repeat the previous query replacement operation.) I don't say that vanilla Emacs should do all of that. But maybe at least something like the third one - a function that returns a string or list of strings to be used as default values, and with, as its default value, a function that grabs some text at point. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.18362 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3'' From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 03 19:05:51 2020 Received: (at 41692) by debbugs.gnu.org; 3 Jun 2020 23:05:51 +0000 Received: from localhost ([127.0.0.1]:44716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgcSF-00059U-5w for submit@debbugs.gnu.org; Wed, 03 Jun 2020 19:05:51 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgcSC-000591-Cp for 41692@debbugs.gnu.org; Wed, 03 Jun 2020 19:05:49 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B5E31C0007; Wed, 3 Jun 2020 23:05:41 +0000 (UTC) From: Juri Linkov To: Drew Adams Subject: Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Organization: LINKOV.NET References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> Date: Thu, 04 Jun 2020 01:54:47 +0300 In-Reply-To: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> (Drew Adams's message of "Wed, 3 Jun 2020 11:35:41 -0700 (PDT)") Message-ID: <87a71jwyiw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > If you want to default the FROM or TO text for `query-replace' to some > text at point, you currently need to first isearch for it. This request > is essentially to be able to skip doing that. > > As an example (only), in my own code, my version of > `query-replace-read-from' can get the default any of these ways: > > * Text of nonempty active region, if option > `search/replace-region-as-default-flag' is non-nil. > > * Text of secondary selection, if option > `search/replace-2nd-sel-as-default-flag' is non-nil. > > * What the (function) value of option `search/replace-default-fn' > returns, when called. This defaults to a function that grabs text at > point. (If the function returns a list of strings, then those are the > multiple default values.) > > (As with vanilla query-replace, you can also use the history lists, > and you can enter nothing to repeat the previous query replacement > operation.) > > I don't say that vanilla Emacs should do all of that. But maybe at > least something like the third one - a function that returns a string or > list of strings to be used as default values, and with, as its default > value, a function that grabs some text at point. query-replace-regexp already does all the above. It provides text at point for first M-n, the last search string for the second M-n, etc. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 03 19:23:08 2020 Received: (at 41692) by debbugs.gnu.org; 3 Jun 2020 23:23:08 +0000 Received: from localhost ([127.0.0.1]:44727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgcix-0005Yp-Tu for submit@debbugs.gnu.org; Wed, 03 Jun 2020 19:23:08 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:57152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgciw-0005Y6-70 for 41692@debbugs.gnu.org; Wed, 03 Jun 2020 19:23:06 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 053NMixP140931; Wed, 3 Jun 2020 23:22:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=kiyatO2S+zCEsJ6e6jE9WeB1Fx+hd1qtWa5EjBCsbmQ=; b=i8tTB7Arh2bkj6hmd20SVc6HPjTtNKlyd89SaK7M6KbXLUpAuULRuTor/e0wZE6YOtVY QiUpgYtd0chsI7Nr7pmlX0j2YXmW2cSRpS8ftbWwnj9vJ6ajxmqg2D9mVZpYYmMzGES/ aUIdoV5upw8hqdNWT4W7fLhx6zt3UPZMnzRBPT5J2W7KeIlmjfYruNmAFQ/4HkUWByQC uUfzsiwy+rtrZVyZhWgBgWEnwO2zYYk04jH3ytoCpCJXENjRTp4KdpKUcqAQ589PVEuV EzTIiGeBg+Gjch0g/bgzWCGAhCeZojxc+2zi4vdKfotMtA5yh5YNwQh76mpBkCpV3wg6 MQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 31bfembt1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 03 Jun 2020 23:22:59 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 053NJYRe104615; Wed, 3 Jun 2020 23:22:58 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 31c1e0tpgx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Jun 2020 23:22:58 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 053NMu0k014728; Wed, 3 Jun 2020 23:22:57 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 3 Jun 2020 16:22:52 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> In-Reply-To: <87a71jwyiw.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9641 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006030176 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9641 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 phishscore=0 clxscore=1011 impostorscore=0 adultscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006030177 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > query-replace-regexp already does all the above. It provides text > at point for first M-n, the last search string for the second M-n, etc. The bug report was about `query-replace' (but also other, related commands, if relevant). =20 Checking with the Emacs 27 pretest, as far as I can see: 1. There's NO such defaulting for `query-replace'. Nada. 2. `query-replace-regexp' does NOT do "all of the above". It doesn't use the active region. It doesn't use the secondary selection. It doesn't use a function variable does it? I mean a variable whose value is a function that returns some particular bunch of text at point. Something similar to the option `search/replace-default-fn' I mentioned. I see, for `C-M-%', only these two defaults: 1. A word at point (e.g. `foo'), 2. A regexp that matches a symbol at point (e.g. `\_'. But yes, that's better than nothing - a good start. `query-replace' could likewise use some love. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 04 18:23:52 2020 Received: (at 41692) by debbugs.gnu.org; 4 Jun 2020 22:23:53 +0000 Received: from localhost ([127.0.0.1]:47648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgyHA-0004Ur-Mn for submit@debbugs.gnu.org; Thu, 04 Jun 2020 18:23:52 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:50185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgyH9-0004Ud-HY for 41692@debbugs.gnu.org; Thu, 04 Jun 2020 18:23:52 -0400 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 5ABBD100003; Thu, 4 Jun 2020 22:23:43 +0000 (UTC) From: Juri Linkov To: Drew Adams Subject: Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Organization: LINKOV.NET References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> Date: Fri, 05 Jun 2020 01:05:27 +0300 In-Reply-To: (Drew Adams's message of "Wed, 3 Jun 2020 16:22:52 -0700 (PDT)") Message-ID: <878sh2lctc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I see, for `C-M-%', only these two defaults: > > 1. A word at point (e.g. `foo'), > 2. A regexp that matches a symbol at point (e.g. `\_'. > > But yes, that's better than nothing - a good start. > `query-replace' could likewise use some love. I agree that `query-replace' should at least do the same as `query-replace-regexp', and `query-replace-regexp' could be extended. Currently `query-replace-read-from' has: (if regexp-flag (read-regexp prompt nil 'minibuffer-history) (read-from-minibuffer prompt nil nil nil nil (car search-ring) t)) It's easy to extend `read-regexp' with more options, but what to do for non-regexp case? Maybe to try to use `read-string' and extend it with more M-n options like in `read-regexp'. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 04 19:01:48 2020 Received: (at 41692) by debbugs.gnu.org; 4 Jun 2020 23:01:48 +0000 Received: from localhost ([127.0.0.1]:47764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgyrr-0005V1-UV for submit@debbugs.gnu.org; Thu, 04 Jun 2020 19:01:48 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:53834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgyrp-0005Un-LP for 41692@debbugs.gnu.org; Thu, 04 Jun 2020 19:01:46 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 054MwLP2033083; Thu, 4 Jun 2020 23:01:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=IoirgfJV3wQ4T32ONzeXi8Fg4IRyBHxmxZzSj5JlAP4=; b=lEKBFMoVs8kNajGBYAKevA+Udl5NhZkeF7iA5naFZ4FgXmMZZM5MinFMMIjmC7vuKYGR 0Y51mxk3jrPFDDqTPOUWHs6CrB6fqquGKyGenL11uJPGF5aoc7+O7Dv3fGNUMdtqwjUj nsmEw8BXYVJ8mjOB6u7hw8OC8hEYbcTvZT34hZVfmp7FOW54W/Sw/5e7B3XQTGjvKTK8 YXCGKC0SokJan2yl6bPY7/kVJkOmOJ9eBtv71QqjSrraZvVKn1oxSuzH629CvnbxTlSB X2EyvkgJcUgO8hSE1X1GszwOI93in354TYEbmO3w35MHRGbhJmHXgyUjPaA1qRqcZSOH qA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 31f9260754-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 04 Jun 2020 23:01:39 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 054Mw73I138469; Thu, 4 Jun 2020 23:01:39 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 31f926a2rj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Jun 2020 23:01:39 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 054N1ZgP020898; Thu, 4 Jun 2020 23:01:35 GMT MIME-Version: 1.0 Message-ID: <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> Date: Thu, 4 Jun 2020 16:01:21 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> In-Reply-To: <878sh2lctc.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9642 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006040160 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9642 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 suspectscore=0 cotscore=-2147483648 bulkscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 spamscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006040160 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Currently `query-replace-read-from' has: > (if regexp-flag > (read-regexp prompt nil 'minibuffer-history) > (read-from-minibuffer > prompt nil nil nil nil (car search-ring) t)) >=20 > It's easy to extend `read-regexp' with more options, > but what to do for non-regexp case? >=20 > Maybe to try to use `read-string' and extend it with > more M-n options like in `read-regexp'. I don't understand the question. `read-from-minibuffer' accepts a list of default values. Or maybe I don't understand what you mean by "more options". I think I referred you to my code in `replace+.el'. Here it is, in case I didn't: https://www.emacswiki.org/emacs/download/replace%2b.el In my code for `query-replace-read-from' I determine the default value(s) by evaluating this: (search/replace-default (symbol-value query-replace-from-history-variable)) I use function `search/replace-default' in lots of search and replace functions. It's the place where this logic is used to get default values: Return a default value or list of such for search & replace functions. A list of default input strings is computed and returned. The possible strings are, in order: * The active region, if option `search/replace-region-as-default-flag' is non-nil. * The secondary selection, if option `search/replace-2nd-sel-as-default-flag' is non-nil. * The result of calling the value of option `search/replace-default-fn', if non-nil. * The first entry in the history list HISTORY. Option `search/replace-default-fn' lets users decide what function to use, to grab buffer text as the default. The option's default value is a function that grabs the non-nil symbol name that's nearest point. If that function isn't available then the default value is `word-at-point'. HTH. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 19:38:50 2020 Received: (at 41692) by debbugs.gnu.org; 11 Jun 2020 23:38:50 +0000 Received: from localhost ([127.0.0.1]:38380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjWmX-0005ny-QS for submit@debbugs.gnu.org; Thu, 11 Jun 2020 19:38:50 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjWmV-0005nM-LQ for 41692@debbugs.gnu.org; Thu, 11 Jun 2020 19:38:47 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8A5FD60002; Thu, 11 Jun 2020 23:38:41 +0000 (UTC) From: Juri Linkov To: Drew Adams Subject: Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Organization: LINKOV.NET References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> Date: Fri, 12 Jun 2020 01:58:36 +0300 In-Reply-To: <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> (Drew Adams's message of "Thu, 4 Jun 2020 16:01:21 -0700 (PDT)") Message-ID: <87a719yztv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> Currently `query-replace-read-from' has: >> (if regexp-flag >> (read-regexp prompt nil 'minibuffer-history) >> (read-from-minibuffer >> prompt nil nil nil nil (car search-ring) t)) >> >> It's easy to extend `read-regexp' with more options, >> but what to do for non-regexp case? >> >> Maybe to try to use `read-string' and extend it with >> more M-n options like in `read-regexp'. > > I don't understand the question. `read-from-minibuffer' > accepts a list of default values. Or maybe I don't > understand what you mean by "more options". Right, let's add more default values to `read-from-minibuffer': --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=query-replace-read-from-defaults.patch diff --git a/lisp/replace.el b/lisp/replace.el index 69092c16f9..a5a5200df7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -227,7 +227,16 @@ query-replace-read-from (if regexp-flag (read-regexp prompt nil 'minibuffer-history) (read-from-minibuffer - prompt nil nil nil nil (car search-ring) t))))) + prompt nil nil nil nil + (delq nil + (list + (when (use-region-p) + (buffer-substring-no-properties + (region-beginning) (region-end))) + (find-tag-default) + (car search-ring) + (car (symbol-value query-replace-from-history-variable)))) + t))))) (to)) (if (and (zerop (length from)) query-replace-defaults) (cons (caar query-replace-defaults) @@ -798,6 +807,9 @@ read-regexp-suggestions appends the list returned by this function to the end of values available via \\\\[next-history-element]." (list + (when (use-region-p) + (buffer-substring-no-properties + (region-beginning) (region-end))) (find-tag-default-as-regexp) (find-tag-default-as-symbol-regexp) (car regexp-search-ring) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 20:36:34 2020 Received: (at 41692) by debbugs.gnu.org; 12 Jun 2020 00:36:34 +0000 Received: from localhost ([127.0.0.1]:38444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjXgQ-0007Ht-3Q for submit@debbugs.gnu.org; Thu, 11 Jun 2020 20:36:34 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:54084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjXgO-0007HZ-MG for 41692@debbugs.gnu.org; Thu, 11 Jun 2020 20:36:33 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05C0WuDQ099342; Fri, 12 Jun 2020 00:36:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=eSnc5Umj25AQ7QVLmTAtE8E2oFWk8vse0v48HBeMbbk=; b=eac64H7hc733LVa1Wzb9+5T57ZN8wVoXhM8dSt5V1LKnSsk66lyYzult4Ft+AiIYDxTQ LsvSoX+GUYnc7RzNSdwIwLSmqAFRDuqNy8NiAYZ9vJC6oSt5zALvUHhKXxGUGJ48ClTT oZxMy129xbXmzlPwL2z3z64sm//VRw1+YXbpPnoQM7+RGhfkyX00KoD00sY+PUVt54KE LCC0GXre8v/hzIQ4jiK834ODmGUKRwIjBvjrGYpAPFj/W3svchcyc1l5Kj2kFVtkUY4k z9GNpPlQGes62H8+Ge0rwG3/evVsWmXRlNBKOKUFrB93+VNtxo53ok0+h+hiVuDYZvqy xg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 31g3snafk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Jun 2020 00:36:26 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05C0Y8h5145402; Fri, 12 Jun 2020 00:34:25 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 31ky6t8bj8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Jun 2020 00:34:25 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05C0YMOp002112; Fri, 12 Jun 2020 00:34:22 GMT MIME-Version: 1.0 Message-ID: <355c8fb7-2113-44c4-acdd-cbbf02d3828b@default> Date: Thu, 11 Jun 2020 17:34:21 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> <87a719yztv.fsf@mail.linkov.net> In-Reply-To: <87a719yztv.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006120001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 cotscore=-2147483648 suspectscore=0 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006120001 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > `read-from-minibuffer' accepts a list of default > > values. Or maybe I don't understand what you > > mean by "more options". >=20 > Right, let's add more default values to `read-from-minibuffer' Yes, but not in a hard-coded way. What I'd suggest instead: Provide a user option, to let users choose the list of default sources (and thus also their order). The option value could be a `repeat' of a `choice' among: (1) nonempty active region, (2) secondary selection, (3) result of calling the function that's the value of a predefined option, (4) the most recent entry in the query-replace history variable - and whatever else you want to include. #1-4 are what I use in my code. Both my code and your code provide a hard-coded list. But letting a user choose the list is better. Your list includes `(find-tag-default)' and the first entry of `search-ring'. And your list doesn't include the secondary selection or the result of funcalling a function-valued variable (option). I don't have a problem with your adding more choices to the default value of the list option. I do mind that you've removed those two (second sel and function) from your list. It's especially important to include a funcallable option value. So the two changes I'd like to see to your code are: (1) add an option that lets users specify a list of sexps to evaluate to provide the list of default values, and (2) include secondary selection and (especially) a function-valued user option among the list-element `choice's. But another consideration: `query-replace-read-from' is used for several kinds of query-replacing, including for `query-replace-regexp'. For that command, `regexp-search-ring', is more appropriate than `search-ring'. The option value `choice' could thus include, not a hard-coded `search-ring', but a variable value, so `query-replace-regexp' could bind that variable to `regexp-search-ring', and `query-replace' could bind it to `search-ring'. IOW: * One option for a user-chosen list of sources of default values. Easy for a user to order the list, make it smaller, and change any of the choices that use a variable. * One function-valued option, for a user-chosen function, to be funcalled with no args to produce a default value. * One defvar whose value is used as a default value. I'd actually prefer a user option for the last one (the defvar), but I know that vanilla Emacs doesn't like to let a command bind a user option. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 20:46:26 2020 Received: (at 41692) by debbugs.gnu.org; 12 Jun 2020 00:46:26 +0000 Received: from localhost ([127.0.0.1]:38461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjXpy-0007YB-Jz for submit@debbugs.gnu.org; Thu, 11 Jun 2020 20:46:26 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:41574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjXpw-0007Xx-ST for 41692@debbugs.gnu.org; Thu, 11 Jun 2020 20:46:25 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05C0j36e068256; Fri, 12 Jun 2020 00:46:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=lzrLeqL5xCpHIxvBsHp+83c3p/P8qzuMT0vvsNKjmj0=; b=n1FIz+BUBDCXgTl1nk8g9kOCDEbiOUmoQYFHXporJ4NAQQX9XHFR+8JoLCtAKMTkKq4S PcCaqkDCcycO0IYg/NY375bczpoV5+Ce7HEeoHvkIwnkNyasVsJ5N8wxjHOUPurM1YFU 46/p/S8CsL0m1eFK23tbw2Pis1QbzPJfz2YubWfMdU4nvkCVjb+YkbWr2hbzGl6AKK/a im1W1+DWzQQ1ESNCUM7hDEgH8J/13ip7/vdRuxcIUl9mRJj3VMJYECuN2Ga+Tea5xXsg Bbk7rlFtegm02/K2xSa4oYQ3Tkewvo/i9vM5ALtPWUTsUjRxU4xbI6sglYat2F9aiozJ CA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 31g2jrjneb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Jun 2020 00:46:18 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05C0gVmO159916; Fri, 12 Jun 2020 00:46:18 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 31ky6y99k3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Jun 2020 00:46:17 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05C0kH3T006717; Fri, 12 Jun 2020 00:46:17 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 11 Jun 2020 17:46:16 -0700 (PDT) From: Drew Adams To: Juri Linkov Subject: RE: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> <87a719yztv.fsf@mail.linkov.net> <355c8fb7-2113-44c4-acdd-cbbf02d3828b@default> In-Reply-To: <355c8fb7-2113-44c4-acdd-cbbf02d3828b@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006120002 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 cotscore=-2147483648 priorityscore=1501 spamscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006120002 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Sorry, the defvar I suggested is not good, at least for picking up the car of `search-ring' or `regexp-search-ring'. Wasn't thinking straight. Maybe either another function-valued variable (to be called) or a sexp-valued variable (to be evalled). The main suggestion is more user control over (1) the list of default sources and (2) some of the choices (e.g. one or two function-valued vars). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 13:34:18 2021 Received: (at 41692) by debbugs.gnu.org; 27 Jan 2021 18:34:18 +0000 Received: from localhost ([127.0.0.1]:46093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pdy-0005uY-CH for submit@debbugs.gnu.org; Wed, 27 Jan 2021 13:34:18 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:44507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pdw-0005uH-LU; Wed, 27 Jan 2021 13:34:17 -0500 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8AAFA24000D; Wed, 27 Jan 2021 18:34:07 +0000 (UTC) From: Juri Linkov To: Drew Adams Subject: Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> <87a719yztv.fsf@mail.linkov.net> <355c8fb7-2113-44c4-acdd-cbbf02d3828b@default> Date: Wed, 27 Jan 2021 20:33:46 +0200 In-Reply-To: (Drew Adams's message of "Thu, 11 Jun 2020 17:46:16 -0700 (PDT)") Message-ID: <87zh0u1bnx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41692 Cc: 41692@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 41692 fixed close 41692 28.0.50 thanks > Maybe either another function-valued variable > (to be called) or a sexp-valued variable (to be > evalled). Thanks for the suggestion. Now a new function query-replace-read-from-suggestions is added that is easy to redefine like read-regexp-suggestions. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 27 13:57:53 2021 Received: (at 41692) by debbugs.gnu.org; 27 Jan 2021 18:57:53 +0000 Received: from localhost ([127.0.0.1]:46130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4q0n-00006h-35 for submit@debbugs.gnu.org; Wed, 27 Jan 2021 13:57:53 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:44538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4q0l-00006S-TJ for 41692@debbugs.gnu.org; Wed, 27 Jan 2021 13:57:52 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10RIYaNw024538; Wed, 27 Jan 2021 18:57:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=KWyz6v7Q1jZZnF3Hom1wmhRescM19C3V3W22TnQ07K4=; b=Y/1keAe5+lR3VURVcOJSxNd0pAZjbNVxMEfBAWcQHrG5AfWcxRtVx9wPL/P1oIiwG75O y5CMp6efJ6O/m6n1y/rDKd8iV8Ge/aBKOpoq62hHamTdXmkVPoWx0HOD2k+j3FcyYa2K IPagtRu1AgxTZz+4jLhu2bRG4/K26qgQ36G2bulCWlrkKw5d9zZ5C6aVwABS3QN27J4v wLDIaTADx6kn4r83FlN1l5n1L8HprbTsfN5IPBACfEYFddkoNHz8+m3DftctXm0Lczo4 Hk6PY+teU7b/KIiqCJ6oOlzybndYsMuTeC/Xf/Jn8irmA+CGZx+7bvoi3w/MV3iAfpW4 uw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brkrpj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jan 2021 18:57:45 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10RIZkHt015950; Wed, 27 Jan 2021 18:55:44 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by userp3020.oracle.com with ESMTP id 368wjsxtvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jan 2021 18:55:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BO6K4evLUe4cjwjqFKynQ6WKT1vbPbKFD7xjUxmugGWq23i3g/F8MnGSJQeb91/Lvjx7PSFDzj7uviLVXt07qimzEQIZVPzIEAghX6LSDn6rTuhniaBdMaQrDz3UtdiaGE+/L0JksOW3IGxK4Mh9uQfaV7dVtTVap/qFQKopN8xIN4JoIZRqNf2FCIC+BY+bNIB1ERehTWXc/e2UYqhrHJcCNmgZa2eC9mQJMvFKPhy2BzU2/iLcMhZCCYWfxabWqqBcdOvFZHWjU3zoM1HbAdsbZBHCyZwpCYMH6K2K86XB900gM1Qm9TQ76piH1ehyBzcd3Am5Z1DMW4uFm5cfgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KWyz6v7Q1jZZnF3Hom1wmhRescM19C3V3W22TnQ07K4=; b=UjDU7OaQftvaUKL835jwc6SO+2a7UZ/tar+lGnLe2CfK15XwQYW19+3sF6z4EzHfvi6S93y/kCcDMj9J3Yjg6KS3FzCys9NtcBhbsgmFF4GRytAHgju+GaZyS4opsNUOoOAdJ2ozCLw4NMhu/u6HNHZ56TduygOM4h4lx+303Nw/levammVNA7Obt1xEgIo2x2yOYx1Dp0aWU52VDtfamJCaGxIeC2UQrGGkuiCeXd0EoKHtXffcFT4yI4nxbiDd45l77jor86nA+J0MmfZFNX3fsTmw01etpSMfK/nAPsO3HtLMmeo+a/I2k5Krn4y5AUyqtoj4AJGRDzi37BTGyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KWyz6v7Q1jZZnF3Hom1wmhRescM19C3V3W22TnQ07K4=; b=RXk4GS0kKDSvDw7fhWoh8AM3+9TJ/kQ9q8uUN6GO6lo6QGyC7tqVNEwJVJx0g0V4q8KuGcabYSU5IVv86W409oca4GXRIIZlTfItr7spxSx3vBsRQGD1ICiyBxyDKh9nrWIsSdchZiC3nsY8FnhLz+dTxWzCQDWnHB5W9zWIeC0= Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2781.namprd10.prod.outlook.com (2603:10b6:805:d4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.16; Wed, 27 Jan 2021 18:55:42 +0000 Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::dc4d:9cd0:2010:daa2%7]) with mapi id 15.20.3784.019; Wed, 27 Jan 2021 18:55:42 +0000 From: Drew Adams To: Juri Linkov Subject: RE: [External] : Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Thread-Topic: [External] : Re: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Thread-Index: AQHW9NsHn0QuO4IuoUy5dJQHQxSe36o70fBA Date: Wed, 27 Jan 2021 18:55:42 +0000 Message-ID: References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> <878sh2lctc.fsf@mail.linkov.net> <39e06665-8ab7-4b81-a481-9a8ccf3a15e1@default> <87a719yztv.fsf@mail.linkov.net> <355c8fb7-2113-44c4-acdd-cbbf02d3828b@default> <87zh0u1bnx.fsf@mail.linkov.net> In-Reply-To: <87zh0u1bnx.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linkov.net; dkim=none (message not signed) header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1e412fc8-cd02-4456-a6aa-08d8c2f5258b x-ms-traffictypediagnostic: SN6PR10MB2781: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8j2ja/Nmot6EfiOjvOWPAtL3lLncVdU2FNjlxfC4sf8ruWaSwsEpzKlw+/W7tvajV+dMTEc+7BSBGrMg7neeO0IAWL4HNQJFhHOlWGJ2NsO8R5tvTG3e2gjD5YqBCwH5TSvQxts+1stQoxIdaQsmSb7jPVOv+KELgQwaD+UDlljfUhKRFiZPV7utVHysZid+/96WPM5OuoidySpdiSj57UvbKmJu2SDIr3L+/v8pXpdYzb8G0Vr2/6PX/RHDJ0PGxwypcO3/lQD3C2s+gIZ8obRt0FedKzBC2hxvYGQAEC1KjFqqbCxrHXpPBvS8R2quqNVuGzVsuE03w/QO4KkeaBxH1w4XI+/jNaWQeGgFuJmBkjhD88+RqRBdZq6zcwFZHYJElzOl2qfxChn45J5zDN95uaume4zQh/4TIvr6zQFV8KyW7z2HQpldYmppzACIS90+0j1cmVHXEOeLeg/cby+qh3KJy3zlYuyQetjMqiOcvwafeZlBarzGXl6BrT6125usSmA0cC+KNkL7W5OMHx3eqja79Sqf98oHDK/bsdJ2vgVE62W45e3soTIQ0lkG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(376002)(396003)(136003)(39860400002)(346002)(8676002)(64756008)(66476007)(66556008)(66446008)(44832011)(66946007)(76116006)(26005)(52536014)(71200400001)(4744005)(186003)(86362001)(33656002)(2906002)(5660300002)(7696005)(9686003)(55016002)(8936002)(478600001)(6506007)(4326008)(316002)(6916009)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8tshVT+zR9gFAnJo6YasodYufYXanv0Hw634UlyGwIsvfYGfwbttUKcYu7Vy?= =?us-ascii?Q?0xQKeCMvviU6B8k9kdk62awDQKvBYltOfwdZGkuMLBWlSEsJuRSBTexvSCja?= =?us-ascii?Q?Mjr0A+BLBr0Va4Yyht9CyUctXWIcknzSSL3ndkSStzxEWx8WO0eSrlisJFUo?= =?us-ascii?Q?oIO4zZbNxRNGzjYIa/UqKdkNfB5duM9RfZgrd+p5QLGrZkpwiqbHVNhpdUxp?= =?us-ascii?Q?Fqx0BLYcogt2wiXbN6IS2oTRDzxshlgFXKDUpbHCPBVdWLByRSa66iihPuqR?= =?us-ascii?Q?B7ub7fT3fX008wU/mQIW6fOel57ch3zrHkPRVsUhWWLkKva4D40uOKvg/mTG?= =?us-ascii?Q?4AHAxIAdepLPmY8bQ78k+q6O8zf4qq/cLFkcoR5rUx2svWVYtu95BexV2htp?= =?us-ascii?Q?/sK7iY8DUKXEhEfbExjeOXgP3bLZ5ybE90iPjVeaXyGRyEMwnHc2I0AAjMMd?= =?us-ascii?Q?oqtEFTQVj0ZkzQwlF6zmpNISk+jd0dh94f1JKhzBJmWG+suD9pqT0pGNpzzH?= =?us-ascii?Q?fgl+KxZYOxtVv7BiR96y3PiYx0oQncTESz5flzsWgfG8JJKDlVqp3b1+B7pe?= =?us-ascii?Q?fGg36zFMdSwFA/xO0k+gMqSTmtWEcOhurA/DQiRuzDtNv21YnME0bTueSOZj?= =?us-ascii?Q?qEdQuQWfamdyr0MMD5bigJjTdPjR96cXNaQGR2rKWa+BLnFqpuFLYcjx1C1Y?= =?us-ascii?Q?+Ai/wqgO8eZfyH/LcYXC9Be5VuNyJw7LALYgHrmrMZJNHiyigEITcm/+GImg?= =?us-ascii?Q?r4Wm7P997ywFnvUJy0cVXPkMTpZl2Xm2whCXsiFpd587rhp8DYCmRWB/TnCs?= =?us-ascii?Q?v4d5SEXm8VDgek/0c1wVnCNxz0K2P90o0Aa1m8BYk1blg5Y+PHtOn9mhZeFD?= =?us-ascii?Q?FaCHIKN4q6h5mj5OlYghQJqr6gdKh6IEfBrndnKqNdLyzPXOMl4vk3Pxdmo2?= =?us-ascii?Q?tiBg8kc/I6p7SOU8n/a63hFhdBhdpxY0r3xAYsWoxt3tHXPbKt2HB8WnFzWL?= =?us-ascii?Q?KsEJA+c9XHry/x06M3EIKkKf/bXYSk/OjqmAZPW5ODW8aiodr2OaowoyJah8?= =?us-ascii?Q?Zzl/bzm3?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e412fc8-cd02-4456-a6aa-08d8c2f5258b X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2021 18:55:42.4126 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FhLGmkcPbYK9w9JhOyOgiKzAQyU7xsHQCMY4Yf0dFHmKmvsxwsDYuH7N3z+ChtWXUE3ToDzaP5/mvK5pqJrzIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2781 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=940 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101270092 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101270092 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41692 Cc: "41692@debbugs.gnu.org" <41692@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Maybe either another function-valued variable > > (to be called) or a sexp-valued variable (to be > > evalled). >=20 > Thanks for the suggestion. Now a new function > query-replace-read-from-suggestions is added that > is easy to redefine like read-regexp-suggestions. I'll take your word for it, I guess. The doc (and behavior) of `read-regexp-suggestions' is a convoluted nightmare, IMHO. Hope that's not the case for your proposal for query-replace. From unknown Tue Sep 23 02:47:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Feb 2021 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator