[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: SQ: why transient instead of enhanced keymaps?
From: |
Óscar Fuentes |
Subject: |
Re: [External] : Re: SQ: why transient instead of enhanced keymaps? |
Date: |
Tue, 21 Jan 2025 11:48:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Drew Adams <drew.adams@oracle.com> writes:
> I can think of one thing missing, wrt this point:
>
>> you can group together related functionality
>> in the keymap and separate these groups.
>
> A customizable display, as you describe, is
> definitely a plus over no ability to group
> or otherwise customize the layout.
>
> But it's also helpful for users to be able
> to interactively change the layout, e.g.,
> the grouping and/or the order in which the
> groups are presented (and order of choices
> within groups).
>
> While not allowing the general customization
> you describe, code I use:
>
> 1. Lets a coder choose the ways to group things,
> using (and providing) different sort orders.
> 2. Lets users interactively choose among those,
> i.e., switch groupings and their order on
> the fly.
>
> For example, when choosing key completions
> you can choose to sort:
>
> 1. By key name, prefix keys first
> 2. By key name, local keys first
> 3. By command name, alphabetically
A good Transient UI shows related functionality together. Function is
what matters. A key being prefix, local or whatever is an implementation
detail. And names are mostly accidental.
Of course, when there is no clear functional division among "keys",
alphabetical order can be advisable.
Transient was conceived to tame the UI complexity of Magit, which itself
is a layer on top of git's notoriously barroque UI. IMAO Transient is
doing a decent job on this regard. However, I'm seeing lately how
Transient is used on scenarios where the UI complexity does not entirely
warrant it, IMHO. This in part is caused by the fact that most Emacs UI
interfaces consists on multiple entry points with a few options each,
while Transient shines when implementing a single entry point with lots
of options.
If Transient was a built-in Emacs feature on the ancient times, I'm
convinced that the UI of many Emacs packages would be quite different
(more discoverable, agile and powerful, IMAO.)
Re: SQ: why transient instead of enhanced keymaps?, Howard Melman, 2025/01/21