From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: isearch-query-replace-regexp and stuff Date: 02 Jul 2004 01:18:36 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088723969 2739 80.91.224.253 (1 Jul 2004 23:19:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2004 23:19:29 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jul 02 01:19:22 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BgApu-00061Q-00 for ; Fri, 02 Jul 2004 01:19:22 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BgApt-0001Ci-00 for ; Fri, 02 Jul 2004 01:19:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BgArg-00062q-B7 for emacs-devel@quimby.gnus.org; Thu, 01 Jul 2004 19:21:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BgArV-00062M-CD for emacs-devel@gnu.org; Thu, 01 Jul 2004 19:21:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BgArU-000629-T0 for emacs-devel@gnu.org; Thu, 01 Jul 2004 19:21:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BgArU-00061z-Qb for emacs-devel@gnu.org; Thu, 01 Jul 2004 19:21:00 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BgApC-0004wf-Hd for emacs-devel@gnu.org; Thu, 01 Jul 2004 19:18:38 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1BgApB-000351-RS for emacs-devel@gnu.org; Thu, 01 Jul 2004 19:18:38 -0400 Original-To: emacs-devel@gnu.org Original-Lines: 21 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25365 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25365 As far as I am able to judge from the current code that is just checked in, if one types M-% from within a regexp isearch or C-M-% from within an ordinary isearch, the history variable of the last irrelevant search type gets consulted. That seems weird. I think that M-% from within a regexp isearch should probably use the currently matched string, and C-M-% from within an ordinary isearch should probably use regexp-quote of the current search string. I have no brilliant idea of what to do if we type M-% in a regexp isearch and there is no currently matched string. Probably just beep and refuse, which would also be the sanest option if the regexp is currently incomplete. Of course, if query-replace-interactive is 'initial, one might possibly just provide an empty string as initial value (leaving the history in peace), and if it is nil, we need not bother anyhow. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum