From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: xraysmalevich@gmail.com Newsgroups: gmane.emacs.help Subject: Re: "push" creating circular objects Date: Thu, 21 Aug 2008 07:25:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <97aa1e64-e971-4f9a-9498-3564df1af73e@a1g2000hsb.googlegroups.com> References: <4990de62-178c-478a-9362-cedc660f9335@j22g2000hsf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219329811 9210 80.91.229.12 (21 Aug 2008 14:43:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 14:43:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 21 16:44:21 2008 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.50) id 1KWBNT-00033F-Me for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 16:43:07 +0200 Original-Received: from localhost ([127.0.0.1]:54817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWBMW-0001kq-Cc for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 10:42:08 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a1g2000hsb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 209.183.178.159 Original-X-Trace: posting.google.com 1219328714 12759 127.0.0.1 (21 Aug 2008 14:25:14 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 21 Aug 2008 14:25:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a1g2000hsb.googlegroups.com; posting-host=209.183.178.159; posting-account=GWRmcQoAAAByQPzrR7mhf5cbvIm17KAJ User-Agent: G2/1.0 X-HTTP-Via: 1.1 PROXY1 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161508 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:56854 Archived-At: On Aug 21, 10:12 am, Charles Sebold wrote: > On Aug 20, 4:50 pm, weber wrote: > > > > > Minor variation: > > > (defun test2 (str) > > (let (my-list) > > (with-temp-buffer > > (insert str) > > (goto-char (point-min)) > > (while (not (eobp)) > > (cond > > ((= (char-after) ?#) > > (push "ol" my-list)) > > ((= (char-after) ?*) > > (push "ul" my-list))) > > (forward-char 1))) > > my-list)) > > > no need to bind my-list to nil too :) > > Useful tip, thanks. > > Astoundingly I'm still having the same problem, when I run this in the > context of the larger program. Against the string "** " it returns > the circular list (#1="ul" #1#). In the scratch buffer it works (same > as with my function earlier). > > So, I must be rebinding something else in a bad way, but heck if I > know how. I'm going to try to trim the whole problem down to a bare > minimum test case and then if I can't figure it out I'll post the > whole thing and ask people to eval and see what they can come up > with. Thanks for your time. > > Charlie To check if you've rebound a function, try running emacs without the init file (emacs -q) and see if that changes this behavior.