GNU bug report logs - #62256
28.2; Invalid edebug spec gv-define-simple-setter

Previous Next

Package: emacs;

Reported by: Matúš Goljer <matus.goljer <at> gmail.com>

Date: Sat, 18 Mar 2023 13:26:02 UTC

Severity: normal

Found in version 28.2

Done: Eli Zaretskii <eliz <at> gnu.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 62256 in the body.
You can then email your comments to 62256 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 bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Sat, 18 Mar 2023 13:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matúš Goljer <matus.goljer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 Mar 2023 13:26:02 GMT) Full text and rfc822 format available.

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

From: Matúš Goljer <matus.goljer <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Sat, 18 Mar 2023 14:25:10 +0100
[Message part 1 (text/plain, inline)]
Insert

(gv-define-simple-setter aref aset)

in a buffer and try to edebug-eval it (C-u C-M-x).

It gives an error which I don't understand, because the second argument
`aset' should match symbolp...

I also tried this on the build from master and the error is the same.

Debugger entered--Lisp error: (invalid-read-syntax "Expected" (&or symbolp lambda-expr))
  signal(invalid-read-syntax ("Expected" (&or symbolp lambda-expr)))
  edebug-syntax-error("Expected" (&or symbolp lambda-expr))
  apply(edebug-syntax-error ("Expected" (&or symbolp lambda-expr)))
  edebug-no-match(((aset) (176 . 180) . 181) "Expected" (&or symbolp lambda-expr))
  edebug-match-list(((aset) (176 . 180) . 181) (&or symbolp lambda-expr))
  edebug-match-one-spec(((aset) (176 . 180) . 181) (&or symbolp lambda-expr))
  edebug-match-specs(((aset) (176 . 180) . 181) ((&or symbolp lambda-expr) &optional sexp) edebug-match-specs)
  edebug-match-specs(((aset) (176 . 180) . 181) (sexp (&or symbolp lambda-expr) &optional sexp) edebug-match-specs)
  edebug-match-sublist(((aset) (176 . 180) . 181) (sexp (&or symbolp lambda-expr) &optional sexp))
  #f(compiled-function (head cursor) #<bytecode 0x194f427789f7f1ec>)(gv-define-simple-setter ((aset) (176 . 180) . 181))
  edebug-list-form(((aset) (176 . 180) . 181))
  edebug-form((((gv-define-simple-setter aref aset)) (146 (147 . 170) (171 . 175) (176 . 180) . 181)))
  edebug-make-form-wrapper((((gv-define-simple-setter aref aset)) (146 (147 . 170) (171 . 175) (176 . 180) . 181)) 146 181 nil)
  edebug-read-and-maybe-wrap-form1()
  edebug-read-and-maybe-wrap-form()
  edebug--read(read #<buffer *scratch*>)
  apply(edebug--read read #<buffer *scratch*>)

-- 
Best regards,
  Matúš Goljer
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Sat, 18 Mar 2023 13:38:01 GMT) Full text and rfc822 format available.

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

From: Matúš Goljer <matus.goljer <at> gmail.com>
To: 62256 <at> debbugs.gnu.org
Subject: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Sat, 18 Mar 2023 14:36:53 +0100
[Message part 1 (text/plain, inline)]
Actually, I think the problem is using the spec

(&or symbolp lambda-expr)

instead of

[&or symbolp lambda-expr]

Because the list construct here always makes "a list with content".  So
this spec says "a list with one thing in it, either a symbol or a
lambda" which would match

(gv-define-simple-setter aref (aset))
-- 
Best regards,
  Matúš Goljer
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Thu, 23 Mar 2023 08:14:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matúš Goljer <matus.goljer <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 62256 <at> debbugs.gnu.org
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Thu, 23 Mar 2023 10:13:35 +0200
> From: Matúš Goljer <matus.goljer <at> gmail.com>
> Date: Sat, 18 Mar 2023 14:36:53 +0100
> 
> Actually, I think the problem is using the spec
> 
> (&or symbolp lambda-expr)
> 
> instead of
> 
> [&or symbolp lambda-expr]
> 
> Because the list construct here always makes "a list with content".  So
> this spec says "a list with one thing in it, either a symbol or a
> lambda" which would match
> 
> (gv-define-simple-setter aref (aset))

Stefan, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Thu, 23 Mar 2023 18:08:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Matúš Goljer <matus.goljer <at> gmail.com>,
 62256 <at> debbugs.gnu.org
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Thu, 23 Mar 2023 14:07:21 -0400
>> From: Matúš Goljer <matus.goljer <at> gmail.com>
>> Date: Sat, 18 Mar 2023 14:36:53 +0100
>> 
>> Actually, I think the problem is using the spec
>> 
>> (&or symbolp lambda-expr)
>> 
>> instead of
>> 
>> [&or symbolp lambda-expr]
>> 
>> Because the list construct here always makes "a list with content".  So
>> this spec says "a list with one thing in it, either a symbol or a
>> lambda" which would match
>> 
>> (gv-define-simple-setter aref (aset))
>
> Stefan, any comments?

He's right!


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Thu, 23 Mar 2023 18:12:02 GMT) Full text and rfc822 format available.

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

From: Matus Goljer <matus.goljer <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 62256 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Thu, 23 Mar 2023 19:11:01 +0100
[Message part 1 (text/plain, inline)]
Do you want me to prepare a patch?  I think there's more incorrect specs in
the gv package now.

m.

On Thu, 23 Mar 2023 at 19:07, Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:

> >> From: Matúš Goljer <matus.goljer <at> gmail.com>
> >> Date: Sat, 18 Mar 2023 14:36:53 +0100
> >>
> >> Actually, I think the problem is using the spec
> >>
> >> (&or symbolp lambda-expr)
> >>
> >> instead of
> >>
> >> [&or symbolp lambda-expr]
> >>
> >> Because the list construct here always makes "a list with content".  So
> >> this spec says "a list with one thing in it, either a symbol or a
> >> lambda" which would match
> >>
> >> (gv-define-simple-setter aref (aset))
> >
> > Stefan, any comments?
>
> He's right!
>
>
>         Stefan
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Fri, 24 Mar 2023 18:41:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matus Goljer <matus.goljer <at> gmail.com>
Cc: 62256 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Fri, 24 Mar 2023 21:40:02 +0300
> From: Matus Goljer <matus.goljer <at> gmail.com>
> Date: Thu, 23 Mar 2023 19:11:01 +0100
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 62256 <at> debbugs.gnu.org
> 
> Do you want me to prepare a patch?  I think there's more incorrect specs in the gv package now.

Feel free to submit patches for additional specs as well.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Sun, 26 Mar 2023 11:29:02 GMT) Full text and rfc822 format available.

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

From: Matúš Goljer <matus.goljer <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 62256 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Sun, 26 Mar 2023 13:28:06 +0200
[Message part 1 (text/plain, inline)]
> Feel free to submit patches for additional specs as well.
>
> Thanks.

I was thinking about the form in `(get 'compiler-macro
'edebug-declaration-spec)` but actually that one is correct.  It's a bit
confusing that top level is always wrapped in () even though that list
wrapper is ignored.

So in the end there's only this one fix.

[0001-Fix-edebug-spec-for-gv-define-simple-setter.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Best regards,
  Matúš Goljer
[signature.asc (application/pgp-signature, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 26 Mar 2023 11:41:02 GMT) Full text and rfc822 format available.

Notification sent to Matúš Goljer <matus.goljer <at> gmail.com>:
bug acknowledged by developer. (Sun, 26 Mar 2023 11:41:02 GMT) Full text and rfc822 format available.

Message #28 received at 62256-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matúš Goljer <matus.goljer <at> gmail.com>
Cc: 62256-done <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Sun, 26 Mar 2023 14:40:04 +0300
> From: Matúš Goljer <matus.goljer <at> gmail.com>
> Cc: monnier <at> iro.umontreal.ca, 62256 <at> debbugs.gnu.org
> Date: Sun, 26 Mar 2023 13:28:06 +0200
> 
> I was thinking about the form in `(get 'compiler-macro
> 'edebug-declaration-spec)` but actually that one is correct.  It's a bit
> confusing that top level is always wrapped in () even though that list
> wrapper is ignored.
> 
> So in the end there's only this one fix.

Thanks, installed on the emacs-29 branch, and closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#62256; Package emacs. (Sun, 26 Mar 2023 13:15:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Matúš Goljer <matus.goljer <at> gmail.com>
Cc: 62256 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#62256: 28.2; Invalid edebug spec gv-define-simple-setter
Date: Sun, 26 Mar 2023 09:14:37 -0400
> It's a bit confusing that top level is always wrapped in () even
> though that list wrapper is ignored.

Very much agreed, tho it's usually not completely wrong, since it
describes a *list* of arguments.


        Stefan





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 24 Apr 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 3 days ago.

Previous Next


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