From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: forward-sexp for strings Date: Thu, 10 Nov 2005 21:01:05 +0100 Organization: Informatimago Message-ID: <87k6fg1ddq.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131653230 18468 80.91.229.2 (10 Nov 2005 20:07:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2005 20:07:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 10 21:07:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EaIfe-0000f2-Ke for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Nov 2005 21:05:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EaIfd-0000qL-5M for geh-help-gnu-emacs@m.gmane.org; Thu, 10 Nov 2005 15:05:17 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!proxad.net!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-No-Archive: no User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:1IgBjcIF2JNQUxE7td3ZlW2TRMc= Original-Lines: 29 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=oN@n[=:mdV\^BaLF=E 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:30969 Archived-At: Roland Winkler writes: > The function forward-sexp requires a buffer. Is there something > similar for parsing strings? Of course, I can always use > with-temp-buffer. (require 'cl) (loop with s = "(sexp 1) (sexp 2) \"sexp 3\" sexp-4" with e = 0 for oe = (read-from-string s e) do (print (car oe)) while (< (setf e (cdr oe)) (length s))) (sexp 1) (sexp 2) "sexp 3" sexp-4 nil -- __Pascal Bourguignon__ http://www.informatimago.com/ Until real software engineering is developed, the next best practice is to develop with a dynamic system that has extreme late binding in all aspects. The first system to really do this in an important way is Lisp. -- Alan Kay