Closed aartaka closed 1 year ago
Forget it, actually. We're in REPL, we can invoke a succinct describe*
, find what we need to find, and describe this part as a separate call to describe*
. Something like:
(describe* 'nyxt:buffer)
;; Symbol BUFFER (EXTERNAL to NYXT) [fbound] [class]
;; SELF = NYXT:BUFFER
;; ID = 68770683471
;; CLASS = #<BUILT-IN-CLASS COMMON-LISP:SYMBOL>
;; TYPE = SYMBOL
;; NAME = "BUFFER"
;; PACKAGE = #<PACKAGE "NYXT">
;; VISIBILITY = :EXTERNAL
;; FUNCTION-BINDING = #<STANDARD-GENERIC-FUNCTION NYXT:BUFFER (20)>
;; CLASS-BINDING = #<NYXT:USER-CLASS NYXT:BUFFER>
;; PLIST = NIL
(describe* (find-class 'nyxt:buffer))
;; User-class #<NYXT:USER-CLASS NYXT:BUFFER>
;; User-configurable value class.
;; Can be configured using `customize-instance' and `customize-hook'.
;; SELF = #<NYXT:USER-CLASS NYXT:BUFFER>
;; ID = 68777288547
;; CLASS = #<STANDARD-CLASS NYXT:USER-CLASS>
;; SLOT-DEFINITIONS = (#<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT::CUSTOMIZE-HOOK>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::%TYPE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::SOURCE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::PLIST>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::NAME>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::CLASS-EQ-SPECIALIZER>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::DIRECT-SUPERCLASSES>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::DIRECT-SUBCLASSES>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::DIRECT-METHODS>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::%DOCUMENTATION>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::SAFE-P>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::FINALIZED-P>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::%CLASS-PRECEDENCE-LIST>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::CPL-AVAILABLE-P>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::CAN-PRECEDE-LIST>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::INCOMPATIBLE-SUPERCLASS-LIST>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::WRAPPER>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::PROTOTYPE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::DIRECT-SLOTS>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION SB-PCL::SLOTS>)
;; TYPE = NYXT:USER-CLASS
;; SLOTS = (#<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:DEFAULT-MODES>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:ID>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:PROFILE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:URL>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:URL-AT-POINT>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:TITLE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:STYLE>
;; #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION NYXT:BUFFER-DELETE-HOOK>)
;; DIRECT-SLOTS = (#<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:DEFAULT-MODES>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:ID>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:PROFILE>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:URL>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:URL-AT-POINT>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:TITLE>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:STYLE>
;; #<SB-MOP:STANDARD-DIRECT-SLOT-DEFINITION NYXT:BUFFER-DELETE-HOOK>)
;; PROTOTYPE = NIL
;; WRAPPER = #<SB-KERNEL:LAYOUT (ID=3671) for NYXT:BUFFER {50428803}>
;; INCOMPATIBLE-SUPERCLASS-LIST = NIL
;; CAN-PRECEDE-LIST = (#<STANDARD-CLASS PROMPTER:PROMPTER> #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>
;; #<SB-PCL::SLOT-CLASS SB-PCL::SLOT-OBJECT> #<STANDARD-CLASS COMMON-LISP:STANDARD-OBJECT>
;; #<NYXT:INTERFACE-CLASS NYXT:RENDERER-BUFFER>)
;; CPL-AVAILABLE-P = T
;; %CLASS-PRECEDENCE-LIST = (#<NYXT:USER-CLASS NYXT:BUFFER> #<NYXT:INTERFACE-CLASS NYXT:RENDERER-BUFFER>
;; #<STANDARD-CLASS COMMON-LISP:STANDARD-OBJECT> #<SB-PCL::SLOT-CLASS SB-PCL::SLOT-OBJECT>
;; #<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>)
;; FINALIZED-P = T
;; ...
etc.
What would be good for this workflow, actually, is using the function that represents the field as the field name. E.g., use find-class
instead of class-binding
in
CLASS-BINDING = #<NYXT:USER-CLASS NYXT:BUFFER>
On SBCL, describing a bound symbol generates a HUGE wall of text with all the slots of the bound class, all the methods of the bound function etc. For
nyxt:buffer
, it's: