GNU bug report logs - #6596
23.2; cl.texi docs loop destructuring for alist

Previous Next

Package: emacs;

Reported by: Kevin Ryde <user42 <at> zip.com.au>

Date: Fri, 9 Jul 2010 23:45:02 UTC

Severity: minor

Tags: fixed

Found in version 23.2

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6596 in the body.
You can then email your comments to 6596 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Fri, 09 Jul 2010 23:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kevin Ryde <user42 <at> zip.com.au>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 09 Jul 2010 23:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Ryde <user42 <at> zip.com.au>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; cl.texi docs loop destructuring for alist
Date: Sat, 10 Jul 2010 09:44:21 +1000
[Message part 1 (text/plain, inline)]
I didn't immediately realize the cl `loop' macro destructuring could be
used to crunch an alist.  Perhaps an example in the manual per below.
If you're not a cl programmer you need lots of examples to understand
that huge `loop' thing :-).

2010-07-10  Kevin Ryde  <user42 <at> zip.com.au>

	* cl.texi (For Clauses): Add destructuring example processing an
	alist.

[cl.texi.loop-alist.diff (text/x-diff, inline)]
--- cl.texi.orig	2010-07-10 09:37:14.000000000 +1000
+++ cl.texi	2010-07-10 09:38:54.000000000 +1000
@@ -2599,7 +2599,14 @@
 than values the trailing variables get the value @code{nil}.
 If @code{nil} is used as a variable name, the corresponding
 values are ignored.  Destructuring may be nested, and dotted
-lists of variables like @code{(x . y)} are allowed.
+lists of variables like @code{(x . y)} are allowed, so for example
+to process an alist
+
+@example
+(loop for (key . value) in '((a . 1) (b . 2))
+      collect value)
+     @result{} (1 2)
+@end example
 
 @node Iteration Clauses, Accumulation Clauses, For Clauses, Loop Facility
 @subsection Iteration Clauses
[Message part 3 (text/plain, inline)]

In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-05-16 on raven, modified by Debian
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU
  value of $XMODIFIERS: nil
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Sun, 11 Jul 2010 02:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Sat, 10 Jul 2010 22:13:36 -0400
Looks good, please install.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Tue, 13 Jul 2010 01:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Kevin Ryde <user42 <at> zip.com.au>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Tue, 13 Jul 2010 11:50:27 +1000
Glenn Morris <rgm <at> gnu.org> writes:
>
> Looks good, please install.

Alas bazaar has put me offline or yes I would.  I might remove my
savannah perms as this probably won't improve soon.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Tue, 13 Jul 2010 15:50:03 GMT) Full text and rfc822 format available.

Message #14 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Tue, 13 Jul 2010 11:49:32 -0400
Kevin Ryde wrote:

> Alas bazaar has put me offline or yes I would.  I might remove my
> savannah perms as this probably won't improve soon.

Is it a technical problem? The Bazaar mailing list seems helpful.

Do you not know what to do? I can tell you in about 6 lines.

Something else?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Fri, 16 Jul 2010 01:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Kevin Ryde <user42 <at> zip.com.au>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Fri, 16 Jul 2010 11:19:45 +1000
Glenn Morris <rgm <at> gnu.org> writes:
>
> Is it a technical problem?

Last I understood from the transition discussions was it's about 300Mb
of download, which is a bit more than I can conveniently bring through a
straw, and I gather if it's done by bzr itself then the download can't
be interrupted and resumed later either :-(.  So I've been trying
launchpad.net for read only.  Better ideas welcome, or a pointer to
something on the wiki that might help everyone on slow links ...




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Fri, 16 Jul 2010 16:13:01 GMT) Full text and rfc822 format available.

Message #20 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Fri, 16 Jul 2010 12:12:26 -0400
Kevin Ryde wrote:

> Last I understood from the transition discussions was it's about 300Mb
> of download, which is a bit more than I can conveniently bring through a
> straw, and I gather if it's done by bzr itself then the download can't
> be interrupted and resumed later either :-(.

The entire repo is 339MB. I don't think that is massively bigger than
a CVS checkout used to be. The largest single file in there is 190MB,
for some reason. You can fetch the repo by rsync (which can be
interrupted and resumed), as suggested on

http://savannah.gnu.org/bzr/?group=emacs

with somethine like:

rsync -avP username <at> bzr.savannah.gnu.org:/srv/bzr/emacs ./

That page also says that to convert the result of rsync into what you
would have gotten from bzr, you should use eg

cd trunk && bzr checkout

I know that rsync works, but I never tried the last part.

I hope you can make it work somehow, since committers are in short
supply.

Do try the Bazaar mailing list if you need help or suggestions.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Wed, 21 Jul 2010 15:22:02 GMT) Full text and rfc822 format available.

Message #23 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6596 <at> debbugs.gnu.org, Kevin Ryde <user42 <at> zip.com.au>
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Wed, 21 Jul 2010 17:21:13 +0200
> http://savannah.gnu.org/bzr/?group=emacs
> with somethine like:
> rsync -avP username <at> bzr.savannah.gnu.org:/srv/bzr/emacs ./

You'll probably want to add --exclude=obsolete_packs to avoid
downloading potentially large amounts of unnecessary files.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Fri, 23 Jul 2010 00:52:01 GMT) Full text and rfc822 format available.

Message #26 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Kevin Ryde <user42 <at> zip.com.au>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Fri, 23 Jul 2010 10:51:36 +1000
Glenn Morris <rgm <at> gnu.org> writes:
>
> The entire repo is 339MB.

Yes, I thought so, that's too much really, especially if the updates are
as bad as rumour has it.

> I don't think that is massively bigger than a CVS checkout used to be.

If the size on disk is a good guide it was between 30 and 50 mb
compressed, and of course you could get just the part you wanted to work
on, or a few files at a time.  :-(

> I hope you can make it work somehow, since committers are in short
> supply.

Alas, doomed for the time being I think.  I've removed my savannah
member thing for now to avoid confusion.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Fri, 23 Jul 2010 03:49:02 GMT) Full text and rfc822 format available.

Message #29 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: Glenn Morris <rgm <at> gnu.org>, 6596 <at> debbugs.gnu.org
Subject: Re: bug#6596: 23.2; cl.texi docs loop destructuring for alist
Date: Thu, 22 Jul 2010 20:47:56 -0700 (PDT)
Kevin Ryde <user42 <at> zip.com.au> writes:

  > Glenn Morris <rgm <at> gnu.org> writes:
  > >
  > > The entire repo is 339MB.
  > 
  > Yes, I thought so, that's too much really, especially if the updates are
  > as bad as rumour has it.
  > 
  > > I don't think that is massively bigger than a CVS checkout used to be.
  > 
  > If the size on disk is a good guide it was between 30 and 50 mb
  > compressed, and of course you could get just the part you wanted to work
  > on, or a few files at a time.  :-(
  > 
  > > I hope you can make it work somehow, since committers are in short
  > > supply.
  > 
  > Alas, doomed for the time being I think.  I've removed my savannah
  > member thing for now to avoid confusion.

You could get an account on the GCC farm:

http://gcc.gnu.org/wiki/CompileFarm#How_to_Get_Involved.3F

quite a few machines are provided, with decent disk space and
connectivity...




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Jul 2011 00:16:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 6596 <at> debbugs.gnu.org and Kevin Ryde <user42 <at> zip.com.au> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 14 Jul 2011 00:16:03 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6596; Package emacs. (Thu, 14 Jul 2011 00:19:01 GMT) Full text and rfc822 format available.

Message #36 received at 6596 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Kevin Ryde <user42 <at> zip.com.au>
Cc: 6596 <at> debbugs.gnu.org
Subject: Re: 23.2; cl.texi docs loop destructuring for alist
Date: Thu, 14 Jul 2011 02:15:07 +0200
Kevin Ryde <user42 <at> zip.com.au> writes:

> 2010-07-10  Kevin Ryde  <user42 <at> zip.com.au>
>
> 	* cl.texi (For Clauses): Add destructuring example processing an
> 	alist.

I've applied your patch to Emacs 24.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 Aug 2011 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.