gpt4 book ai didi

common-lisp - 在 Slime 的检查器中,检查完一个元素后,如何返回到对象列表?

转载 作者:行者123 更新时间:2023-12-03 08:18:49 25 4
gpt4 key购买 nike

我正在使用 Slime (Emacs) 和 Common Lisp (SBCL)。计算表达式后,REPL 返回 CL 对象列表:

    (#<BOOKMARK-ENTRY {1009AFB963}> #<BOOKMARK-ENTRY {1009AFD5A3}>
#<BOOKMARK-ENTRY {1009AFDB53}> #<BOOKMARK-ENTRY {1009AFE0E3}>
#<BOOKMARK-ENTRY {1009AFE683}> #<BOOKMARK-ENTRY {1009AFEC23}>
#<BOOKMARK-ENTRY {1009AFF173}> #<BOOKMARK-ENTRY {1009AFF753}>
#<BOOKMARK-ENTRY {1009AFFCD3}> #<BOOKMARK-ENTRY {1009B00233}>
#<BOOKMARK-ENTRY {1009B00783}> #<BOOKMARK-ENTRY {1009B00CE3}>
#<BOOKMARK-ENTRY {1009B01253}> #<BOOKMARK-ENTRY {1009B01823}>
#<BOOKMARK-ENTRY {1009B01DD3}> #<BOOKMARK-ENTRY {1009B02393}>
#<BOOKMARK-ENTRY {1009B028B3}> #<BOOKMARK-ENTRY {1009B02E13}>
#<BOOKMARK-ENTRY {1009B03373}> #<BOOKMARK-ENTRY {1009B03903}>
#<BOOKMARK-ENTRY {1009B03EB3}> #<BOOKMARK-ENTRY {1009B04453}>
#<BOOKMARK-ENTRY {1009B049F3}> #<BOOKMARK-ENTRY {1009B04F23}>
#<BOOKMARK-ENTRY {1009B054A3}> #<BOOKMARK-ENTRY {1009B05AB3}>
#<BOOKMARK-ENTRY {1009B05FF3}> #<BOOKMARK-ENTRY {1009B06513}>
#<BOOKMARK-ENTRY {1009B06A83}> #<BOOKMARK-ENTRY {1009B07133}>
#<BOOKMARK-ENTRY {1009B076B3}> #<BOOKMARK-ENTRY {1009B07C13}>
#<BOOKMARK-ENTRY {1009B08213}>)

如果我单击检查列表,则会打开一个新窗口,其中列出了所有对象:

#<CONS {1009AFCBB7}>
--------------------
A proper list:
0: #<BOOKMARK-ENTRY {1009AFB963}>
1: #<BOOKMARK-ENTRY {1009AFD5A3}>
2: #<BOOKMARK-ENTRY {1009AFDB53}>
3: #<BOOKMARK-ENTRY {1009AFE0E3}>
4: #<BOOKMARK-ENTRY {1009AFE683}>
5: #<BOOKMARK-ENTRY {1009AFEC23}>
6: #<BOOKMARK-ENTRY {1009AFF173}>
7: #<BOOKMARK-ENTRY {1009AFF753}>
8: #<BOOKMARK-ENTRY {1009AFFCD3}>
9: #<BOOKMARK-ENTRY {1009B00233}>
10: #<BOOKMARK-ENTRY {1009B00783}>
11: #<BOOKMARK-ENTRY {1009B00CE3}>
12: #<BOOKMARK-ENTRY {1009B01253}>
13: #<BOOKMARK-ENTRY {1009B01823}>
14: #<BOOKMARK-ENTRY {1009B01DD3}>
15: #<BOOKMARK-ENTRY {1009B02393}>
16: #<BOOKMARK-ENTRY {1009B028B3}>
17: #<BOOKMARK-ENTRY {1009B02E13}>
18: #<BOOKMARK-ENTRY {1009B03373}>
19: #<BOOKMARK-ENTRY {1009B03903}>
20: #<BOOKMARK-ENTRY {1009B03EB3}>
21: #<BOOKMARK-ENTRY {1009B04453}>
22: #<BOOKMARK-ENTRY {1009B049F3}>
23: #<BOOKMARK-ENTRY {1009B04F23}>
24: #<BOOKMARK-ENTRY {1009B054A3}>
25: #<BOOKMARK-ENTRY {1009B05AB3}>
26: #<BOOKMARK-ENTRY {1009B05FF3}>
27: #<BOOKMARK-ENTRY {1009B06513}>
28: #<BOOKMARK-ENTRY {1009B06A83}>
29: #<BOOKMARK-ENTRY {1009B07133}>
30: #<BOOKMARK-ENTRY {1009B076B3}>
31: #<BOOKMARK-ENTRY {1009B07C13}>
32: #<BOOKMARK-ENTRY {1009B08213}>

如果我单击任何对象(书签条目),我将看到我想要的信息以及插槽值,例如:

#<BOOKMARK-ENTRY {1009B01253}>
--------------------
Class: #<STANDARD-CLASS NYXT:BOOKMARK-ENTRY>
--------------------
Group slots by inheritance [ ]
Sort slots alphabetically [X]

All Slots:
[ ] ANNOTATION = ""
[ ] DATE = @2021-07-21T19:13:02.981953-03:00
[ ] SEARCH-URL = ""
[ ] SHORTCUT = ""
[ ] TAGS = ("certo" "deu" "tudo" "white" "yankee")
[ ] TITLE = ""
[ ] URL = #<QURI.URI.HTTP:URI-HTTPS https://en.wikipedia.org/wiki/Yankee_White>

[set value] [make unbound]

好的。但是我如何保留此信息并返回到之前的信息呢?

我的意思是屏幕:

```lisp
#<CONS {1009AFCBB7}>
--------------------
A proper list:
0: #<BOOKMARK-ENTRY {1009AFB963}>
.
.
.
32: #<BOOKMARK-ENTRY {1009B08213}>

有这个命令吗?是什么名字?有键绑定(bind)可以做到这一点吗?

谢谢。

最佳答案

使用C-h m后,我成功找到了slime-inspector-pop命令,它在此缓冲区中绑定(bind)到l

为了说明这一点,让我们访问编号为 #26 的对象:

26: #<BOOKMARK-ENTRY {100B847933}>

我按下return,我得到:

#<BOOKMARK-ENTRY {100B847933}>
--------------------
Class: #<STANDARD-CLASS NYXT:BOOKMARK-ENTRY>
--------------------
Group slots by inheritance [ ]
Sort slots alphabetically [X]

All Slots:
[ ] ANNOTATION = ""
[ ] DATE = @2021-07-03T10:42:53.050403-03:00
[ ] SEARCH-URL = ""
[ ] SHORTCUT = ""
[ ] TAGS = ("CNN")
[ ] TITLE = ""
[ ] URL = #<QURI.URI.HTTP:URI-HTTPS https://www.cnnbrasil.com.br/>

[set value] [make unbound]

要返回,我只需执行l。因此,我回到了之前的窗口,但有细微的差别。现在,列表中的对象名称与 @13 略有不同:

26: @13=#<BOOKMARK-ENTRY {100B847933}>

如果我的解释没有错误,这表明该对象已被检查并且它是要访问的列表中的第 13 个对象。

关于common-lisp - 在 Slime 的检查器中,检查完一个元素后,如何返回到对象列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68489760/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com