From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: error in replace-match: "args out of range" [SOLVED] Date: Thu, 7 Apr 2011 12:09:06 -0700 Message-ID: References: <4D90D85C.5060805@mousecar.com> <4D98EE5B.4080108@mousecar.com> <4D9BE07B.2060204@mousecar.com> <4D9DC382.5070900@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1302204259 24712 80.91.229.12 (7 Apr 2011 19:24:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2011 19:24:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gebser@mousecar.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 21:24:14 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7uoK-0001E8-13 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 21:24:08 +0200 Original-Received: from localhost ([127.0.0.1]:34929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7udl-0005Nx-2t for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 15:13:13 -0400 Original-Received: from [140.186.70.92] (port=40522 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7uZt-0002m1-Dc for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 15:09:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7uZs-0007Gy-Je for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 15:09:13 -0400 Original-Received: from p3plsmtpa01-07.prod.phx3.secureserver.net ([72.167.82.87]:38787) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q7uZs-0007Gm-AW for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 15:09:12 -0400 Original-Received: (qmail 22831 invoked from network); 7 Apr 2011 19:09:08 -0000 Original-Received: from unknown (209.85.161.41) by p3plsmtpa01-07.prod.phx3.secureserver.net (72.167.82.87) with ESMTP; 07 Apr 2011 19:09:08 -0000 Original-Received: by fxm18 with SMTP id 18so2350297fxm.0 for ; Thu, 07 Apr 2011 12:09:06 -0700 (PDT) Original-Received: by 10.223.110.81 with SMTP id m17mr1283681fap.32.1302203346500; Thu, 07 Apr 2011 12:09:06 -0700 (PDT) Original-Received: by 10.223.96.143 with HTTP; Thu, 7 Apr 2011 12:09:06 -0700 (PDT) In-Reply-To: <4D9DC382.5070900@mousecar.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 72.167.82.87 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80680 Archived-At: M-x report-emacs-bug is probably the best way. The docstrings for match-string and replace-match should emphasize that ANY code that deals with strings--notably code that gives control to the user--is liable to replace the "last matched" string, so those functions should be called right away after you do the match. On 4/7/11, ken wrote: > > On 04/05/2011 11:39 PM ken wrote: >> .... >> the problem wasn't a search, but with the read-from-minibuffer function. >> For some reason, invoking that wipes out all the subexpressions. > > I don't recall reading about this. If it's not already in the official > documentation, how do we add it in? > > > -- -PJ