transient-suffix
, which in
turn derives from transient-child
, from which transient-group
also
derives (see Group Classes).
transient-infix
class,
which in turn derives from the transient-suffix
class.
Infixes are a special type of suffixes. The primary difference is
that infixes always use the transient--do-stay
pre-command, while
non-infix suffixes use a variety of pre-commands (see Transient State). Doing that is most easily achieved by using this class,
though theoretically it would be possible to define an infix class
that does not do so. If you do that then you get to implement many
methods.
Also, infixes and non-infix suffixes are usually defined using different macros (see Defining Suffix and Infix Commands).
transient-argument
class.
transient-switch
class (or a derived class) is used for infix
arguments that represent command-line switches (arguments that do
not take a value).
transient-option
class (or a derived class) is used for infix
arguments that represent command-line options (arguments that do
take a value).
transient-switches
class can be used for a set of mutually
exclusive command-line switches.
transient-files
class can be used for a ‘--’ argument that
indicates that all remaining arguments are files.
transient-variable
class.
transient-information
and transient-information*
classes are
special in that suffixes that use these class are not associated
with a command and thus also not with any key binding. Such
suffixes are only used to display arbitrary information, and that
anywhere a suffix can appear. Display-only suffix specifications
take these form:
([LEVEL] :info DESCRIPTION [KEYWORD VALUE]...) ([LEVEL] :info* DESCRIPTION [KEYWORD VALUE]...)
The :info
and :info*
keyword arguments replaces the :description
keyword used for other suffix classes. Other keyword arguments that
you might want to set, include :face
, predicate keywords (such as
:if
and :inapt-if
), and :format
. By default the value of :format
includes %k
, which for this class is replaced with the empty string
or spaces, if keys are being padded in the containing group.
The only difference between these two classes is that :info*
aligns
its description with the descriptions of suffix commands, while for
:info
the description bleeds into the area where suffixes display
their key bindings.
transient-lisp-variable
class can be used to show and change the
value of lisp variables. This class is not fully featured yet and
it is somewhat likely that future improvements won’t be fully
backward compatible.
transient-describe-target
class is used by the command
transient-describe
.
transient-value-preset
class is used to implement the command
transient-preset
, which activates a value preset.
Magit defines additional classes, which can serve as examples for the fancy things you can do without modifying Transient. Some of these classes will likely get generalized and added to Transient. For now they are very much subject to change and not documented.