Skip to content

Use Embark to collect minibuffer candidates

embark’ is a remarkable package that lets you perform relevant, context-dependent actions using a prefix key (simplifying in the interest of brevity).

For our purposes, Embark can be used to produce a Dired listing directly from the minibuffer. Suppose the current note has links to three other notes. You might use the denote-find-link command to pick one via the minibuffer. But why not turn those three links into their own Dired listing? While in the minibuffer, invoke embark-act which you may have already bound to ‘C-.’ and then follow it up with ‘E’ (for the embark-export command).

This pattern can be repeated with any list of candidates, meaning that you can narrow the list by providing some input before eventually exporting the results with Embark.

Overall, this is very powerful and you might prefer it over doing the same thing directly in Dired, since you also benefit from all the power of the minibuffer (Narrow the list of files in Dired).