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


2.4 Saving Values

After setting the infix arguments in a transient, the user can save those arguments for future invocations.

Most transients will start out with the saved arguments when they are invoked. There are a few exceptions though. Some transients are designed so that the value that they use is stored externally as the buffer-local value of some variable. Invoking such a transient again uses the buffer-local value. 1

If the user does not save the value and just exits using a regular suffix command, then the value is merely saved to the transient’s history. That value won’t be used when the transient is next invoked but it is easily accessible (see Using History).

C-x s     (transient-set)

This command saves the value of the active transient for this Emacs session.

C-x C-s     (transient-save)

Save the value of the active transient persistently across Emacs sessions.

User Option: transient-values-file

This file is used to persist the values of transients between Emacs sessions.


Footnotes

(1)

magit-diff and magit-log are two prominent examples, and their handling of buffer-local values is actually a bit more complicated than outlined above and even customizable. This is something I am rethinking, but I don’t want to rush any changes.)