GNU-devel ELPA - transient

transient Atom Feed

Description
Transient commands
Latest
transient-0.12.0.0.20260118.132220.tar (.sig), 2026-Jan-18, 610 KiB
Maintainer
Jonas Bernoulli <emacs.transient@jonas.bernoulli.dev>
Website
https://github.com/magit/transient
Browse ELPA's repository
CGit or Gitweb
All Dependencies
compat (.tar), cond-let (.tar), seq (.tar)
Badge
Manual
transient

To install this package from Emacs, use package-install or list-packages.

Full description

1. Transient command menus

Transient is the library used to implement the keyboard-driven “menus” in Magit. It is distributed as a separate package, so that it can be used to implement similar menus in other packages.

1.1. Some things that Transient can do

  • Display current state of arguments
  • Display and manage lifecycle of modal bindings
  • Contextual user interface
  • Flow control for wizard-like composition of interactive forms
  • History & persistence
  • Rendering arguments for controlling CLI programs

1.2. Complexity in CLI programs

Complexity tends to grow with time. How do you manage the complexity of commands? Consider the humble shell command ls. It now has over fifty command line options. Some of these are boolean flags (ls -l). Some take arguments (ls --sort=s). Some have no effect unless paired with other flags (ls -lh). Some are mutually exclusive. Some shell commands even have so many options that they introduce subcommands (git branch, git commit), each with their own rich set of options (git branch -f).

1.3. Using Transient for composing interactive commands

What about Emacs commands used interactively? How do these handle options? One solution is to make many versions of the same command, so you don't need to! Consider: delete-other-windows vs. delete-other-windows-vertically (among many similar examples).

Some Emacs commands will simply prompt you for the next "argument" (M-x switch-to-buffer). Another common solution is to use prefix arguments which usually start with C-u. Sometimes these are sensibly numerical in nature (C-u 4 M-x forward-paragraph to move forward 4 paragraphs). But sometimes they function instead as boolean "switches" (C-u C-SPACE to jump to the last mark instead of just setting it, C-u C-u C-SPACE to unconditionally set the mark). Since there aren't many standards for the use of prefix options, you have to read the command's documentation to find out what the possibilities are.

But when an Emacs command grows to have a truly large set of options and arguments, with dependencies between them, lots of option values, etc., these simple approaches just don't scale. Transient is designed to solve this issue. Think of it as the humble prefix argument C-u, raised to the power of 10. Like C-u, it is key driven. Like the shell, it supports boolean "flag" options, options that take arguments, and even "sub-commands", with their own options. But instead of searching through a man page or command documentation, well-designed transients guide their users to the relevant set of options (and even their possible values!) directly, taking into account any important pre-existing Emacs settings. And while for shell commands like ls, there is only one way to "execute" (hit Return!), transients can "execute" using multiple different keys tied to one of many self-documenting actions (imagine having 5 different colored return keys on your keyboard!). Transients make navigating and setting large, complex groups of command options and arguments easy. Fun even. Once you've tried it, it's hard to go back to the C-u what can I do here again? way.

transient.png



Compile Manual GNU ELPA MELPA Stable MELPA

Old versions

transient-0.12.0.0.20260113.154930.tar2026-Jan-14 600 KiB
transient-0.12.0.0.20260108.201115.tar.lz2026-Jan-09 109 KiB
transient-0.12.0.0.20260101.183114.tar.lz2026-Jan-03 108 KiB
transient-0.11.0.0.20251227.224828.tar.lz2025-Dec-28 108 KiB
transient-0.11.0.0.20251130.184443.tar.lz2025-Nov-30 107 KiB
transient-0.10.1.0.20251115.631.tar.lz2025-Nov-15 117 KiB
transient-0.9.4.0.20250829.152922.tar.lz2025-Sep-01 117 KiB
transient-0.8.8.0.20250530.204059.tar.lz2025-Jun-01 112 KiB
transient-0.7.9.0.20241203.214158.tar.lz2024-Dec-0499.3 KiB
transient-0.0.20201221.170234.tar.lz2020-Dec-2167.2 KiB

News

# -*- mode: org -*-
* v0.13.0    UNRELEASED

This release adds features useful for blind users.  The relevant
options and recommended settings are documented in the manual in
the section "Accessibility Options".  To go there, evaluate this
form: (info "(transient)Accessibility Options").

- Selecting the menu window using the mouse is now supported.
  7c46a093

- Selecting the menu window using the command ~other-window~, is now
  supported, but requires the following configuration.  e3346f7b

    (define-key transient-predicate-map
      [other-window] #'transient--do-move)

- The region is now properly displayed, when using the mouse to
  select text in the menu buffer.  7c46a093

- The menu window can now be selected automatically when activating
  a menu, by setting the new option ~transient-select-menu-window~.
  Doing so is only encouraged for users of braille output devices.
  59380806

- Added new option ~transient-navigate-to-group-descriptions~.

- Added new option ~transient-describe-menu~.

* v0.12.0    2026-01-01

- Fixed a regression when using the ~transient-value-preset~ class,
  introduced in v0.10.0.  f960acdf

- Stopped creating a new file to save an unmodified default value
  (the empty list).  3fdd8043

- Various makefile improvements. 4e6d3fc8..151622e1

- Gave up on determining function arity upfront.  6d1d8656

- Various build improvements.

* v0.11.0    2025-11-18

- At least Emacs 28.1 is required now.  Emacs 30.1 was released
  earlier this year, so we still support Emacs "oldoldstable".
  Because Emacs 28.1 was the first release that bundled this
  package, we have to keep support for that release.  d361d272

- Use my new Cond-Let package.  87fb8396..1d2710c7

- When Isearch was exited using a key that has no binding in
  ~isearch-mode-map~, then the Transient state was not resumed.
  82baa889

* v0.10.1    2025-10-06

- ~transient--get-savable-value~ now also functions properly when
  used while exiting the menu.  #410

* v0.10.0    2025-09-01

- Added more context-specific functions for getting the prefix's
  value and improved the documentation explaining when to use which
  function and why.  b4edb633 (See also the commit message.)

- When suffixes are being initialized, no longer drop inactive
  suffixes (inap suffixes and those on a level that is currently
  not being used).  If/when such a suffix later becomes active,
  it now uses its set or saved value; previously the default value
  would have been used.  #316, #364, #407

- The value and scope of inapt suffixes are now initialized when
  the prefix is being initialized, which is useful because they
  may later become apt.  #407

- While setting up suffixes, the suffix being setup can now access
  suffixes that have already been setup (including their values).
  #316

- After suffixes have been setup, the value of the prefix's ~value~
  slot is now made unbound, to prevent access to this potentially
  outdated value.  5bf26de9

- Added new face ~transient-inapt-argument~ and use it for arguments
  and values that are set but aren't being used because the suffix
  is currently inapt.  fed866ba

- Added new prefix slot ~remember-value~, which allows specifying
  various modes of automatically saving the current value.  #287

* v0.9.4    2025-08-01

- When using coordinates, trying to insert the same suffix into the
  same menu twice, caused it to instead be removed the second time.
  #400

* v0.9.3    2025-07-01

- Improved kludge to work around a bug in Emacs, which may cause
  a subprocess to be killed, when the user types ~C-g~, expecting
  that to quit a transient menu.  #388

- Fixed an edge-case when trying to put point on the same suffix
  after refreshing the menu.  e508e658

- Removed an unnecessary redraw, which additionally happened too
  early, before suffixes were refreshed.  #397

* v0.9.2    2025-06-09

- Fixed a regression in v0.9.0, which made it impossible to change the
  level of a suffix, if that was set inline in the prefix definition.
...
...