No video

Emacs: modern minibuffer packages (Vertico, Consult, etc.)

  Рет қаралды 14,153

Protesilaos Stavrou

Protesilaos Stavrou

Күн бұрын

In this ~44 minute video I demonstrate packages that upgrade the experience with Emacs. They are about the minibuffer: where we interact with Emacs to call a command by its name or pick a candidate for some action.
The packages I cover are `vertico`, `marginalia`, `consult`, `orderless`, and `embark`. I also mention briefly the `wgrep` package as well as the built-in `savehist-mode`, `recentf-mode`.
A related video I did about search (search+replace): protesilaos.co....
The sample configuration I mentioned in this video is available here: protesilaos.co....
* * *
Find all my publications on my website (Emacs, philosophy, etc.): protesilaos.com

Пікірлер: 95
@yiyuzhou3453
@yiyuzhou3453 16 күн бұрын
This type of content draws so much new users to Emacs. It's so frustrating after searching and searching, no one except you can give an easy and comprehensive overview of the builtin functionalities along with package extension. Thank you!
@protesilaos
@protesilaos 15 күн бұрын
You are welcome!
@DaGhost141
@DaGhost141 6 ай бұрын
You are such a treasure for the emasc community!
@protesilaos
@protesilaos 6 ай бұрын
Thank you!
@breddie_is_rookie
@breddie_is_rookie Ай бұрын
Genuinely straight forward and clean runover about the advantages of each plugin, I am grateful to your content.
@protesilaos
@protesilaos Ай бұрын
Thank you!
@sizur
@sizur Ай бұрын
Thank you for providing such great overviews of emacs packages!
@protesilaos
@protesilaos 29 күн бұрын
You are welcome!
@ChristianTietze
@ChristianTietze 6 ай бұрын
Great to see this comprehensive demo of all these enhancements (instead of replacements) of built-in Emacs completion tools in one place. 👏
@protesilaos
@protesilaos 6 ай бұрын
Thank you!
@ZmiiGorinich
@ZmiiGorinich Ай бұрын
Just excellent, short and clear!
@protesilaos
@protesilaos Ай бұрын
Thanks!
@rrregis
@rrregis 6 ай бұрын
You're a master teacher. Thanks!
@protesilaos
@protesilaos 6 ай бұрын
You are welocme!
@PabloParisino
@PabloParisino 6 ай бұрын
Incredibly clear and informative. I use doom emacs and it is often hard to differentiate between the different packages that come installed out-of-the-box. This video helped me a lot to comprehend their separate purpose and their mutual interplay. Great work, thanks a lot!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! That's the thing with a starter kit like Doom: it hides all the details to give you something decent out-of-the-box. The upside is that you can get started quickly. The downside is that you are not fully in control.
@VorpalForceField
@VorpalForceField 6 күн бұрын
Excellent ..!! Thank You..!!
@protesilaos
@protesilaos 5 күн бұрын
You are welcome!
@NicholasScheurich
@NicholasScheurich 6 ай бұрын
Fantastically helpful. Thanks, Prot.
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@tombienakamoto5890
@tombienakamoto5890 6 ай бұрын
You are an incredibly good Emacs teacher👨‍🏫! I have been using Emacs for 30 years. My setup has grown historically and was somewhat "dusty". I used this video as inspiration for a complete overhaul of my setup and now I feel like I've discovered Emacs God-Mode!
@protesilaos
@protesilaos 6 ай бұрын
Thank you! I am happy this is giving something new to try out.
@m1schi
@m1schi 6 ай бұрын
Thank you Prot! Useful as always. Embark is a beast, and I’m still wrapping my head around it. But I’ve also discovered this flow with `wgrep-mode` and now use that to do search-and-replace across projects. Very useful indeed!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! Yes, Embark is super powerful though not as easy to get started with. It is why I think it is for power users.
@dericbytes
@dericbytes 4 ай бұрын
Your videos have improved drastically. They are more visually appealing, easier to listen to, packed with more content whilst being shorter. Great work. This video has motivated me to watch some of your older videos. Thank you
@protesilaos
@protesilaos 4 ай бұрын
You are welcome! I learn more as I go.
@j7gy8b
@j7gy8b 6 ай бұрын
I had heard a lot about these packages but never before such a clear explanation of what they provide. Thank you.
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@giorgosK936
@giorgosK936 3 ай бұрын
this brings me inner peace
@marcrohrer7130
@marcrohrer7130 6 ай бұрын
perfect again! Thank you very much! I already use most packages, but still a lot of very valuable information!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@georgH
@georgH 6 ай бұрын
Excellent video, it's a great summary of the main features of these modern packages. Thank you!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@43ann
@43ann 6 ай бұрын
Thank you! I never understood Embark without actually installing it, so you helped me a lot understanding it!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! Embark is a powerful tool, though it takes time to get used to it.
@JimmyArogen
@JimmyArogen 6 ай бұрын
Wow! What a presentation! Systematic, with examples and well laid out. Good work sir! 👌
@protesilaos
@protesilaos 6 ай бұрын
Thank you!
@stevechan5315
@stevechan5315 Ай бұрын
very helpful
@protesilaos
@protesilaos Ай бұрын
Thank you!
@mejitats6766
@mejitats6766 5 ай бұрын
Thanks for the video. I was using these packages without ever really understanding what each individually did (my bad, though the package descriptions are not very clear). And thank you for teaching me `consult-line`. Really useful.
@protesilaos
@protesilaos 5 ай бұрын
You are welcome! The package descriptions are long, so it can be tricky to find exactly what each one does.
@fabioviolino
@fabioviolino 6 ай бұрын
Thank you! This vídeo was very instructive and pedagogical. I didn’t know almost any of this and it helps to learn more about this wonderful program.
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@matematleta492
@matematleta492 5 ай бұрын
These videos are a godsend. Well presented, easy to understand. I am using doom emacs and adapting these videos to my setup.
@protesilaos
@protesilaos 5 ай бұрын
Good to know. Thanks!
@asynthe
@asynthe 6 ай бұрын
Lately i've been doing some other IT stuff, but once i have the time I'll try step up my Emacs game. Thanks Prot !
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! Good luck trying Emacs again.
@antonstalheim
@antonstalheim 6 ай бұрын
Thanks! This is a very good walk-through of those packages and how they affect the minibuffer and interactions. Been using several of these packages for a while but it wasn't clear for me exactly what package that did which part. Thanks!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome!
@justrajdeep
@justrajdeep 6 ай бұрын
I cant thank you enough ... your vides are so nicely explained. I started using emacs from last week and fell in love with it because of your videos. Please keep making such videos.
@protesilaos
@protesilaos 6 ай бұрын
Good to know! The plan is to do more videos.
@alexandrewaechter7585
@alexandrewaechter7585 4 ай бұрын
Hello Prot. Thank you for the video and detailed explanations. Really helpfull. I'm using "counsel" and not "consult", but by trying to figure out what was the difference, I discovered very cool functions that I didn't know. I will try to practice your advice , to know a package well more than knowing a lot of package. Thanks again for your videos.
@protesilaos
@protesilaos 4 ай бұрын
You are welcome! Yes, it is useful to explore the functionality of a package and to figure out which parts of it you are using. Knowing what a package is capable of is helpful for future projects, as you might encounter a scenario that can be addressed with some functionality you were aware of but never used up to that point.
@256k_
@256k_ 5 ай бұрын
incredibly thourough and informative video thank you so much. I've been following your videos for a long time now, but i feel like this is probably one of the best starting videos for someone making their own emacs config. having those basic packages make a huge difference in the usability of emacs! sometimes it's hard to find the good packages to choose and it's hard to tell which ones are more efficient and work well within the emacs behavior vs ones that try to change the logic. I'm going to use this as a new starting point for an even cleaner more optimized config. thanks again for all the wisdom shared.
@protesilaos
@protesilaos 5 ай бұрын
You are welcome!
@0netom
@0netom 6 ай бұрын
I think the reason for the more conservative defaults is to minimize CPU usage and keep screen updates to a minimum, so Emacs can feel snappy on less beefy machines too, or when being run remotely, over SSH. Furthermore, having preview enabled, will also kick in the auto-loading of certain language modes, which might takes some time, resulting in a hiccup, while quickly scrolling down the list of displayed file candidates, for example. We will experience a similar hiccup, if we have remote files in our candidate lists, which we accessed with TRAMP. Those network connections need to be re-established for the sake of the preview and that could take seconds, resulting in further hiccups, where the user don't have any feedback about, what's happening.
@0netom
@0netom 6 ай бұрын
I would also note, that there are down-sides to having fancier defaults, because one would need to learn a lot, before they would know what to turn OFF, for a simpler, snappier, less flashy experience. I had this problem with IntelliJ, which does enable all sorts of programming and natural language intelligence, various highlightings, squiggly underlines, error counts, icons on the gutter, colored bars on the scroll-bar, etc. As a result simply typing into it was hyper-laggy. It took a delay, variably from 100ms to 1s, after pressing a key, until it appeared on the screen. While I've experienced this 10 years ago, you don't necessarily need such an old machine to encounter the same experience. Your machine might be modern and fast, BUT if you are trying to make a good use of the tons of money you spent on it, then you might be running a lot of things in the background, like video recording a screencast or training LLMs, torrenting files, compiling code, running automated tests, tangling your org files, etc. Then a consult preview might not be so snappy and you would rather maintain a more responsive experience.
@theodorealenas3171
@theodorealenas3171 6 ай бұрын
I fully agree, plus the current Emacs defaults aren't that bad, it's the Tab key, Dired and the buffer of buffers. Sometimes we forget how little we need in order to code.
@protesilaos
@protesilaos 6 ай бұрын
These are potentially good reasons not to have Consult enabled. Or to enable it subject to some conditions. A "getting started" wizard could also handle some of those questions on what to toggle on or off. Not to start a discussion though, as I understand these always favour the status quo. Note, by the way, that I do use the generic completions UI frequently and do consider it usable. Though I still think it is for experienced users.
@HarishNarayanan
@HarishNarayanan 6 ай бұрын
Thank you for this (and your videos in general). I think it’s time for me to move on from my ten years or whatever on ido.
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! Yes, give it a try.
@fentravers
@fentravers 6 ай бұрын
How would you do: (1) show open buffers, (2) select some of those buffers (hopefully with a preview), (3) delete those buffers. Thanks you are a GREAT presenter!
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! What you are asking is more advanced because you need to write some custom code that traverses the return value of 'buffer-list'. I guess by "open buffers" you mean buffers that are displayed in a window? Anyhow, once you collect the list of buffers matching the criteria you have specified, you can apply whatever relevant action you want.
@RonnieNissan
@RonnieNissan 6 ай бұрын
Thanks a lot for those simple yet full of knowledge videos Prot. Could you do a video about keyboard macros in emacs? Especially with isearch as you mintioned.
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! I want to cover keyboard macros at some point. Maybe soon.
@jeffreyjflim
@jeffreyjflim 2 ай бұрын
first of all thank you for the putting this up, for the fantastic explanation, and walking us through things. 27:21 when you talk about further refining the search through Emacs, is it because you have orderless installed, and that's why filtering further for `file` works? For my setup (vertico + marginalia + consult; no orderless yet) if I were to try to search for text (say `file`) that occurs in the middle of the line, I would have to do `#setq#.*file`. Which would seem to indicate that the part after the hashes has to match from the start. *Except* that I can also do `#setq#-file` ... and it will still match for `(setq make-backup-files nil)` ? what's going on here?? heck even `#setq#*file` works, which is not what I would expect.
@tutorialstube9587
@tutorialstube9587 6 ай бұрын
Greate video. Thank you! How to show key bindings and corresponding command in the mode line as in your video?
@protesilaos
@protesilaos 6 ай бұрын
You are welcome! To your question, check the 'keycast' package.
@timheaney7408
@timheaney7408 6 ай бұрын
Recent versions of Emacs include fido-vertical-mode and icomplete-vertical-mode. How do those compare to vertico?
@protesilaos
@protesilaos 6 ай бұрын
They are similar to it. I think Vertico has a cleaner implementation though.
@johnhaman
@johnhaman 6 ай бұрын
Nice video prot, but I think you oversell the ecosystem a little bit. We've had most of this functionality (minus the annotations and async commands) in ivy/counsel for 9 years now, and longer in Helm. What's new is the modularization and use of Emacs APIs, but that's not a substantial chance for users. IMO.
@protesilaos
@protesilaos 6 ай бұрын
Sure, these features have existed in one way or another for years now (and with icicles before Helm). I did not mean to imply otherwise. The difference is that the Emacs internals have improved and now we can use packages that do not need to also invent their own infrastructure.
@zacharylarson1245
@zacharylarson1245 5 ай бұрын
Agh, this makes me want to tear out over 10 years of helm configs and try this... just... time and opportunity costs... bleh
@protesilaos
@protesilaos 4 ай бұрын
There is no need to change if your setup works for you. Unless, of course, you want to start fresh and see how it goes.
@mehdi7586
@mehdi7586 6 ай бұрын
I have been using this stack for a while now, it's very nice, but I still don't know the advantages vertico has over something built in like icomplete-vertical or fido-vertical-mode. I wonder if you can replace other packages with some built in packages.
@protesilaos
@protesilaos 6 ай бұрын
I think icomplete.el needs to be polished. Right now there are 4 minor modes defined there. In my opinion, fido should not exist at all: it is somebody's respin of icomplete. Also, it binds its own 'completion-styles', which runs contrary to how these should be defined by the user. Other than that, Vertico seems more performant on my end, though I have not run any tests.
@fluentpwn8065
@fluentpwn8065 4 ай бұрын
banger
@protesilaos
@protesilaos 4 ай бұрын
Thanks!
@bartk136
@bartk136 6 ай бұрын
Do you think that exist reasonable reasons to stick with built-it minibuffers such as (f)Ido or Icomplete having all that goodies in Elpa repository?
@protesilaos
@protesilaos 6 ай бұрын
If they work for you, do not change them. Vertico would be the substitute for icomplete/fido. The others are standalone pieces of functionality: they work regardless of the default UI, icomplete, or anything that is consistent with the built-in completion infrastructure.
@mav31415
@mav31415 6 ай бұрын
Is the theme and modeline configuration available somewhere?
@protesilaos
@protesilaos 6 ай бұрын
The theme is ef-trio-light from my 'ef-themes' package. The mode line is entirely custom though. You can find my configurations and relevant video here: protesilaos.com/emacs/dotemacs#h:41ee38d0-9099-4444-85e4-cc8dce00fb9a
@ktheodor3968
@ktheodor3968 6 ай бұрын
One small observation: black typeface against a glowing white background is a killer to the eye, esp. for long screen sessions. I haven't seen many Emacs users who haven't changed the white background.
@protesilaos
@protesilaos 6 ай бұрын
It all depends on environmental light. In a room with plenty of sunshine, light themes are perfectly fine. I have been using them for years (and have developed lots of highly accessible themes in the meantime).
@georgH
@georgH 6 ай бұрын
Agree, I also change the overall desktop theme, affecting all the apps including emacs, depending on the lighting conditions. I miss that on my windows laptop. Yes, windows also supports a dark mode, but it's clunky to switch, and applications must be switched separately, and most apps don't change at all.
@ougonce
@ougonce 6 ай бұрын
This is the opposite of reality. Most humans have some level of astigmatism without even knowing, which makes white typefaces on dark backgrounds a headache inducing nightmare due to the ghosting effect.
@nbme-answers
@nbme-answers 4 ай бұрын
Thanks for this. Some suggestions: (1) please do less exposition; I think we can follow you without so much description; you can just demo what you are describing without "explaining it" first; people will get it if you simply demo the differences between working without the packages and with them. For example, explaining "economical 2-dimensional space" versus "economical focus" is too much. You can just say "I use vertical display (single column) instead of multiple columns" and just show the difference. Viewers can decide which one they like more. In general, I think you can be more "informal". The videos will be much shorter and more direct.
@protesilaos
@protesilaos 4 ай бұрын
I will keep this in mind. Thank you!
@nbme-answers
@nbme-answers 4 ай бұрын
@@protesilaos Topically, I'm interested in what you're doing (I would like to start using emacs) but I've never finished a video of yours. I usually click off after 5 or 6 minutes. The exposition is just too much. I think your videos would find a much wider audience if you start with a problem you are trying to solve (as simple as “let's find a file”) and then complete the task without and then with the packages you endorse. There is a long tradition of "demo" over exposition in programming. It's a very powerful way to convey a cool hack.
@protesilaos
@protesilaos 4 ай бұрын
@nbme-answers This has to do with how different people approach/learn things. The demo approach is fine, though it works better for those who already are familiar with the context.
@nbme-answers
@nbme-answers 4 ай бұрын
@@protesilaos I have to disagree. Exposition is using words to describe what the computer is already capable of demonstrating (if the operation is visual). Exposition is better reserved for procedures which have no definitional visual representation (algorithms, for example). But when the operation is visual (drawing, rendering, UI-based), demos are superior.
Emacs: control where buffers are displayed (the 'display-buffer-alist')
29:52
Emacs: file and Dired basics
1:02:38
Protesilaos Stavrou
Рет қаралды 13 М.
English or Spanish 🤣
00:16
GL Show
Рет қаралды 6 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
Every LLM in Emacs, with gptel
17:56
karthink
Рет қаралды 10 М.
Emacs: introduction to Denote (simple note-taking)
39:04
Protesilaos Stavrou
Рет қаралды 20 М.
Emacs. But why?
51:20
(Bit-Mage)
Рет қаралды 1,2 М.
Emacs: abbreviations with abbrev-mode (quick text expansion)
26:23
Protesilaos Stavrou
Рет қаралды 3,5 М.
Using Emacs Episode 80 - Vertico, Marginalia, Consult, and Embark
25:10
Emacs: mark and register basics
35:34
Protesilaos Stavrou
Рет қаралды 6 М.
Emacs: search and replace basics
53:03
Protesilaos Stavrou
Рет қаралды 10 М.
Enter The Arena: Simplifying Memory Management (2023)
1:47:50
Ryan Fleury
Рет қаралды 35 М.
Emacs: Embark and my extras
33:22
Protesilaos Stavrou
Рет қаралды 8 М.