From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: (goto-char ...) error Date: Wed, 23 Feb 2011 09:15:59 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <87r5azpvfk.fsf@rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298414462 20790 80.91.229.12 (22 Feb 2011 22:41:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 22:41:02 +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 Feb 22 23:40:58 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 1Ps0ug-0002Nw-7c for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 23:40:58 +0100 Original-Received: from localhost ([127.0.0.1]:58014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ps0uf-00065D-ER for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Feb 2011 17:40:57 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.glorb.com!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:bWSbN0a4MgWJAoc0iEK6f2pK/5M= Original-Lines: 25 Original-NNTP-Posting-Host: 917e6e7f.news.astraweb.com Original-X-Trace: DXC=0J\3_8hDKI5V^?kW3CAkl5c@Xgk>L3D:>22T]]:[TcjQ; l5T\8 Original-Xref: usenet.stanford.edu gnu.emacs.help:185204 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:79362 Archived-At: ken 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