[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: transient

From: Phil Sainty
Subject: Re: [ELPA] New package: transient
Date: Fri, 01 May 2020 17:36:17 +1200
User-agent: Orcon Webmail

On 2020-05-01 14:52, Richard Stallman wrote:
What I want to understand is the basic purpose and use of Transient.

Would someone like to tell me in 10 lines
whet job Transient does, and why it is useful?

It is a fancy visual keymap.

It provides visual (but keyboard-driven) menus for invoking commands;
and also provides an interface for interactively specifying *arguments*
to pass to those commands, all from within the same menu.

The first aspect is like prefix key bindings, but with all of the keys
under the prefix being presented visually in a friendly format, with
descriptive labels, so that you can see at a glance what the possible
commands are, and which keys invoke them.

The second aspect is like a *much* fancier notion of prefix arguments,
where you can interactively (but optionally) specify the arguments you
wish to pass to the command you are about to select (and they are again
all labelled clearly, to help you understand what each one does).

It's useful because it's a very efficient and user-friendly interface
for invoking complex commands with arbitrary interactive arguments.

Thanks, but I can't follow that.  Things flash on the screen, showing
lots of text I can hardly see (it is small print), and I have no idea
what it is doing or why.

Ok, if you freeze that video at 3:50 then you are looking at a frame
where the bottom window is displaying an active Transient buffer, and
I'll use that example as context...

The example is for performing various "git commit" commands.  It was
opened by typing "c" from a Magit buffer.  The command keys under that
prefix are shown at the bottom: (c, e, f, F, w, s, S, a, A), and
typing one of those will close the window and invoke the associated
command.  So typing "c c" will firstly open this Transient window, and
then close it and invoke the Magit command for a basic "git commit".

The "Arguments" list at the top shows key sequences beginning with "-"
(-a, -e, -v, -n, -R, -A, -s, -C), and typing any of those will configure
an argument for the command.  So in a Magit buffer, typing "c -s -e s"
would open this Transient window, then enable the "--signoff" argument,
then enable the "--allow-empty" option, and finally close the window
and invoke the Magit command for creating a git squash commit using the
selected arguments.  The arguments can be set in any sequence, until the
user types one of the command keys at the bottom, and highlighting is
employed to show which arguments are enabled.

Some arguments require user input, such as "--author=", so if the user
types "-A" they will be prompted in the minibuffer to enter the author


reply via email to

[Prev in Thread] Current Thread [Next in Thread]