all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: edebug specs for cl-loop
Date: Wed, 08 Aug 2012 10:39:00 +0200	[thread overview]
Message-ID: <87pq7193rv.fsf@gmail.com> (raw)
In-Reply-To: <jwvobmmloxt.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 07 Aug 2012 11:11:18 -0400")

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> loop understand this but not edebug: (Note where the for rand2 line is now)
>
>>         for alphaindex = (random* (length alph))
>>         collect rand1 into ls
>>         for rand2 = (aref alph alphaindex)
>>         collect rand2 into ls
>
> By "edebug" which edebug-spec do you mean: the simple default (&rest &or
> symbolp form) or the complex one?  AFAICT, the simple default should
> handle the above just fine, right?
I don't understand what you call simple default and complex one.

Assume the edebug specs in cl-macs (the ones commented) are loaded,
otherwise all this is irrelevant because edebug doesn't work at all in
loop.

I mean that on the above form, if I do C-M-x on it the function is
evaluated with no errors, and if I do C-u C-M-x I have an error:

--8<---------------cut here---------------start------------->8---
edebug-syntax-error: Invalid read syntax: "Failed matching", ([&optional ["named" symbolp]] [&rest &or ["repeat" form] loop-for-as loop-with loop-initial-final] [&rest loop-clause])
--8<---------------cut here---------------end--------------->8---

>> loop understand this but not edebug: (note where the while line is now)
>
>>           with len = (length (window-list))
>>           for count from 1
>>           while (< count len)
>>           for w1 = (iter-next wlist)
>>           for b1 = (window-buffer w1)
>>           for s1 = (window-start w1)
>>           for w2 = (iter-next wlist)
>>           for b2 = (window-buffer w2)
>>           for s2 = (window-start w2)
>           
>> Both give same result.
>
> Here as well, the simple default spec should handle this just fine.
Here both C-M-x and C-u C-M-x works.


-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 



  reply	other threads:[~2012-08-08  8:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04  9:58 edebug specs for cl-loop Thierry Volpiatto
2012-08-06 21:57 ` Stefan Monnier
2012-08-07  5:08   ` Thierry Volpiatto
2012-08-07  6:55     ` Thierry Volpiatto
2012-08-07  7:17       ` Thierry Volpiatto
2012-08-07 15:12         ` Stefan Monnier
2012-08-08  8:40           ` Thierry Volpiatto
2012-08-07 15:11       ` Stefan Monnier
2012-08-08  8:39         ` Thierry Volpiatto [this message]
2012-08-08 13:42           ` Stefan Monnier
2012-08-08 16:12             ` Thierry Volpiatto
2012-08-08 18:10               ` Stefan Monnier
2012-08-10  9:22                 ` Thierry Volpiatto
2012-08-10 16:20                   ` Stefan Monnier
2012-08-08 12:00       ` Lars Brinkhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq7193rv.fsf@gmail.com \
    --to=thierry.volpiatto@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.