From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Date: Wed, 3 Jun 2020 16:22:52 -0700 (PDT) Message-ID: References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62716"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41692@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 04 01:24:10 2020 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 1jgcjx-000G92-Qw for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jun 2020 01:24:09 +0200 Original-Received: from localhost ([::1]:42132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgcjw-0001xB-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jun 2020 19:24:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgcjq-0001wn-EA for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 19:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgcjq-00026A-5N for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 19:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jgcjq-0005Zx-1G for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 19:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jun 2020 23:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41692 X-GNU-PR-Package: emacs Original-Received: via spool by 41692-submit@debbugs.gnu.org id=B41692.159122658821383 (code B ref 41692); Wed, 03 Jun 2020 23:24:01 +0000 Original-Received: (at 41692) by debbugs.gnu.org; 3 Jun 2020 23:23:08 +0000 Original-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 Original-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 Original-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== Original-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 Original-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 Original-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 Original-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 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)] 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-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:181486 Archived-At: > 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.