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


3 Other Options

User Option: transient-show-popup

This option controls whether the current transient’s infix and suffix commands are shown in the echo area.

If t (the default), then the infix and suffix commands are shown as soon as the transient is invoked. If nil, only a one line summary is shown until the user presses a key that forms an incomplete key sequence. If a number, behave as for nil but also show the commands after that many seconds of inactivity.

User Option: transient-highlight-mismatched-keys

This option controls whether key bindings of infix commands that do not match the respective command-line argument should be highlighted. For other infix commands this option has no effect.

When this option is non-nil, then the key binding for infix argument are highlighted when only a long argument (e.g. --verbose) is specified but no shorthand (e.g -v). In the rare case that a shorthand is specified but the key binding does not match, then it is highlighted differently.

Highlighting mismatched key bindings is useful when learning the arguments of the underlying command-line tool; you wouldn’t want to learn any short-hands that do not actually exist.

The highlighting is done using one of the faces transient-mismatched-key and transient-nonstandard-key.

User Option: transient-substitute-key-function

This function is used to modify key bindings. It the value of this option is nil (the default), then no substitution is performed.

This function is called with one argument, the prefix object, and must return a key binding description, either the existing key description it finds in the key slot, or key description that replaces the prefix key. It could be used to make other substitutions, but that is discouraged.

For example, = is hard to reach using my custom keyboard layout, so I substitute ( for that, which is easy to reach using a layout optimized for lisp.

(setq transient-substitute-key-function
      (lambda (obj)
        (let ((key (oref obj key)))
          (if (string-match "\\`\\(=\\)[a-zA-Z]" key)
              (replace-match "(" t t key 1)
            key))))
User Option: transient-detect-key-conflicts

This option controls whether key binding conflicts should be detected at the time the transient is invoked. If so, then this results in an error, which prevents the transient from being used. Because of that, conflicts are ignored by default.

Conflicts cannot be determined earlier, i.e. when the transient is being defined and when new suffixes are being added, because at that time there can be false-positives. It is actually valid for multiple suffixes to share a common key binding, provided the predicates of those suffixes prevent that more than one of them is enabled at a time.


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