unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24738: 26.0.50; Incorrect Edebug spec for seq-let
@ 2016-10-19 15:44 Gemini Lasswell
  2016-10-19 17:30 ` bug#24738: corrections to steps to repro Gemini Lasswell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gemini Lasswell @ 2016-10-19 15:44 UTC (permalink / raw)
  To: 24738

The Edebug spec for seq-let is incorrect, causing code that uses it to
not work correctly while instrumented for debugging.

To reproduce:

1. emacs -Q
2. enter the following code into *scratch*:

(defun seq-let-bug ()
  (let ((nums [1 2 3 4 5]))
    (seq-let (a b c) nums
      (message "a=%s b=%s c=%s" a b c))))

3. C-u C-M-x
4. M-: (seq-let-bug) RET

Result: a=nil b=nil c=nil
Expected result: a=1 b=2 c=3

Changing seq-let's edebug spec to (debug (sexp form body))
fixes this for me.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#24738: corrections to steps to repro
  2016-10-19 15:44 bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Gemini Lasswell
@ 2016-10-19 17:30 ` Gemini Lasswell
  2016-10-20  8:03 ` bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Nicolas Petton
  2016-10-24 11:16 ` Nicolas Petton
  2 siblings, 0 replies; 6+ messages in thread
From: Gemini Lasswell @ 2016-10-19 17:30 UTC (permalink / raw)
  To: 24738

I left out a couple of steps, so please use this sequence to reproduce
the bug:

1. emacs -Q
2. M-: (require 'seq) RET
3. enter the following code into *scratch*:

(defun seq-let-bug ()
  (let ((nums [1 2 3 4 5]))
    (seq-let (a b c) nums
      (message "a=%s b=%s c=%s" a b c))))

4. C-u C-M-x 
5. M-: (seq-let-bug) RET
6. G

After step 5 the debugger prompt will appear, so the G is to make it
continue execution without stopping.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#24738: 26.0.50; Incorrect Edebug spec for seq-let
  2016-10-19 15:44 bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Gemini Lasswell
  2016-10-19 17:30 ` bug#24738: corrections to steps to repro Gemini Lasswell
@ 2016-10-20  8:03 ` Nicolas Petton
  2016-10-20 14:29   ` Gemini Lasswell
  2016-10-24 11:16 ` Nicolas Petton
  2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Petton @ 2016-10-20  8:03 UTC (permalink / raw)
  To: Gemini Lasswell, 24738

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

Gemini Lasswell <gazally@runbox.com> writes:

Hi Gemini,

> The Edebug spec for seq-let is incorrect, causing code that uses it to
> not work correctly while instrumented for debugging.
>
> To reproduce:
>
> 1. emacs -Q
> 2. enter the following code into *scratch*:
>
> (defun seq-let-bug ()
>   (let ((nums [1 2 3 4 5]))
>     (seq-let (a b c) nums
>       (message "a=%s b=%s c=%s" a b c))))
>
> 3. C-u C-M-x
> 4. M-: (seq-let-bug) RET
>
> Result: a=nil b=nil c=nil
> Expected result: a=1 b=2 c=3

Indeed, thanks for reporting!

>
> Changing seq-let's edebug spec to (debug (sexp form body))
> fixes this for me.

Why sexp instead of form for the first argument?

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#24738: 26.0.50; Incorrect Edebug spec for seq-let
  2016-10-20  8:03 ` bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Nicolas Petton
@ 2016-10-20 14:29   ` Gemini Lasswell
  2016-10-20 15:31     ` Nicolas Petton
  0 siblings, 1 reply; 6+ messages in thread
From: Gemini Lasswell @ 2016-10-20 14:29 UTC (permalink / raw)
  To: Nicolas Petton, 24738

Nicolas Petton <nicolas@petton.fr> writes:

>> Changing seq-let's edebug spec to (debug (sexp form body))
>> fixes this for me.
>
> Why sexp instead of form for the first argument?

Because it doesn't get evaluated and shouldn't be instrumented.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#24738: 26.0.50; Incorrect Edebug spec for seq-let
  2016-10-20 14:29   ` Gemini Lasswell
@ 2016-10-20 15:31     ` Nicolas Petton
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Petton @ 2016-10-20 15:31 UTC (permalink / raw)
  To: Gemini Lasswell, 24738

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Gemini Lasswell <gazally@runbox.com> writes:

>> Why sexp instead of form for the first argument?
>
> Because it doesn't get evaluated and shouldn't be instrumented.

Hmm, indeed :)

I'll apply your changes, thanks!

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#24738: 26.0.50; Incorrect Edebug spec for seq-let
  2016-10-19 15:44 bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Gemini Lasswell
  2016-10-19 17:30 ` bug#24738: corrections to steps to repro Gemini Lasswell
  2016-10-20  8:03 ` bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Nicolas Petton
@ 2016-10-24 11:16 ` Nicolas Petton
  2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Petton @ 2016-10-24 11:16 UTC (permalink / raw)
  To: Gemini Lasswell, 24738; +Cc: 24738-done

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

Gemini Lasswell <gazally@runbox.com> writes:

> The Edebug spec for seq-let is incorrect, causing code that uses it to
> not work correctly while instrumented for debugging.

I pushed the fix in master, thanks!

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-24 11:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 15:44 bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Gemini Lasswell
2016-10-19 17:30 ` bug#24738: corrections to steps to repro Gemini Lasswell
2016-10-20  8:03 ` bug#24738: 26.0.50; Incorrect Edebug spec for seq-let Nicolas Petton
2016-10-20 14:29   ` Gemini Lasswell
2016-10-20 15:31     ` Nicolas Petton
2016-10-24 11:16 ` Nicolas Petton

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).