-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo video demonstrating some highlights #504
Comments
From the perspective of Consult it makes sense to show case the most important search/navigation commands:
Then I've often seen the need to browse the kill ring using There are many more like "hidden gems", I particularly like the In combination with Embark it may be really good to show the workflows:
The nice thing here is that Embark simply reuses the normal occur and grep mode. This is generally great about Embark, that actions/commands are simply reused. This is not to be overstated! |
One Embark feature which is perhaps not used as much as it could be is acting on things in non-minibuffer buffers. Say you bind I also like using In combination with Another I sometimes mention Emacs commands in emails or markdown buffers (I'm typing this comment in a Markdown buffer). To make sure I don't spout nonsense I usually call The other day I found myself needing to paste a bunch of book titles into several online bookstore websites, and I had the book titles in an org table. I quickly added an Embark target finder for the contents of the current org table cell to my |
(I guess the |
I also use embark to open video links with mpv, I got the idea from here, transforming region contents is also nice with it. |
Another thing that wasn't mentioned yet is the component wise matching of orderless using dispatchers. |
@revrari Don't feel pressured to demo everything we mention here, just pick what you personally find interesting enough or which you think fit into a coherent demo. Always feel free to ask for more info how to do something if you run into problems, also see here for basic setups of various combinations. You can run the test scripts using: cd test; ./run.sh <package-combo>.el If you are using which-key you might also like to use it for getting prompted for embark actions: (setq embark-action-indicator
(lambda (map &optional _target)
(which-key--show-keymap "Embark" map nil nil 'no-paging)
#'which-key--hide-popup-ignore-command)
embark-become-indicator embark-action-indicator) Regarding orderless here is a my setup: (setq orderless-matching-styles
'(orderless-strict-leading-initialism orderless-regexp))
(setq orderless-style-dispatchers
(list (defun my-orderless-dispatch (pattern _index total)
(cond
((string-prefix-p "!" pattern)
`(orderless-without-literal . ,(substring pattern 1)))
((string-suffix-p "!" pattern)
`(orderless-strict-full-initialism . ,(substring pattern 0 -1)))
((string-suffix-p "=" pattern) `(orderless-literal . ,(substring pattern 0 -1)))
((string-suffix-p "~" pattern) `(orderless-flex . ,(substring pattern 0 -1))))))) For example type |
Agreed on all of the above. Also:
|
Thank you all for your input. I am going to carefully study your remarks and will revert back if necessary. |
Thank you. I have looked at each of these and have tested each. They are great features. I would recommend that we create several videos highlighting the features of each program rather than create one long video which looks at the features of all the programs. I.e. do a video called "Selectrum Tweaks" and then "Consult Tweaks" etc. I would personally not include a feature like 'Selecting multiple candidates via completing-read-multiple' as this is a niche feature that may not be of interest to general users. I am however open to a different point of view. |
I agree. There are many features we may like as developers since we spent a lot of time thinking about it, but which are not as important enough to be highlighted. Maybe take our ideas here just as hints to which features exist and pick what you like the best, fitting your workflow. |
Thank you for this. I have studied it carefully and think I can highlight all these features in one video. I understand these commands. I have a few questions: Please explain what you mean by "recursive editing" (i.e. vis-à-vis consult-outline and consult-line) and briefly how this can be done. You say that consult-buffer supports virtual buffers. Please be more specific as to how this can be enabled (say) for files that have been closed. |
One more question. Is there a simply way (a shortcut key perhaps) to copy commands invoked with M-x from the minibuffer into another buffer? Would one need embark for this? |
Please explain more fully his syntax to me. |
What would you like me to add specifically about these commands which I did not cover in my 1st video. |
You can set Now what I mean with "supports recursive editing" - the commands are robust if line numbers or buffers change. For example if you run
It is enabled by default if you have
You can copy the currently selected candidate with
See https://github.com/minad/consult#asynchronous-search.
I think I saw on reddit that people wanted to see a longer showcase of swiper/consult-line. So maybe make it a bit more detailed? Interesting use cases:
|
Okay. Got it.
Okay. Got it.
Ivy has a variable which simply turns this feature on. So I was wondering if there was an equivalent variable in Consult. But you have answered my question.
Will cover when I do Embark as well
I will look at these. Thanks. |
Yes, in Ivy and Ido it is a simple variable to enable virtual buffers. In Ivy virtual buffers are only bookmarks and recent files and in Ido there is only support for recent files. The available virtual buffers are hard coded. The idea of virtual buffers in Ivy goes back to Ido. In Consult I originally had virtual buffer sources hard coded too, but replaced this with a flexible design where you can add/remove/modify arbitrary sources (minad/consult#135). This design goes more in the direction of helm sources and helm-mini, but the Consult design is deliberately simpler and more restricted to ensure performance and robustness. See also https://github.com/minad/consult/wiki#buffer-sources. |
I have completed the videos on Selectrum and Consult. I will need more time to study Orderless and Embark. It is a public holiday here which has allowed me to do this. I will likely only get to the other videos next week. When and how do you think I should release these? I can do so immediately, or wait a few days, releasing them together or separately. |
Releasing each with some pause may give them more exposure, you can post them separately and more people will get aware of them. Thank you for doing this! |
It is my pleasure. I hope the videos do justice to the programs in question. |
No worries, I rather hope you enjoyed learning more about the packages along the way and feel that it was worth doing the work! |
Just a question about Embark. If I invoke |
There are multiple "prompters", which are used by Embark to query for the action. It seems you are using the |
The current value of Embark Prompter is |
@minad: @revrari mentioned pressing @revrari: Once you have pressed |
@revrari My recommendation would be to use which-key in combination with the keymap prompter. Unfortunately support is incomplete, since nested menus are not updated in which-key (oantolin/embark#139). So it is only a half recommendation ;) |
Awesome. Thanks. |
I did have which-key installed, but found the keymap prompter sufficient. So I removed it. |
Okay 👍 This is a matter of taste. I am more accustomed to using which-key everywhere, so this is my preference. |
If you want a contrarian view, I recommed pressing |
I'm lying, I don't actually recommend |
Now that I think about it - maybe I could kick out which-key and really use C-h to summon the keybinding help, e.g., in combination with a prettified keybinding buffer. But for beginners I would definitely propose which-key to get started. In any case, I am not 100% happy with the status quo:
EDIT: One more point regarding which-key - it would be great if menu-items would get supported at some point. There is an open PR for this but I am unsure if this will be merged soon. This would make the consult narrowing menu nicer and it may also be useful for Embark actions. |
Why do you want the usual keybinding buffer? You also said:
I thought that something like the completing-read prompter is a nice replacement for the keybindings buffer:
I haven't gotten around to it, but I wanted to figure out if I could use the completing-read prompter globally instead of the usual keybinding buffer (and instead of which-key, which is automatic --and thus "too aggressive" for me-- and hard to search --you have to scan visually!, it's as if |
I am assuming that I have a better, prettier replacement for the keybinding buffer.
Agree. I just find the switch from keymap prompter to completing read prompter unexpected. A keybinding buffer as help for the keymap prompter would be more aligned with the usual behavior.
That's an interesting idea actually. I would like this since one would get a consistent interface everywhere and I value consistency. I do not disagree that completing read is better than which key or the keybinding buffer. If you find a way to introduce completing-read globally instead of the keybinding buffer I see myself switching from which-key to that solution! |
I experimented with prefix command completion a while ago , it depends on which-key but that doesn't bother me because I use both. |
@clemera Sounds good, but I would love to see something simpler then if it is possible without the which-key dependency. Simply showing a completing-read completion with all the keybindings. But probably this would involve doing a part of the which-key work, looking up all the keybindings and so on. |
It was really just laziness that I hadn't done this before now: I needed to find out how to change what (defun prompt-for-prefix-binding ()
(interactive)
(let* ((keys (this-command-keys))
(prefix (seq-take keys (1- (length keys)))))
(call-interactively
(embark-completing-read-prompter
(key-binding prefix)))))
(setq prefix-help-command #'prompt-for-prefix-binding) EDIT: Wow, I love it! EDIT2: @clemera suggested the above use of |
@oantolin Maybe |
Oh, maybe, @clemera. And even if it were the same, it certainly feels like it more directly expresses intent. I'll use it instead in my config, thanks! |
I will use your function, too! Very nice! |
BTW, I also did not knew about the "@" trick so far which is a great addition! |
Great! I will also use that instead! This is indeed much better - and we get it nearly for free. I wouldn't have expected this to be so simple. |
Yeah, in Emacs UX I'm all about late binding, so I wanted two-way escape hatches between the keymap prompter and the completing-read prompter. |
@oantolin What about adding |
Sure, no problem! |
This function is intended to be used as a value for prefix-help-command. That configuration makes C-h after a prefix prompt you for a command to run using completion. The keybindings are displayed with the commands (if your completion UI displays completion candidates, of course), and you can type @ to use the key bindings. See discussion in radian-software/selectrum#504.
This was indeed way easier than I expected. 🎉 |
Okay, I have just completed also the video on Embark. One more to go: Orderless. |
Thank you for all your work on this, @revrari. |
The Selectrum is now available here + reddit thread, thanks again @revrari! Looking forward to watch the other demos as well! |
I am not sure why this thread has been closed. I wanted still to discuss the videos on Embark and Consult with the authors. I also had questions about Orderless. Please let me know if you would like to preview your video before I release it. If so, we will need to create an alternative form of discussion. |
We can still continue to discuss here! If you write a message here, all the participants in this discussion will get a notification. |
@revrari I reopened it, this was just me trying to keep the issue list clean from dead threads which don't need any action from Selectrum side. Let me know when you feel it can be closed. Regarding your email I think the previous video was fine no need to redo it, it doesn't have to be perfect not need to redo the work! The discussion on reddit already highlighted the parts which might have been unclear. |
No problem. I have redone the video and uploaded it to my site and also
amended my reddit posted accordingly.
Kindest regards,
Raoul Comninos
…On Wed, Mar 24, 2021 at 11:33 AM Clemens Radermacher < ***@***.***> wrote:
@revrari <https://github.com/revrari> I reopened it, this was just me
trying to keep the issue list clean from dead threads which don't need any
action from Selectrum side. Let me know when you feel it can be closed.
Regarding your email I think the previous video was fine no need to redo
it, it doesn't have to be perfect not need to redo the work! The discussion
on reddit already highlighted the parts which might have been unclear.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#504 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQU3FKDBSQO5QMDKQDJLM3TFGWTRANCNFSM4ZRWQSZA>
.
|
I just watched the new version, very nice improvements, thank you! |
I am glad you are happy with it.
Kindest regards
Raoul
…On Wed, Mar 24, 2021 at 3:30 PM Clemens Radermacher < ***@***.***> wrote:
I just watched the new version, very nice improvements, thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#504 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQU3FP7LWCQ3GOP64E5RJLTFHSOHANCNFSM4ZRWQSZA>
.
|
I have redone my video on Consult which will be set to air Mar 26, 2021. I am satisfied with the one on Embark which is longer than the other three (23 minutes) because I had not previously discussed Embark. This one is set to air Mar 30, 2021. I will not be able to do any further edits or videos because we are about to enter Holy Week and I must give my full attention to that. Thank you for the opportunity to collaborate. I hope you enjoy the videos. |
@revrari mentioned he might want to record another video demonstrating more highlights of Selectrum in usage with Consult, Marginalia, Orderless and Embark (CC @minad and @oantolin). This issue is for discussing ideas and features which are worth including in such a demonstration to make it interesting and give a broad enough overview of the current capabilities.
Here are some features of Selectrum that might be worth showing/mentioning in such a demo:
selectrum-display-action
to display candidates outside the minibufferThe text was updated successfully, but these errors were encountered: