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: "push" creating circular objects Date: Wed, 20 Aug 2008 08:25:09 -0500 Organization: Ministry of Silly Walks Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219324591 21300 80.91.229.12 (21 Aug 2008 13:16:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 13:16: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 15:17:24 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 1KWA2E-0001By-La for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 15:17:06 +0200 Original-Received: from localhost ([127.0.0.1]:59617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWA1H-0005x8-4y for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2008 09:16:07 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe03.iad.POSTED!7564ea0f!not-for-mail Mail-Copies-To: nobody Original-Newsgroups: gnu.emacs.help X-Using-Mail-Mode: sendmail Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAxQTFRF Py4qdFVKtYRz3aSQR+07SwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9gIEhcaB8/5OroA AAHxSURBVCjPLdExa9tAFMDxp1Jl6OZBGrJ36ac4g+2hSxXwCexAOzmQM9QfIIs9NLMNOYPVoUsl 0BNIUwafQPoKGdolHbo0BstgLy3FEuj15HS7H/93B3cHxExMieiLzwBwbotcI2xA8zM8aDwupxoP /BnP5fyE4vuMgWQ8yiuiv08LBtlUxDpQXX5iQLNh0oDWtw7Uczc64ejNgKaWaNZYvp+DeHjp5lRL V31YAGeWMT743J+8/QZbo9UXGIwz790vmBn99pAU5lHPh99mu+PWkifl7VfonvW4e/T7Vi2vwXnF ZdcN73uT4A66risuN/iHo9+HzcBbiQ2uuWy1oL0KwjebLaK3R/Dt69XHQ5FgRAjMdDnuirj4XBcA 9uoqXZdRFe0bIFKGiJNSj9l6Ot1yj3aoS/yDMqpyKlWDn1V5up4u58ljUTcoY7izswCj/6Xy8EKc UChIvfBF2DxWjQrU0jH4ZVN2ClA6FrfzpuwBfcsLcKxLpCAYDVwshkRVtodi8Zp7+VKPHUqI/YFA IfWmKoVCuiIONTLSR0vLS+gpqahScOzzC0H+5JDra0tmOqKU+vf2Cu6Z0Rni4ian/alw4S9uqMGI Ga43utBjSr8bszCU3UiHUMP0Qt6O0hRl842DFTejSgUDWDvmcNTpqjhc8n9hvWnVsoKmHAAAAABJ RU5ErkJggg== User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:m3g4DrDYaj32gxkdwQWwtfBOVpY= Original-Lines: 35 Original-NNTP-Posting-Host: cbggobbepdfeflbildaedobifmeaokba Original-X-Complaints-To: abuse@charter.net Original-X-Trace: ejcgghfdebcllckhelpgibjinfhnghafajhfpacdlaknofmicbggobbepdfeflbieheiiabmokgnechcfnpfaelafhbbadcggkapedcfebcmkhijcndkgdhecbkonobpfdlbpmaelemcakjp Original-NNTP-Posting-Date: Wed, 20 Aug 2008 13:25:09 UTC Original-Xref: news.stanford.edu gnu.emacs.help:161477 X-Mailman-Approved-At: Thu, 21 Aug 2008 09:14:04 -0400 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:56841 Archived-At: This is killing me. I'm running GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600), the one that's distributed from the FSF website. I've also verified this with 21.3, 21.4, and 22.1 from Debian sarge, etch, and lenny. I've done this with "-q -no-site-file". Here's the code in question: (defun Textile-list-context (textile-list-tag) "Return list of HTML tags corresponding to list context (ol, ul)." (let ((my-list nil)) (dolist (this-tag (delete "" (split-string textile-list-tag ""))) (cond ((string= this-tag "#") (push "ol" my-list)) ((string= this-tag "*") (push "ul" my-list)))) my-list)) What gets passed in is a string, like "** ", and the function ought to iterate through each character, cons an "ol" onto my-list for "#" characters or a "ul" for "*" characters, ignore everything else, and return my-list when it's done. In the scratch buffer, it works. In my program, it creates a circular list, represented as (#1="ul" #1#) as I edebug this. Why is it doing that? Bypassing the push macro and using something like (setq my-list (cons "ol" my-list)) doesn't help. And I can't figure out why I can't get it to do this from the scratch buffer with what appears to be the same string. The Edebug output looks identical, until the second push of "ul" onto the list, at which point it becomes circular. -- Charles Sebold 20th of August, 2008