From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Charles Sebold Newsgroups: gmane.emacs.help Subject: Re: "push" creating circular objects Date: Thu, 21 Aug 2008 07:12:54 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4990de62-178c-478a-9362-cedc660f9335@j22g2000hsf.googlegroups.com> References: 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 1219329745 8943 80.91.229.12 (21 Aug 2008 14:42:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 14:42:25 +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:43:18 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 1KWBMj-0002m0-7l for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 16:42:21 +0200 Original-Received: from localhost ([127.0.0.1]:54399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWBLl-0001Mm-WF for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 10:41:22 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!j22g2000hsf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: 216.88.183.229 Original-X-Trace: posting.google.com 1219327974 6708 127.0.0.1 (21 Aug 2008 14:12:54 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 21 Aug 2008 14:12:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j22g2000hsf.googlegroups.com; posting-host=216.88.183.229; posting-account=SkbESxAAAABWz7Ca6uzb-Zpc74tzSLd_ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161505 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:56853 Archived-At: 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