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

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

Re: (goto-char ...) error


From: Tim X
Subject: Re: (goto-char ...) error
Date: Wed, 23 Feb 2011 09:15:59 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

ken <address@hidden> writes:

> Performing one search, I save the result with
>
> (setq ptname (re-search-forward ...))
>
> Then I want to back up one character and perform another search, so I do
>
> (goto-char (- ptname 1))
>
> But this pukes an error.  What's unkosher here?
>

Could be almost anything - without the error message it is all just
guesswork. Some things to consider 

1. What is the value of ptname if the re-search-forward fails?
2. What is the result of goto-char if ptname is nil or equal to
(point-min)?

Tim


-- 
tcross (at) rapttech dot com dot au


reply via email to

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