From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: sxml-match example from manual fails Date: Tue, 12 Jun 2012 17:53:06 +0200 Message-ID: <8762awr0gt.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1339516416 31713 80.91.229.3 (12 Jun 2012 15:53:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2012 15:53:36 +0000 (UTC) Cc: guile-user@gnu.org To: Aidan Gauland Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 12 17:53:34 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SeTPJ-0001Fn-7G for guile-user@m.gmane.org; Tue, 12 Jun 2012 17:53:25 +0200 Original-Received: from localhost ([::1]:58365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeTPJ-0000Nh-6P for guile-user@m.gmane.org; Tue, 12 Jun 2012 11:53:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeTPB-0000Md-UR for guile-user@gnu.org; Tue, 12 Jun 2012 11:53:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeTP3-0005rE-QE for guile-user@gnu.org; Tue, 12 Jun 2012 11:53:17 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:42692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeTP3-0005qi-KN for guile-user@gnu.org; Tue, 12 Jun 2012 11:53:09 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 1FF8824AD; Tue, 12 Jun 2012 17:53:07 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lj-+nKYXAoP9; Tue, 12 Jun 2012 17:53:07 +0200 (CEST) Original-Received: from pluto (unknown [193.50.110.130]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id DAB202261; Tue, 12 Jun 2012 17:53:06 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Prairial an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Aidan Gauland's message of "Sun, 10 Jun 2012 14:19:37 +1200") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.123.111 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9498 Archived-At: Hi, Aidan Gauland skribis: > But guile doesn't seem to like it: > $ guile > GNU Guile 2.0.5-deb+1-3 > [...] > scheme@(guile-user)> (sxml-match '(e (@ (i 1)) 3 4 5) [(e (@ (i ,d)) ,a > ,b ,c) (list d a b c)] [,otherwise #f]) > While compiling expression: > ERROR: Syntax error: > unknown file:1:0: source expression failed to match any pattern in form > (@ (i (unquote d))) You need to import the module first: scheme@(guile-user)> (use-modules(sxml match)) scheme@(guile-user)> (sxml-match '(e (@ (i 1)) 3 4 5) [(e (@ (i ,d)) ,a ,b ,c) (list d a b c)] [,otherwise #f]) $2 =3D (1 3 4 5) Thanks, Ludo=E2=80=99.