VOMPECCC is a masterclass in modular efficiency, proving that a perfectly tuned Emacs environment remains the ultimate cognitive lever for developers. It elegantly replaces IDE bloat with a surgical workflow that rewards the disciplined mind.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Emacs: Completion Showcase using VOMPECCC!Added:
Okay, this is my uh fifth uh video on Emacs completion. This one's going to be a bit more fun. Uh this is a showcase of the Vampe frameworks or the Vampe packages. So, what I'm going to demonstrate is a lot of workflows that you would typically be using as you're using these packages. And hopefully the value of using them becomes a little bit clearer uh in this way. Um there's more than a dozen in here. I probably need to fix this title. Um, but uh the mo the bulk of this post is going to be the video. I have put some text in here.
Basically, each workflow is going to get a header and then a very small uh description as to what it's doing. I've kept these very brief intentionally because the vast majority of the demonstration is going to be in the video. This is different from my other posts which are incredibly verbose uh which you would know. Um if if you're familiar with my videos or my blog posts rather um this one is going to be uh brief in pros uh but the video is probably going to be about 30 minutes or so. Um so with that I'm going to switch to Emacs. Uh and I'm going to actually run this from the org file that generated the blog post. Um and the reason I'm going to do this is because the demonstration is is really going to be inside of Emacs. Uh, so it's going to help uh it's going to help for that reason. I won't have to kind of switch back and forth in that way. So, let's dive in. Um, before I do, I just want to highlight a couple of things. You'll see in the top right hand side of my Emacs, and actually, let me make this a lot bigger so it's easier to read.
In the top right hand side of my Emacs, you're going to see the key bindings that I'm pressing and then the command that's associated with them. So here I'm pressing J, next line, K, previous line.
This is from evil mode. Um, this is going to help you follow along and understand exactly what keys I'm pressing and what commands they're associated with as we go through this demo. So with that, let's start with what I think is one of the most canonical demonstrations of uh these packages working together, which is something called consult RIP GP. So RIP Grep is essentially just a tool like GP.
It's a very fast version of that that allows you to search the code uh in any codebase or indeed your entire file system.
So I'm going to go ahead and run consult RIP GP here. Um, and we see no candidates in the mini buffer because I haven't typed anything in. I haven't typed anything in yet. Um, but if I type in something like, for example, Emacs, we're going to get a whole bunch of hits for that because I have a bunch of articles about Emacs. So, we see a bunch of uh we we see a bunch of um org files, which is how my posts get built uh with of course dozens of reference to Emacs.
What I can do which is really interesting with this is I can use embark exports. I'm going to export these and we can see that all of these results pop up into a dedicated first class EMAC buffer here.
Um this is a proper major mode optimized for this exact type of candidate set or this exact can category of candidate sets.
Uh, and just to prove that I can, uh, show you what the major mode is.
Major mode. Enter. We can see it's GP mode. Something that's really nifty that you can do in GP mode is that you can edit a bunch of um, uh, files at the same time. So, I'm going to show you how I do that. So, I'm going to highlight um, Emacs here. Um, capital EMAC. Uh, and potentially I don't want EMAC to be capitalized. There's not necessarily a reason why it has to be. Um, so I'm going to hit CP, uh, which is W gp change to W grep mode. Uh, and what that's going to allow me to do is it's actually going to let me edit these files from this buffer, which is incredibly convenient. Um, so rather than just EMAC like that, uh, I can do lowercase E max. And I won't make these changes because it might break something, but you would just have to hit control enter um in order to persist these changes. So that's super useful there. I'm going to go ahead and exit out of this buffer.
Go back to our post. So that's multifile refactoring. Again, super simple. You just hit consult RIP GRP. Search for whatever it is that you uh want to find.
In this case, it was Emacs. You hit embark export CP to make this buffer editable. And then I can go ahead and edit things to my heart's content.
Cool. Let's move on to the next one. So the next one is uh this async uh local two-stage search uh as I've called it.
We've seen this in action in the previous uh posts, but I'll demonstrate it here as well. So let's hit that consult RIP GRP again.
So there we see this pop up in the mini buffer. I'll type in something like emacs again. Um, and then anything that I type here is going to be sent directly to the rip gp process. And then rip grep is in an asynchronous way is materializing uh the matches as it finds them. That's really useful. Um, if I wanted to, let's say I wasn't searching something like my codebase, but my entire file system, that might be a pretty heavy operation.
And so I might want to basically interrupt or complete the request to rip GRP and then have the rest of the incremental computing completing read just occur inside of Emacs. So this is how I can do that. This is using orderless um or sorry actually this is using the consult async split character which is comma um and now what I can do is I can search for other matches um in in these same lines. So let's say uh I want to narrow things to where emacs and lisp are uh uh occurring together on the same line. Before I type that in, I just want to point out that you're seeing the number of matches pop up here. And I can show some more behavior here as well. If I hit em ah this doesn't seem to be responding. I think it's probably because there's some caching happening. So let me restart this.
So I'll go ahead and search for uh let me actually search for lisp this time.
So l i p we can see that the uh the candidates are appearing here. The number of candidates is appearing here because rip grip is relatively fast and this is not a huge codebase. Uh we're not seeing a lot of waiting. Um but typically let's say this was an API and we will see this later in the video. uh this would be an asterisk letting you know that that command that query to the back end is still in in progress. So that's quite useful, right? So we've got lisp uh and then let's look for uh emacs occurring on the same line. Um so we can see things this is working emac list etc etc. Um and then maybe uh anything that doesn't include um let's see find a way to filter this list here. Anything that let's say doesn't include web in it I can use orderless to do that. Again, for orderless, my component separator is the same character as my uh consult async split character. It's just intuitive for me to do that. Um, so the next uh thing in this uh uh query is going to be anything that doesn't contain the word web. So I've filtered out those occurrences there.
So again, everything before this first comma is being uh sent as a query to the backend tool, which in this case is RIP GRP. Everything after the comma is going to be me doing incremental completing read on that materialized candidate set from within Emacs. It's really really powerful.
Right, let's move on to the next one.
Um, so this is going to be a uh sort of a composite switcher. Um, there's a lot of commands built into Emacs that let you switch to buffers, files, bookmarks, uh, but they only let you, uh, do incremental completing read against one of those categories at a time. That's just how things work built in. What consult provides us, as we've seen in the past, is multissource uh, incremental completing read. So, we can have an interface that lets us switch to a buffer or a file or a bookmark, which is a nice convenience. And then another consult feature is that if we still want that sort of narrowing and that cohesion from this interface, we can use one of the narrowing keys. So let's see that in action. So I'm going to hit consult buffer. Um display this vertically.
And we can see here that I have buffers.
Hopefully this list isn't too long. Me go past the buffers. We can see that I have files.
And we can see I probably don't have many bookmarks on this machine.
But I pro I do have a bookmark. Um let's demonstrate the narrowing key. So if I wanted to just display the buffers, then I can hit B and then space. And we can see that I get this nice indication here that I'm looking at buffers. Um and of course if I scroll all the way down in this list, I'm not going to see anything except for buffers, which is really nice. Um if I want to return to get the uh full multissource candidate list, I can just hit backspace. Uh and then it's a bit difficult to see. you will have seen it with this count that's now gone up to 156. But now we can see that I do have files in this list again which is really nice.
So that is the uh unified switcher.
I am going to go oh actually one thing that I really do like this for is bookmarks. Um, sometimes if you're switching uh to a particular buffer, a particular file, uh it's nice to be able to also have a list of bookmarks or pointers or references that you've been either manually or automatically placing down in your files as you use Emacs. Um, and so very trivial demonstration of this again, I'm going to hit consult buffer again and then m space. And now I can see that my bookmarks are presented. I only have one on this machine about calling a bike shop. I like to ride a bike. Um, it's probably the only piece of private information I'll reveal in this video hopefully. Uh, but I use this all the time um in my daily driver version of Emacs.
So, that is a unified switcher. Next example here is going to be uh buffer and projectwide line search. If you have ever used Swiper, which I would imagine that most people who've used Emacs have come across Swiper or any other of um Ole Creel's packages, um Consult Line is basically a drop-in replacement for that. There's probably a few differences. Um but that's essentially what consult line is doing. And I won't demonstrate consult line multi because I don't use it that much. I typically use Consult Rip Grep. Um and I'll explain why in a moment. But let me show consult line. So I'm just going to hit consult line.
And what we can see um is completion that shows up. Right now I'm just seeing every single line in the buffer, but I can do incremental completing read on this. So let's say I just want to drop uh to search properties.
Interestingly, in the candidate list, I'm not getting a whole bunch of interesting information, right? because properties as it occurs on an individual line uh is always going to be the same.
Nothing is going to follow this like properties cookie uh I think they call it in org mode. Um so the candidate list is not very interesting. Something that consult provides is what's called preview mode and preview is essentially a uh arbitrary action taken on a particular candidate um that then displays in some buffer. Right? That's sort of the generic form of that. What's happening here is that we see the preview is that we're we're seeing in the buffer that we currently are searching in. We will see the match that we are on in the mini buffer will be presented up here in the main buffer. So that's that's the preview that's going on. So it it's useful in this situation because it takes what otherwise would have been a relatively useful list of candidates, right? I wouldn't know which one of these to jump to. But as I go through these with controll Jr. K, I can see that it's actually moving me through this buffer here. That's the preview in action. Um, you can turn preview off and I have for certain consult commands and you can still invoke it manually. Um, but at least in the consult line case it makes sense to leave it on. Um, and so a nice thing as well about this, and uh, this is something that a lot of people who use Emacs don't necessarily realize they can do, is that even though I'm in the mini buffer here looking for properties, if I find a preview that's interesting, let's say this one here, I can actually jump out of the mini buffer into the main buffer again, do some things like, let's say, copy, paste, rearrange, whatever I want to do, and then I can jump back to the mini buffer. I can exit this session and then it returns me back to where I was. This is really really nice for some kind of ad hoc file exp uh uh or I should say buffer exploration.
Um and because it is uh saving it the excursion in uh to use the EMAC lexicon um it actually returns me to where I was. So I don't have to let's say create a mark here then do what I'm interested in then come back to this mark. I can do this kind of ad hoc exploration knowing that I have an automatic return to um to where I was in the first place. So I really like consult line. There's also consult line multi. So I don't use this because consult line multi essentially does this same thing but it does it for any buffer that's open within a project.
To me it's more useful to use consult rip grep which I've already demonstrated because you don't have to have the buffers open. it will actually search through the files and you can still get some kind of preview behavior if you like. Um, which can be in in my opinion much more powerful than consult line multi. I would imagine one of the only cases to use consult line multi would be if your file system is extremely large.
But even when I'm doing consult rip grep from the home directory for example because rip grep is a so fast and because consult is providing me this asynchronous sort of stream of of rip grep's results and I don't have to do any waiting um I find that rip gp works for me in almost all cases it would be difficult for me to imagine an exception to that to be honest so that is consult line now let's check out code symbol navigation in. So, there's something called iMenu. This is actually built into Emacs. It's very useful. Um, but like many of the things that are built in, it's not super ergonomic out of the box. Uh, consult menu improves on this a lot more. And there's an analog to consult line multi. We have consult menu multi. Um, so if I do I might need to open some code for this. I'm just trying to think of what I should open.
All right. I'm working on a package called toucht type. So I'm going to open this uh and actually let me open up ded so I can view the files in this project.
Let me open up the main file. See if there's enough.
Yeah, there's enough code in here for this to be interesting. So in this code file or indeed any code file, you're going to have a bunch of these things like functions, variables, etc., etc. It's nice to be able to see uh all of those things presented in a cohesive list. Of course, you could reconstitute this by doing something like uh let's say consult line. Oops.
Yeah, consult line and then searching for example defun and then you would see all of the defuns. Uh, but you would probably get false positives for this, I would imagine. Uh, and also this only works for functions. If you wanted to get functions and variables and other types of symbols to show up here, you would need to use a fancy regular expression, which is possible, but it's not as convenient as for example just doing consult menu and then we can see all of these symbols presented. And because we have marginalia activated, we can actually see commands, regular functions, we can see dock strings. Um, which is massively useful. Uh, so for example, if I wanted to look at, let's say, functions that have um that mention the word uh English, right? Because I see that in a lot of dock strings here.
Um, just off the top of my head, hey, maybe that's something I want to change because maybe my next extension to this package is going to be supporting other corpuses of words that aren't in, let's say, the Oxford English dictionary or something. Um, I want to find all of the functions that mention this. So, I could use the narrowing key F to scope this only to functions. Uh, and then I can search for the word English in the annotations. Right? Again, I'm not the word English doesn't appear in the function name. I'm using orderless in order to match against the annotations provided by marginalia here.
And so here I see those four functions.
This is what I'd need to change. That's really useful. So that's consult I menu.
And then yeah, that's probably all I want to show there. Again, I don't really use these multi- functions. It's really because you have to have the buffers open. There's typically alternatives.
Normally when you're writing code you'd be using something like a language server protocol or LSP. Um typically that's where you would get your that would be your symbol provider if you will not consult I menu but if you're in just one file that has a bunch of code and that is extremely common for Emacs packages console I menu is your friend there and it works not just in code buffers um but also regular buffers as well. Uh, okay.
Documentation search. So, this one I really like. Um, one thing that makes Emacs so much more powerful than other text editors is the fact that it's so uh, introspectable.
That's a long, it's a big word. What does it mean? It basically just means that any feature, function, variable, any piece of the entire system, you can inspect it very, very easily. whether you want to look at the documentation, whether you want to look at the source code. Um, this is also called, I think, discoverability. Um, and it's really one of the keys that makes Emacs so easy to use. Uh, again, there's a built-in facility for browsing the info manuals.
Um, but consult info makes this a lot easier. And one really cool thing is that it doesn't just work with um the uh info that you would get out of the box.
If you install other info as well, um then you can search for that too. For example, you will see man pages uh in action here as well. It's one thing that's always sort of frustrated me about um using the man command in uh the terminal is that you you have to browse the documentation in a less uh buffer if you will. um which is not as convenient as having the whole thing in an Emacs buffer where you can do things like highlight, copy, paste. It's fully integrated with the rest of the Emac system. So, I'm going to go ahead and hit consult info.
We're going to see a bunch of things come up here. Um so, Emacs being a relatively obvious one, Elisp, uh let's look at GP because this is going to be a man page. Um and within Grep, I'm just going to search for the term uh Grep. We can can see we we can see the automatic consult preview in action here. Of course, Grep is appearing on the first page uh in this manual uh and we can go through the matches here. Um and it will actually go through the documentation for us wherever the word GP occurs, which is really really useful. I use this all the time. Uh I don't use man pages anymore. Uh I use consult info to access all this stuff. Okay. It also works, of course, with the um the built-in documentation. So, I'm going to do consult info again. Uh and this time, I'm going to take a look at Elisp. Um and I'm going to search for Okay, so recently someone asked about uh display uh display buffer control um in Emacs. So, I'm just going to type in uh I know exactly what those functions are called and those uh what those A-Lists are called, but I'm just going to sort of type in a naive search just to prove that this is an extremely useful facility for finding anything in Emacs.
As long as you can sort of think of uh relevant words that would match that concept. So, I'm going to type in display and buffer. Again, we see the automatic preview in action and I can type through these matches. Let me move my cursor out of there. We can type through uh these matches here. Um, so I can see a bunch of interesting things here. I'm kind of looking for the the the mention of a function. So it might be wise for me to include a hyphen in here. Um, okay. So now we can see uh certain things. So display hyphen buffer. So that's going to give me a clue as to what this thing might be called. Um, let's see.
And I'm looking up here now. Um, I'm I'm kind of doing a combination. This is why I like the preview um, for this particular case because I'm seeing both the single line excerpt uh, of what line matched, but I'm also in the main buffer. I'm seeing the full context of everything here. Um, so I'm just going to keep on tabbing through. Again, I know exactly where to find this. I just want to demonstrate what this kind of discoverability looks like in practice.
So, I'm going to keep going. Display buffer. Maybe display buffer settings. Setting reports. Display buffer base action.
You know what? So, this part of the manual looks like a pretty good match for what I need. So, I'm actually just going to hit enter on one of these. The zen of buffer display just seems like it would be relevant.
We've got this thing here, the precedence of action functions.
Okay, interesting. These are a bunch of So this makes semantic sense to me.
Display buffer same window. Display buffer reuse window. So these are probably the hook points uh that I would want to access in the Emacs API. Right?
If I'm going to be customizing, for example, if I want um a window to display and a side buffer, for example, I wonder if it mentions that in here. Side or side window. Maybe maybe let me do another search. So, consult info uh for let's say ELISP.
Oh, I'm already in I'm already in ELISP, which is happening because I'm actually already in the info mode um in the ELISP manual. Uh so I'm not getting that choice there, which is actually quite convenient. Um so it was side window.
So, display side window.
See if that returns any matches.
Displaying buffers and side windows.
There's a whole page on that. Brilliant.
So, that's consult info in action. I'm going to close uh the info buffer.
And that just about wraps that up. There is consult man which is built into into consult but again I just I don't think it's worth using man when all of that information is going to be accessible inside of the uh Emacs info system. Just a slight aside the info system is very very powerful uh and you can install a bunch of extra info uh into that system if you want to make it searchable in this way. Right. Next one is going to be find commands by dock string. So everybody knows about Meta X. It's a bit of a meme. Essentially what this does is it shows you all of the interactive commands that you can run. So things like consult info, GP, consult I menu. I have precient enabled. So we're seeing my most recently chosen things appear first here. So, meta X and then because we have marginalia enabled, we can see on the right hand side here that we get the dock strings or at least part of the dock strings for each of these commands. So, what I can do is I can use order list to search for things that may not occur in the command name uh but do occur in the dock string.
So, let's say um actually let's use sort of a self-referential example here. So, let's type in uh consult. So, this is going to show me any commands that begin with consult.
And then I can see all of these um all these matches here. I know that there's a lot of stuff I have uh installed with consult that's relevant to git. So, I'm going to use the orderless component separator here. And then I'm going to search through the marginalia for git.
And so, I have 34 matches here. And we can notice that some of these right like consult ghun list that does not have git in the candidate list. So order list is actually really um is really saving us here because it's allowing us to match for the git that shows up in the dock string. So that's really useful.
I think that's all I want to mention with that. Let's move on to the next one. Now we're going to look at doing uh or taking actions on multiple candidates in a candidate set using embark act uh all um so I might actually let's see okay let me open up here's a good example so there is this there's this action you can take. So let's say I pull up meta x here.
I do have the doc string but I maybe I want the full help on this function.
Right? Again discoverability. I want to learn a little bit more about this function. To use a single embark action I can hit embark act and then h for help. And this pops up a help buffer which is really useful. I can now look through the dock string the signature which you don't get from the completions buffer. And I can actually go ahead and look at the source code as well, which is really cool, by just uh pressing that button in the help buffer. I'm going to close this.
So, what if I wanted to do this in bulk for a bunch of different candidates? I can do that pretty easily. So, I'm going to bring up Meta X. I'm going to type in consult to reveal all the consult commands. And let's say I want to uh look at this one, this one and this one.
I'm highlighting these by using embark select which I have bound to control space which I think is a logical key binding. And then what I can do is I can do embark and then there is this embark action for embark act all. So I'm going to hit capital A.
So now I am acting on all of these and then I can hit a different action in order to take uh in order to execute that action on this full set of candidates that I've highlighted. So that's going to be H for help. And now uh actually so this was a bad example because the help buffer replaces itself.
Um maybe helpful would be a better one.
I wonder if I have that set up in uh meta x. Let's see.
It's there. So, H for help. Is there helpful?
I don't know if I do, but actually, so this might be um this might be a good time to demonstrate that this kind of thing when you're executing an action with embark. You you're not limited to actions that just appear in these embark maps that you've set up. You can actually use any command. I haven't tried this before, so this might fail, but uh let me try it. So, I'm going to do meta x again. I'm going to type in consult. I'm going to highlight a few of these.
I'm going to hit uh let's see.
I'm going to hit control or uh embark act. Embark act all. And then I'm going to hit meta x for helpful uh helpful command.
Hit enter.
It's doing some work. And now we can see that I have one helpful buffer for each of these commands that I've highlighted.
Awesome. I did fumble through that demo because the initial help part didn't um didn't work. But I have accidentally demonstrated one of the really powerful features of embark that I forgot to put in the pros which is that when you're doing embark act again you can use any uh you can use any command uh as an action. It doesn't have to be bound to a key map. I think the only rule is that it has to be able to optionally accept a candidate. But as long as you have that interface then or as long as you abide by that contract then the functions those commands that you write will work within bark which is really really nice.
So I'm going to exit out of some of these help buffers.
I'm going to exit out of this one as well. And that's about everything I wanted to demonstrate with embark act all. One thing you can do that uh I didn't mention although I typically never do this is you can very greedily take an action on every single uh candidate in the list without having to accept it by just using embark bark act all without doing any embark select in the first place. you I think you would have to be really confident in your incremental completing read queries filtering your candidate set to just what you're interested in acting upon.
Um but I could I could definitely see people using that uh facility. I personally almost always do embark select and then I do embark act all on those selected candidates.
Right. Next one. So this one is demonstrating something called embark become. This is another action that's built into embark. Um and this can be useful because sometimes you might pull up an incremental completing read interface like let's say find file uh but maybe you or actually um it would be better to demonstrate this the other way around. Maybe you want to switch to a buffer but you realize that you haven't opened the file associated with that buffer. So if you try and switch to that buffer, it's not going to appear in the candidate list because it's not a buffer yet, right? So let's say I do um this isn't a consult command, but let's say I do uh not list buffers. Let me close this the ICR version.
Switch to buffer. So this only has buffers in it, right? So let's say I wanted to uh open up something. Trying to think of a good example here. Um, let's say I wanted to open up um my Emacs to-do list for example. I might end up leaking some private information here, but I know that this is called Emac to-do. Uh, I see I haven't opened this file yet. rather than exiting out completely and then having to bring up a new uh incremental completing read interface and in doing so also lose the query that I've typed in. What I can do is do embark act capital B for become and then I can just choose what to turn this into. Uh and in my case I want to turn it into find file and then that's the interface that I have. Um if I was in the right directory then it would have presented some matches. Maybe there's something I can switch to that would that would be a bit more s or or that would present this in the in the list.
So I know I have recent f enabled. So maybe I can do uh embark become and I can do meta x uh and I can change this to recent f maybe. I don't know if this will work so bear with me.
Aha, that works. And so now I get these matches uh which are coming from my log seek directory. Again, that's another demonstration of the fact that you don't have to have that function bound to an embark key map in order to be able to uh switch to it using embark.
It's one of the I think really really elegant things about uh how embark is designed. Uh and it's it's useful. I use this all the time because I'm constantly accidentally accidentally bringing up the wrong interface and then I have to I without embark I would have to switch out and then it it it's it's sort of context switching it and interrupts your flow. Embark become gives you a much more graceful way to switch to the completion candidates that you're actually interested in.
So that's embark.
Next one is going to be uh symbol aware multifile refactoring. Um, this is uh something that most people would be familiar with if they've used XREF before. Um, I'm actually I'm not going to demonstrate this one. I'll leave this as an exercise because we've basically demonstrated this with um with RIP GP as I've noted here. So, it it's the same exact uh utility. I may end up deleting this from the post actually because it seems redundant. Um the only difference is that you're not grepping through uh any occurrence of a search string using regular expressions. What you're actually doing is you are materializing the complete set of symbols in a particular uh project using something like XREF and then you're able to search through those. The reason this is quite useful is because I'm going on a bit of a tangent here, but um Emacs or sorry XREF in which is built into Emacs can use different uh symbol providers if you will. So if you were using XREF find references from within let's say an ELIS buffer um it's using Emacs's own uh XREF provider because it understands Emacs list very well, right?
But what if you're using a different programming language, whether it be Python, Rust, Erl, Lang, whatever. They all have symbols, but Emacs doesn't have a way from the top of its head uh to understand what those symbols are, how to pass them out, which one's a function, which one's a variable, etc. In those cases, you would typically have something like a symbol provider, which is almost certainly going to be a language server protocol. You might get that through, let's say, LSP mode, or you might get that through e-glots, which is the other one that's built into Emacs. Those would then provide the symbols. Um, the fact that Consult is able to hook into this is what makes it powerful. Um, I won't demonstrate that right now because we've already demonstrated the UI of this a little bit. Uh, and I also don't have any um I don't have any non-ELLP projects on this machine at the moment. So not going to demo that one but it is useful. I recommend you do it on your end. The next one is going to be looking at recent files on the file system. Uh and then using this uh with embark as well to sort of get this like interactive recent file explorer uh which can be uh which can be useful. So I'm going to do consult recent file.
Of course this is going to show me all my recent files. Again I've got consult doing some auto preview for me. So, it's automatically opening these. Um, and in fact, it will close these again if I choose not to uh keep them open. If I hit Ctrl+G, we can see all of those buffers close. So, it can be useful for exploration in that way. But, as promised, I want to show how we can get all of these files using embark export into their sort of first class Emacs buffer in the most appropriate major mode. So, we can just do embark export. Embark knows that these are files and so it's going to me minimize this um and so it's going to open these in a uh in a dur buffer I think. Is this ded bear with me oh it is ded? Yes. Okay. So I can delete files. I can move files. I can rename files. Right. This becomes sort of a file manager for any file that you've opened recently, for example. I don't personally use that kind of thing, but um it's just a good way to demonstrate how embark export uh can send your candidates to an appropriate major mode in their own buffer.
Right. Next up is AV style jump and then act. This one is cool because it saves you a lot of keystrokes in some cases.
So, let's say I have uh let's do meta x again. Um I'm going to use vertigo to display this in a buffer in my side window, which is how I've got got it configured to um to display. Let's say I want to execute one of these commands like dur for example. Um but I don't want to go jr jr j so many times and I also don't want to just type in dred because I already see it. the convenience binding for for reaching that um is going to be something called vertico quick exit which I've got bound to C uh quote and then what we can see is this AV style key list here and so if I wanted to hit uh let's say I wanted to hit I menu here I don't have to scroll down to it I can just hit K A and then it executes I menu which is really nice and we can see that I menu interface down here.
I you I I do use that one uh all the time.
Next one is going to be resuming the last completion session. So let's say I have uh I'm doing consult line and I'm looking for all of the occurrences of let's say Vertico in this document. Uh not Vertico, Vertico. So I can see all of these matches here. Uh, and then let's say um I want to select one of these matches. Uh, actually let's just select this one because this is exactly where we were in the document. So I'll select that. It brings me here. If I wanted to repeat that exact thing, if I wanted to sort of re-enter that session at the moment right before it exited with the search string in there, I can hit vertico repeat.
And we can see that I get consult line again. I get my uh exactly what I had typed in before my search query vertico.
Uh and it works just as we would have expected before.
This is really really useful. Um I I use this all the time. It's especially useful if let's say you're searching for a file or trying to switch to a buffer.
You accidentally click on the wrong one, but you don't want to have to go ahead and remember exactly what switcher you open. type in the search query again.
You can just hit vertico repeat and you're right back where you left off. Um it makes things really really fluid. I really like this feature.
Um this one is on replaying uh any complex command. I might I'm actually going to skip this one because I it seems like there are issues with this on my machine. But the rough idea is that um Emacs is recording uh what it calls complex commands. So not necessarily just the command that you typed in, but if it was an interactive command, also any arguments that you supplied to that command. So I I will demonstrate this, but just keep in mind with a pinch of salt that um it doesn't seem to be pulling all of my complex commands and some of them not in the way that I would have expected. So if I hit consult complex command in theory anything that I have executed recently it's going to come out here in a way that I can completely um completely rerun it. So theoretically if I hit let's say uh find file and then selected a file I should see that full command here. So if I wanted to repeat that I wouldn't have to reopen Vertico again and then select the file. I could just repeat that action here. But as you can probably see, there are some things that we've done uh some complex commands we've executed recently um that are not showing up uh here. So I may end up removing this or I I may I may fix this on my end. Not sure. So there's many many other built-in commands uh to um for consult and embark and marginal and all of these things.
Um, your entry point to most of these workflows is really going to be a consult command as you've seen. Uh, although because of the way that voek is designed, they all use and share the emacs um, built-in um, completion primitives. So, a lot of these things like embark for example works in non-conult uh, completing reads, right? It works anywhere. Um, you actually can use embark in my opinion really fortuitously.
uh without any of the other parts of the vamp framework. And I don't want to overstate this, but I do think that if you are going to install any of the vomp packages, embark should be the one that you install first. It completely transforms the way that you can interact with Emacs. um because you can bind any arbitrary action to any arbitrary thing whether that's a completion candidate or indeed uh a word um in a buffer. So I can embark act on this word embark act or this line rather uh and then I have a bunch of actions there that makes it incredibly powerful. I almost like to think about it as sort of a conceptual extension of this notion of hyperlinking where there are two important enhancements being made. The way hyperlinks work on the worldwide web is you have to sort of provide some kind of URN or URL that links to another resource and then when you click on it the action the default action is that it takes you to that place. How does Embark extend that? Well, you don't have to provide hyperlinks for anything. you can define an arbitrary set of types that can match again any arbitrary thing in Emacs and then in addition to let's say some kind of hyperlinking or default action that you might apply to that thing that has been detected you can apply a arbitrary number of actions. So, it's sort of taking the the utility that something like hyperlinking brought to the worldwide web, extending that in ways that are almost difficult to describe uh and applying that concept to your Emacs. Uh which is such an massively powerful thing um that again I think it's difficult to overstate how useful it is. And I do recommend that if you're going to look into any of these packages, Embark should be the first one that you look into. Um, I've got some bonus demonstrations here. Uh, but before I do, uh, what I wanted to show, again, this is a bit of a self self-referential demo, but if you wanted to find out all of the consult commands that are available to you, of course, you can use meta x to do that, um, or describe command or anything else that provides a completion candidate set for commands.
Um, and then I can either ad hoc just scroll through this list exploring the documentation or I can export this or rather collected. I used embark collect not export to collect this. Uh and then I can just go through and try these at my leisure. So if I press enter on consult I menu um then an i menu shows up in the buffer from which I materialize this list. Massively useful um and also just a great way to explore.
I can say this is one of the features I use um most of the time not just for consult but whenever I download a new package or install a new package in Emacs the first thing I want to do is to understand what commands are available to me as a consumer of this package and the way that you materialize that list is meta x you just type in because of the way things are namespaced in emacs you just type in the name of that package uh maybe with a regular expression to ensure you don't have maybe false positives like this one and then you export that so it lives in its own buffer and then I I typically just go through one by one uh just exploring what kind of commands uh I can um I can use also highlighting this is provided by marginalia by the way also highlighting which ones have already been bound to a key by the package author those ones would probably be the most important ones and then maybe to highlight something else that would be useful just off the top of my head. So the commands that a package provides is not the full surface that you have access to, right? This is Emacs. So you can use uh you know variables, you can use uh just regular functions, right? that aren't necessarily interactive commands, but you might want to avoid using anything that would be uh signaled as a private method or a private function. Um, so for example, if I wanted to see um I wonder if marginalia has commands, it only has one command. That's probably not a good example. Um maybe embark. So embark.
So I'm looking at all the functions that embark provides. And something that we can see here is that some of these are commands. Marginali is providing this information for us. Some of them are functions and some of them are functions that are uh not private. For those that don't know, in ELSP, the convention is that you use this double hyphen um after the name space of a uh a variable or a function in order to signal to the end user, hey, you probably shouldn't use this. This is a private method. um you can still use it. There's nothing stopping you. And I think different people have different philosophies on whether or not there really is such a thing as a private method. Um or a private function in Emacs. Um but it's just you're probably going to save yourself time in the future to avoid using these private um methods. So I might want to look at okay all the functions right which by the way this does include commands as well but let's say all the functions um I'm going to use orderless here to make sure that I'm not including anything with the double hyphen. So now I've removed all of those private methods here right um and then maybe I also want to specify that I'm uh that I only want to look at functions not commands. I don't know if there's an easy way to do that cuz it's only being indicated with a single letter, but let's try it anyway. So, I only want to look at functions.
Maybe it's I only want to look at things that are not commands, maybe.
Not sure. Um, I'll cop out and say that's an exercise for the reader. Um, but I think if this marginality was presented in a little bit more of a um a fine grained way, it would be easier to match just just functions uh for example uh and and not commands. But I think the real utility here with orderless is that um you know I don't have to look at these uh I don't have to look at the private methods that I really shouldn't be using um and then I won't be tempted to use them. So again, that's a bit more of a self-referential demo there, but that's how you can sort of use these Vamp frameworks to discover more about um how to use these packages, right?
That's kind of the beauty of it is that they themselves facilitate your understanding of them. I I think that's really nice and that's like really really deeply uh ingrained in the in the overall Emacs vibe and philosophy. So now we're going to look at some bonuses.
So everything I've shown up until this point is built into vamp. So you will get those consult commands, you'll get those embark commands um etc. and all of the marginalia and all that stuff uh if you just install the packages. Um but other package authors have now begun to build things on top of um on top of uh vamp which is really nice. Um so I'm actually going to come back to this one.
I'm going to mark it because this is uh going to be talking about kfu and cape which is inbuffer completion. Um I want to focus on the mini buffer for now. So here we have this maggit style working copy as completion. Um this has limited utility. I I I do think the package author might need to extend this with some embark uh commands or maybe I need to do that myself. Um, but this can be a nice on the-fly alternative to opening up the MGIT status buffer, which although I do love MIGIT a lot, uh, and I do use it every day, it can sometimes just be a little bit um, clunky to be looking through uh, your status and everything. Um, if you're using the mgit buffer, it's nice to be able to hit something like consult lsgit.
Let me display this vertically. And then you can see uh the status buffer here or sorry you can see um get status basically the output of that and in the marginalia you can see whether or not it's staged. So that's really nice to just get a quick glance. You can also see I believe you can see unttracked files as well which is what we're looking at here.
There's probably other categories as well and there's a nice pre preview. There's tracked files as well. Um, so this can be a nice replacement to uh maggot and because it has the facilities of consult like the preview. Um, it's just it in my opinion it's simply better for ad hoc exploration of your uh of sort of the state of your version control in a particular project. going to hit control G to exit out of that.
Returns me to exactly where I was. Um, again, I think I need to add these embark actions. But for example, if I do this again and then let's say uh let's bring up this org file. If I wanted to, let's say uh track this file, I don't think, unless I'm mistaken, I don't think that there's a way to do this.
I might need to add those functions or I could just use meta x and probably use some kind of megit function steal something like that. But I haven't figured out what that was yet. It would be nice if that was either part of the consult lsgit package or maybe part of like an embark lsit package that would be separate in order to maintain that cohesion there. One thing I do want to demonstrate, I probably should have had a full workflow for this, but a lot of people dislike witch key. Um, I'm one of those people. I've tried to improve it.
It is shockingly difficult to configure which key. I I don't know. I don't really know the reasons for that. Um, based on the internals. Uh, but just in my experience, it's been almost a fool's errand to try and get which key to behave. Um, embark lets you basically pull up all of those um, embark actions into its own completing read here, which is really nice. And so now I can um, I can just go through these. I also get a lot more information, right? I get the dock string and all that good stuff. I can export these into their own buffer if I want to just study it and remember it.
Um, importantly, I don't have to look through a massive list and then hit the key that I want. I can just search for it here. So, the use case here would be looking for anything related to git. And again, we see that there's no um there's no commands for doing any kind of git based actions on these files. Uh, which is fine, easy to extend. Um, but I just wanted to point that out there. Uh, and then also because this is Vertico, if I wanted to get this to look a bit more like the witch key buffer, um, and this isn't this isn't my trick. I forget who I forget who recommended this. I think it was one of the authors of the Vamp packages, but you can use Vertico to explain to display things in a grid. And then this is much more witch key like, right? And in fact is a bit more compact.
So that's really really nice there.
Going to exit out of this. So that is consult lsgit. Again that's a third party package not included with any of the vomp ones.
This one consult gh is extremely powerful. Uh the guy that makes this package is awesome. His name is Armen Darvish and he makes this and one that I'm going to demonstrate in a bit called consult omni. But this package provides a utility that I've wanted for such a long time. But I think it also uh leverages consult in a way that uh is I think inspiring and should be followed um and and emulated by a lot of the other people who are using consult. So we've mentioned that one of the facilities of consult is that it provides you with this ability to make asynchronous requests against a certain backend. Right? I've I have for a very long time wanted to build basically an interface to git uh sorry not git but to GitHub um because obviously that's where all of the code lives right um whether you're working in like an organization or if you're just exploring the you know the universe for code this is extremely useful uh and I understand there is a bit of an anti-Gitub thing going on at the moment I'm not endorsing GitHub you can you know dependency invert github hub for codeber or whatever it is that you like to use. The point is that Armen is using consult in such a way that really really makes one this async feature of consult shine. Um so you can do really cool things like this, right? So I don't I'm not limited to searching things that are on my computer. Like let's say I just want to search for all of the repositories on GitHub, right? Which sounds like an enormous candidate set and it is. It probably is too enormous to really fit into Emacs. I don't have a incredibly powerful machine. Probably cause it to slow down. But because we can use GitHub's API to basically query against those repos and consult can leverage that we can very very easily effortlessly explode explore literally all of the code on the internet or all of the repos on the internet. Um and it behaves as if we were just doing very quick incremental completing read locally. And so I'll demonstrate this.
So let's look for or let's do consult gh search repos not user repos that would be just my repos I want to search all the repos so let's do something let's do something relevant so let's look for marginalia and we can see that asterisk because it's doing some work and then it returns some results Right. So I can see this thing from base camp. I can see marginalia search. Uh CLJ Commons has something called marginalia. Not sure if that's related. Um but I know that marginalia is related to the mini buffer. Um and I'm being a little cheeky because I see the repo that I'm interested in here. But um let's say if this list was huge, I'd probably want to match stuff uh that pertains to the mini buffer. So I can do that local ICR by using the consult async split style here. And and this is honest to goodness a search of all of the repos on GitHub, right? But that was so quick and effortless effortless that it almost feels as if I'm searching through that that unfathom unfathomably large corpus of text uh on my own machine. I think that's incredible. Um I have my own packages that do a similar sort of thing. I just think that this use case is is so useful and it demonstrates to me this should be I think like the reference implementation for like a really really strong uh consult package that's providing interface to an external API.
Um and also because this is using consult I can use consult preview and this is where things I where you can see how carefully I think Armen has considered the development of these packages. So if I hit consult preview which I've got bound to control equal sign then the preview is actually the readme of this file and I can interact with this. It's presented in org mode. I can copy things. Um it's just amazing.
Uh so I'm going to go back into the mini buffer. hit G and then everything disappears. Um, so amazingly useful if you want to do ad hoc exploration of Emacs packages. If if you work at an organization, you can refine that query that's been sent to GitHub to match only repos that are in your organization. Uh, and then you can explore the Mad Hawk.
There's probably no better way to get familiar with a new company's code than doing something like that. Um, and the whole thing is effortless. So I I I I really really like this package. So much so that I'm going to demonstrate another feature of it which is consult gh search code. So of course it's powerful to search through all the repos, but you can literally search all of the code on GitHub and and it's just as effortless.
Um you can probably tell how much I like this package um by how enthused I am.
But uh let's go ahead and demonstrate this. So, consult uh GH search code. I think I've done this recently. Consult GH search code.
Um, and then let's search for recursive mini buffers. Recursive mini buffers.
Boom. We get a bunch of hits. And I can see all of the places that recursive mini buffers are are mentioned. I've probably got a uh a cap on the number of results that get returned. Um, but you can refine this query if you're looking for something more specific. And you will often find that the candidate set itself will actually help you feed back into your search query in order to refine things. So, this is really awesome. We can see it's mentioned in the selectum package, which is an alternative to Vertico, by the way. I really like that, too. Um, I recommend you check that out. um probably in a lot of people's um a lot of people's personal configurations, but yeah, just effortlessly effortlessly being able to search all of the code on GitHub is just such an amazing um superpower to have. And then finally, um this is where I think I would say this is probably the edge of the envelope, what we're about to demonstrate with Consult Omni. Um also made by Armen Darvish. Definitely check out his GitHub because he has other packages as well. I think he has one from uh emails which I'm going to be installing on my machine this week. This one is a bit more generic. So he's sort of provided another layer of abstraction on top of consult that provides um sort of multi-web search and you'll see what I mean. So sometimes if I'm searching for something I might go to Google and Google's going to give me some results and of course there's consult uh interfaces for that. But sometimes I want to cast a bit of a wider net, right? And I might want to search for um Google. I might want to search Wikipedia, right? If there's already an article for the concept that I'm uh that I'm querying for. Um Stack Overflow, right? If I've got a question, YouTube certainly. And then even things like GPEL, um or uh I should say an LLM, right? If I want like a one-s sentence response to a question that I have, um it can provide me that as well. So, let me demonstrate this. I'm going to do consult omni web and I'm going to type in a query. Um, I should phrase it phrase it like a question. So, GPTEL comes back with something meaningful.
So, I want to do uh how about what is Emacs? I'm going to display this vertically. So we have some results from Brave autosuggest here which can be useful if you want some kind of semantic completion um based on what you've typed in that can help you to refine your search query um because it's kind of surfacing the most relevant concepts to what you typed in. Oops. Uh dictating interesting I accidentally dictated something there.
So, one second.
I don't know why that's happening.
Let me open up Consult Omni again.
Hopefully, it's not going to dictate what I'm saying. Okay, good. I think we fixed that issue. It's very confusing because I know that Mac OS dictation does not work in my version of Emac. So, I was surprised to see that in there.
Um, why has that done that?
Got to fix my camera. Technical difficulties here. Okay, now it's tracking me again. Um, I might have to edit that out of the video because the camera was pointing in a completely different place.
So consult Omni.
I can type in a search query like what is Emacs?
And so now I can see these Brave autosuggest things come up. I can see a one-s sentence response from GPTEL, a powerful text editor with extensible features and customization. I can see Stack Overflow answers um and so on and so forth, right? Actual search results from Brave, right? This is not the autosuggest.
These are web pages. Um, Wikipedia entries, there's one for Emacs. I'm surprised there's one for Doom Emacs.
Um, things like YouTube. Uh, and I have consult preview, right? So, if I don't want to just jump directly to this website, I just want to kind of get a quick look at what's in there, I can, for example, go to the um, Emacs Lisp website.
It's going to render that HTML probably.
It's taking a while because this is a large Wikipedia article.
Ah, more technical difficulties. Emacs is frozen. There we go.
I think it probably had to compile something in order to do that. Um, because I I'm using autoloads extensively. So, if I do this, let's say again on the Emacs page, might be a bit quicker. Maybe not. I don't know why this is going so slowly.
Could be an issue with my computer. It probably is because it says I'm using 99% of my CPU, which is a bit crazy.
Just going to let this do its thing.
Wikipedia articles are very long. Um, so usually the previews are quicker on other pages. So let me demonstrate that.
So the Stack Overflow answer, what are the major differences between Emacs list and common list? Let me take a look at that.
And so yeah, now I can see the Stack Overflow answer.
Awesome. I'm going to go back to the mini buffer and exit out of that. So that is consult Omni. Super useful. Um, and then I didn't show this, but you can even if you hit preview on the GPEL candidate, it will actually uh complete that prompt for you, which is really nice.
That's about it. Um again I think a great way to explore what you have access to is just doing meta x consult and then embark collect that and you'll see for example I have um I have just under 250 or I think exactly 250 consult commands on my machine. Um, and again I can focus on which ones would be most useful because I can see the ones that have key bindings. Um, just really nice. So yeah, have fun with consult and uh, yeah, feel free to send any questions um, to any of my uh, contact channels. Um, highly recommend you use these packages. They've completely changed the way that I use Emacs and I think they'll change the way that you use Emacs as well.
Related Videos
VALORANT's Latest 'Exclusive' Tier Bundle is Rough...
KangaValorant
17K views•2026-05-28
Flight Attendant Mocks Poor Looking Black Woman — Mid Air Announcement Exposes Her Real Power
SkyboundStories-b4r
184 views•2026-05-28
I FIXED My Friend’s Blown Turbo RX-8… Then Sold It
Cameron-RX8
134 views•2026-05-28
NewsWatch 12 at 5: Top Stories
NewsWatch12
1K views•2026-05-28
Simon Jordan & Danny Murphy deliver PREDICTIONS for Arsenal's Champions League FINAL with PSG
talkSPORTArsenal
6K views•2026-05-28
Botting is OUT OF CONTROL in Classic WoW (Again)...
SolheimGaming
108 views•2026-05-28
The "AI Job Apocalypse" is CANCELLED!
WesRoth
9K views•2026-05-28
STREET FIGHTER 6 - INGRID Story Walkthrough @ 4K 60ᶠᵖˢ ✔
RajmanGamingHD
12K views•2026-05-28











