help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

substring and search


From: Stephen Berman
Subject: substring and search
Date: 28 Jan 2002 14:16:48 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Evalling the following expression:

(substring "abcdefg" (progn (beginning-of-line) (search-forward "c")))

yields the error "Args out of range: "abcdefg", 16, 7" (assuming the
expression is on the first line of a buffer).  Why is this?  And what
does "7" in the error message refer to?  It appears no matter where
the above sexp is evalled, e.g.:

(substring "abcdefg" (progn (beginning-of-line) (search-forward "c")))
=> Args out of range: "abcdefg", 431, 7

(search-backward also yields a corresponding error message, as do the
re-search functions.)

Thanks,
--Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]