Skip to content

Conversation

@nobiot
Copy link
Owner

@nobiot nobiot commented Apr 23, 2023

Explore UX improvement for when adding additional properties to #+transclude. See #169.
The idea is simple and goes like this:

  1. Create a set of functions, each of which handles adding/removing a property to the #+transclude: keyword
  2. These can be added to keybinding

This way, the underlying menu does not have to be constructed via Hydra. I guess it can be Transient, Which-key, or the built-in menu system.

nobiot added 7 commits April 22, 2023 12:39
The check prior to this refactoring in `org-transclusion-check-add` is
intended to check also the line at point is in a block such as an
example. This is cleverly taken care of by `org-element-at-point` -- it
tells the element at point is a block, not a keyword.
read-number does not error when the user enters non-number value;
instead it loops back to the prompt.  `org-transclusion-menu-level`
emulates it and loops back when the number entered is not between 1 and
9 (inclusive).
Copy link

@stardiviner stardiviner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the code, this looks fine to me. Wait for second round feature of keybinding interface. What interface do you decide to use? transicient? which-key? hydra?

@stardiviner
Copy link

Seems using which-key as interface is the simplest way, it only need to define a keymap prefix. Then define all commands keybindings under this prefix so that which-key can show those commands.

Transient is the best UI which supports suffix, prefix etc. Which it will support modify and see the instant change as awesome as Magit. Also can support future features may requires complex operations. (So I suggest to use transient.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants