Next: , Previous: , Up: Usage   [Contents][Index]


2.5 Using History

Every time the user invokes a suffix command the transient’s current value is saved to its history. These values can be cycled through the same way one can cycle through the history of commands that read user-input in the minibuffer.

M-p     (transient-history-prev)

This command switches to the previous value used for the active transient.

M-n     (transient-history-next)

This command switches to the next value used for the active transient.

In addition to the transient-wide history, Transient of course supports per-infix history. When an infix reads user-input using the minibuffer, then the user can use the regular minibuffer history commands to cycle through previously used values. Usually the same keys as those mentioned above are bound to those commands.

Authors of transients should arrange for different infix commands that read the same kind of value to also use the same history key (see Suffix Slots).

Both kinds of history are saved to a file when Emacs is exited.

User Option: transient-history-file

This file is used to persist the history of transients and their infixes between Emacs sessions.

User Option: transient-history-limit

This option controls how many history elements are kept at the time the history is saved in transient-history-file.