From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: query-replace-interactive Date: Wed, 07 Jul 2004 16:58:20 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <876594drn6.fsf@mail.jurta.org> <87k6xjouj5.fsf@mail.jurta.org> <871xjp5uii.fsf@mail.jurta.org> <876590iepc.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1089234008 4742 80.91.224.253 (7 Jul 2004 21:00:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jul 2004 21:00:08 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jul 07 23:00:03 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 1BiJWN-0007hB-00 for ; Wed, 07 Jul 2004 23:00:03 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BiJWM-0000yl-00 for ; Wed, 07 Jul 2004 23:00:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiJYS-0006eo-1z for emacs-devel@quimby.gnus.org; Wed, 07 Jul 2004 17:02:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BiJWt-0005g0-2r for emacs-devel@gnu.org; Wed, 07 Jul 2004 17:00:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BiJWq-0005ea-P6 for emacs-devel@gnu.org; Wed, 07 Jul 2004 17:00:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiJWq-0005eM-IM for emacs-devel@gnu.org; Wed, 07 Jul 2004 17:00:32 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BiJUj-0007ZB-Hk for emacs-devel@gnu.org; Wed, 07 Jul 2004 16:58:21 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BiJUi-0003Q8-OX; Wed, 07 Jul 2004 16:58:20 -0400 Original-To: Juri Linkov In-reply-to: <876590iepc.fsf@mail.jurta.org> (message from Juri Linkov on Wed, 07 Jul 2004 08:11:43 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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:25538 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25538 I extended this idea to what you described above, i.e. splitting the from-string argument in the form "FROM -> TO". This would be more consistent with standard Emacs handling of default values, but it has one drawback: the separator should not appear in the text to replace. You mean "cannot appear", I think. Yes, but we could have some escape mechanism to handle that case. For instance, if you enter just the separator, so that the from and to strings would be empty, it could call the minibuffer twice (the same thing it does now) to read the from and to strings. Perhaps a more robust method would be to use some sort of "separator" string like you suggest, but make it not a simple string, e.g., how about: (defvar query-replace-separator (propertize "\nwith: " 'read-only t 'field 'prompt 'face 'minibuffer-prompt 'rear-nonsticky t)) That is an interesting idea. Would you like to try it? One case where this could cause some annoyance is that it may get in the way of certain kinds of editing. We'd have to see.