GNU bug report logs -
#47875
Elisp reader doesn't handle keywords
Previous Next
To reply to this bug, email your comments to 47875 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#47875
; Package
guile
.
(Sun, 18 Apr 2021 16:06:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Prikler <leo.prikler <at> student.tugraz.at>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 18 Apr 2021 16:06:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guilers,
Using Guile 3.0.5, the elisp reader does not seem to support keywords
written in Elisp's preferred prefix-style notation (:keyword).
scheme@(guile-user)> ,L elisp
Happy hacking with Emacs Lisp! To switch back, type `,L scheme'.
elisp@(guile-user)> :keyword
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Unbound variable: :keyword
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
elisp@(guile-user) [1]> ,q
elisp@(guile-user)> (funcall (@ (guile) symbol->keyword) 'keyword)
$1 = #:keyword
Meanwhile in Emacs M-: :keyword yields :keyword. Using Scheme-style
keywords also does not work:
elisp@(guile-user)> #:keyword
While compiling expression:
uninterned symbol cannot be saved to object file #<uninterned-symbol
keyword 7fb39fa4b5e0>
I think Guile should produce keyword objects for the former, so that we
don't need to talk about the latter.
Regards,
Leo
Information forwarded
to
bug-guile <at> gnu.org
:
bug#47875
; Package
guile
.
(Thu, 13 May 2021 22:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 47875 <at> debbugs.gnu.org (full text, mbox):
This seems to have been fixed in the wip-elisp branch.
Note that the branch is a couple years old. There's a version
of the branch by Ricardo Wurmus (rekado) that's been rebased on
a newer version of Guile, though still not on 3.0:
https://git.elephly.net/?p=software/guile.git;a=shortlog;h=refs/heads/wip-elisp
- Taylan
Information forwarded
to
bug-guile <at> gnu.org
:
bug#47875
; Package
guile
.
(Fri, 04 Jun 2021 12:14:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> Using Guile 3.0.5, the elisp reader does not seem to support keywords
> written in Elisp's preferred prefix-style notation (:keyword).
>
> Meanwhile in Emacs M-: :keyword yields :keyword. Using Scheme-style
> keywords also does not work:
>
> I think Guile should produce keyword objects for the former, so that we
> don't need to talk about the latter.
In Scheme keywords and symbols are separate entities, but in Elisp
keywords are just self-quoted symbols. I think your solution will cause
problems with Elisp algorithms that expect keywords to be symbolp.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#47875
; Package
guile
.
(Sat, 05 Jun 2021 21:15:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 47875 <at> debbugs.gnu.org (full text, mbox):
Am Samstag, den 05.06.2021, 18:51 +0300 schrieb Ivan Sokolov:
> In Scheme keywords and symbols are separate entities, but in Elisp
> keywords are just self-quoted symbols. I think your solution will
> cause problems with Elisp algorithms that expect keywords to be
> symbolp.
You could define Elisp symbolp as
(lambda (thing)
(or (funcall (@ (guile) symbol?) thing)
(funcall (@ (guile) keyword?) thing)))
but perhaps there's an even faster way to check this property.
The other way round – using Emacs keywords as Scheme symbols – will not
perform well if you think about Emacs code calling a Scheme function
that expects keywords.
Regards,
Leo
Information forwarded
to
bug-guile <at> gnu.org
:
bug#47875
; Package
guile
.
(Sun, 06 Jun 2021 18:22:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 47875 <at> debbugs.gnu.org (full text, mbox):
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> You could define Elisp symbolp as
> (lambda (thing)
> (or (funcall (@ (guile) symbol?) thing)
> (funcall (@ (guile) keyword?) thing)))
You are right, I haven't thought about changing the implementaion of
symbolp.
> but perhaps there's an even faster way to check this property.
Use guile-primitive instead of guile-ref? Both symbol? and keyword? are
primitives.
This bug report was last modified 3 years and 205 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.