From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41692: 26.3; Enhancement request, `query-replace': let user use text at point as default Date: Fri, 05 Jun 2020 01:05:27 +0300 Organization: LINKOV.NET Message-ID: <878sh2lctc.fsf@mail.linkov.net> References: <3705c67a-f3a1-4667-8c3f-67b41752f355@default> <87a71jwyiw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74364"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41692@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 00:24:59 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 1jgyIF-000JFf-9L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 00:24:59 +0200 Original-Received: from localhost ([::1]:35786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgyIE-00058h-Bv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jun 2020 18:24:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgyHK-0003N8-L1 for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2020 18:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgyHK-0005ru-AT for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2020 18:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jgyHK-0004VZ-7o for bug-gnu-emacs@gnu.org; Thu, 04 Jun 2020 18:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jun 2020 22:24:02 +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.159130943317294 (code B ref 41692); Thu, 04 Jun 2020 22:24:02 +0000 Original-Received: (at 41692) by debbugs.gnu.org; 4 Jun 2020 22:23:53 +0000 Original-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 Original-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 Original-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) In-Reply-To: (Drew Adams's message of "Wed, 3 Jun 2020 16:22:52 -0700 (PDT)") 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:181526 Archived-At: > 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'.