pub type TransientContext = TransientContext;Aliased Type§
pub struct TransientContext {
pub major_mode: Option<String>,
pub minor_modes: Vec<String>,
pub buffer: Option<u32>,
pub args: Args,
}Fields§
§major_mode: Option<String>The active major’s id, if the buffer has one. Emacs magit’s
:if-mode question.
minor_modes: Vec<String>The active minor ids — the looser :if-derived family test. A
separate field from major-mode on purpose: a flat list of active
mode ids can only answer one of the two questions.
buffer: Option<u32>The buffer the menu was opened over. none mid-boot, where a
builder degrades exactly as it does for the mode fields.
args: ArgsTR.3a: the arguments the open carried
(effect::open-transient’s payload).
This is what lets a menu DRILL DOWN: org’s capture menu has a
row per template, and the fields menu that row opens needs to
know which template it is collecting for. The alternative is
guest memory, which <Esc> never clears — the next open would
inherit the last one’s subject.