Closed leafarbelm closed 4 months ago
Thank you very much for your suggestions and demo code, I didn't know transient was built with Emacs!
I'm not very familiar with transient yet, I need to take some time to consider this. Especially when modifying the configuration, such as modifying org-media-note-timestamp-pattern
, how to keep the panel open and display the current org-media-note-timestamp-pattern
in real time.
If the functionality and interaction logic are OK under transient, I'll switch to transient (or keep hydra as a candidate?)
@leafarbelm Your demo code was extremely helpful!
Because the UI layout logic of transient is somewhat different, I made some adjustments to the menu:
Currently, the only issue lies in the execution of the ta
, tM
, and tl
commands. They all involve the selection in the minibuffer, which works fine under hydra but causes errors under transient:
⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer Minibuf-1> (minibuffer-mode)
If you have any suggestions for this issue, please let me know! After resolving this issue, we can switch from hydra to transient.
Minimal reproducible code:
(transient-define-prefix tsc-interactive-basic ()
"Prefix with interactive user input."
:transient-suffix 'transient--do-stay
[:description org-media-note--hydra-title
("ta" "seek step" org-media-note-set-seek-method)
]
)
Hello, I have had a full interface to transient at thedefault branch
madhu' under contrib/omn-transient in https://github.com/enometh/org-media-note/blob/madhu/contrib/omn-transient.el
at https://github.com/enometh/org-media-note
This is a series of patches on top of your master branch - I tried to implement the full interface of pretty-hydra and hydra on it, perhaps you could give this branch a try -- it needs review.
(My sample config for use with org-ref and org-ref-publish is on another branch in the same repository, https://github.com/enometh/org-media-note/blob/org-ref-publish-elisp-config/config-omn.el which shows the keybindings I use to invoke it)
Please let me know if you have comments, I've spent some time on the branch and would appreciate it if the commits could be reviewed and upsstreamed, so I have less work on rebases.
Hi @yuchen-lea! sorry the late reply!
I didn't know transient was built with Emacs!
Yeah, its kind new, it in has been built into emacs since 28.
If the functionality and interaction logic are OK under transient, I'll switch to transient (or keep hydra as a candidate?)
Personally, I would keep only transient since it's built-in and is one less dependency. However, since hydra is already developed and some people may prefer it, you could add it as an optional dependency, maybe?
@leafarbelm Your demo code was extremely helpful!
I'm very happy to hear that!
Minimal reproducible code
I tried this example but didn't get any errors. This is what I get: The when i select one of the itens it opens to enter the value:
If you could give more information on how to reproduce the errors, I could try to test more. 😊
Hello, I have had a full interface to transient at the
default branch
madhu' under contrib/omn-transient in https://github.com/enometh/org-media-note/blob/madhu/contrib/omn-transient.el at https://github.com/enometh/org-media-note This is a series of patches on top of your master branch - I tried to implement the full interface of pretty-hydra and hydra on it, perhaps you could give this branch a try -- it needs review.(My sample config for use with org-ref and org-ref-publish is on another branch in the same repository, https://github.com/enometh/org-media-note/blob/org-ref-publish-elisp-config/config-omn.el which shows the keybindings I use to invoke it)
Please let me know if you have comments, I've spent some time on the branch and would appreciate it if the commits could be reviewed and upsstreamed, so I have less work on rebases.
Hi @enometh,
I tried your omn-transient.el, and as far as I can tell, it's all working well. I'll use your branch for a few days to test it out more thoroughly.
Thank @leafarbelm and @enometh for the helpful demo code!
Compared to displaying in a window (transient), I prefer displaying in a frame (hydra), as it provides a larger visual space. Therefore, I have retained pretty-hydra and introduced a new variable, org-media-note-interface
, to set which UI to use.
It works fine for me, and if there are no issues reported in a few days, I will merge it (https://github.com/yuchen-lea/org-media-note/tree/transient) into the master branch.
The logic of transient is slightly different from that of hydra.
When pressing a shortcut key on the emasc transient interface, if the shortcut key is not in the transient prefix, transient will raise a warning.
hydra will just close the window to execute the command.
I like the way hydra handles it. Because I often use M-RET
to insert new items after controlling media playback in the UI interface. Closing the UI manually is a distraction.
I'm not sure the preference of others and whether this logic can be implemented in transient
Hi @yuchen-lea,
Sorry for the late reply; I haven't had much time lately. Just wanted to say thanks for the changes you made! I just tested it, and it's working great!
Would you consider transitioning
pretty-hidra
to usetransient
since it's built with Emacs? This would eliminate one dependency and support all the existing features. I'm currently utilizing this if you are interested: