From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: Return to Marker Date: Thu, 30 Jan 2003 21:44:37 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043960707 15304 80.91.224.249 (30 Jan 2003 21:05:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2003 21:05:07 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18eLrq-0003yI-00 for ; Thu, 30 Jan 2003 22:05:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eLsJ-0007dX-0A for gnu-help-gnu-emacs@m.gmane.org; Thu, 30 Jan 2003 16:05:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6128 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6128 "CarlC" writes: > "Jesper Harder" wrote... >> >> Don't use `beginning-of-buffer' in Lisp code, it'll cause the type of >> problem you describe. Use (goto-char (point-min)) instead. > > Thanks, Jesper. Problem solved. Seems like this is something that > should be "fixed". It isn't really a bug. It's just that some functions are designed as user-level interactive commands -- they do more than you want when you use them in a program. You're not the first to hit this problem :-) and the docstring for `beginning-of-buffer' does warn about it : | Don't use this command in Lisp programs! | (goto-char (point-min)) is faster and avoids clobbering the mark.