[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error in replace-match: "args out of range" [SOLVED]
From: |
ken |
Subject: |
Re: error in replace-match: "args out of range" [SOLVED] |
Date: |
Tue, 05 Apr 2011 23:39:39 -0400 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20101213) |
On 04/04/2011 09:56 PM Stefan Monnier wrote:
>> Here's the relevant code fragment:
>
>> (if (re-search-forward aname-re-str head-text-end-pt t)
>> (progn
>> (setq aname-str (match-string 2))
>> (setq head-text-nested (match-string 4))
>> (if (equal head-text-nested "")
>> (progn
>> (setq head-text-nested (create-heading-text))
>> (if (equal aname-str "")
>> (progn
>> (setq aname-str (create-aname head-text-nested))
>> (replace-match head-text-nested t nil nil 4)
>> (replace-match aname-str t nil nil 2))
>> (replace-match head-text-nested t t nil 4))) ;ERROR:
>
> An obvious part to heck is create-heading-text: if it might ever call
> a regexp-matching function, then you have a problem.
>
>
> Stefan
Stefan,
You pointed to the right function... well, it was actually both. But
the problem wasn't a search, but with the read-from-minibuffer function.
For some reason, invoking that wipes out all the subexpressions.
- Re: error in replace-match: "args out of range", (continued)
- Message not available
- Re: error in replace-match: "args out of range", Tim X, 2011/04/04
- Re: error in replace-match: "args out of range", ken, 2011/04/07
- Message not available
- Re: error in replace-match: "args out of range", Tim X, 2011/04/07
- Re: error in replace-match: "args out of range", ken, 2011/04/09
- Re: error in replace-match: "args out of range", PJ Weisberg, 2011/04/09
- Re: error in replace-match: "args out of range", ken, 2011/04/09
- Message not available
- Re: error in replace-match: "args out of range", David Kastrup, 2011/04/09
- Re: error in replace-match: "args out of range", PJ Weisberg, 2011/04/09
- Re: error in replace-match: "args out of range", Perry Smith, 2011/04/09
- Message not available
- Re: error in replace-match: "args out of range", Stefan Monnier, 2011/04/04
- Re: error in replace-match: "args out of range" [SOLVED],
ken <=
- Re: error in replace-match: "args out of range" [SOLVED], ken, 2011/04/07
- Re: error in replace-match: "args out of range" [SOLVED], PJ Weisberg, 2011/04/07
- Message not available
- Re: error in replace-match: "args out of range" [SOLVED], Stefan Monnier, 2011/04/09