From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: error in replace-match: "args out of range" [SOLVED] Date: Sun, 24 Apr 2011 01:20:57 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <4D9BE07B.2060204@mousecar.com> <4D9DC382.5070900@mousecar.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1306267675 11555 80.91.229.12 (24 May 2011 20:07:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 May 2011 20:07:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 24 22:07:51 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOxtO-0005Y2-Bd for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 22:07:50 +0200 Original-Received: from localhost ([::1]:47412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOxtN-00006G-Pr for geh-help-gnu-emacs@m.gmane.org; Tue, 24 May 2011 16:07:49 -0400 Original-Path: usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader1.panix.com 1303608057 28946 166.84.1.2 (24 Apr 2011 01:20:57 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Sun, 24 Apr 2011 01:20:57 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: usenet.stanford.edu gnu.emacs.help:186712 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81050 Archived-At: In article , PJ Weisberg wrote: >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? Or maybe a "with-last-matched-string-preserved" or something like it? David