23 lines
1.9 KiB
Plaintext
23 lines
1.9 KiB
Plaintext
<p>This article is a quick follow-up on yesterday’s post on <a href="https://emacsredux.com/blog/2021/11/24/redo-complex-command/">redoing complex
|
||
commands</a>. I’ve noticed today
|
||
that the popular Emacs package <a href="https://github.com/minad/consult">consult</a>
|
||
offers a much more powerful version of the built-in <code class="language-plaintext highlighter-rouge">repeat-complex-command</code>
|
||
command. The <code class="language-plaintext highlighter-rouge">consult</code> version is named <code class="language-plaintext highlighter-rouge">consult-complex-command</code> and has a
|
||
couple of nice advantages:</p>
|
||
|
||
<ul>
|
||
<li>candidate filtering</li>
|
||
<li>TAB-completion</li>
|
||
</ul>
|
||
|
||
<p><img alt="consult-complex-command.png" src="https://emacsredux.com/assets/images/consult-complex-command.png" /></p>
|
||
|
||
<p>Basically, it’s lot faster to find what you’re looking for. If you’re into <code class="language-plaintext highlighter-rouge">consult</code> I’d suggest just using its version in place of the built-in command:</p>
|
||
|
||
<div class="language-emacs-lisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nv">global-set-key</span> <span class="nv">[remap</span> <span class="nv">repeat-complex-command]</span> <span class="nf">#'</span><span class="nv">consult-complex-command</span><span class="p">)</span>
|
||
</code></pre></div></div>
|
||
|
||
<p>You can invoke <code class="language-plaintext highlighter-rouge">consult-complex-command</code> with <code class="language-plaintext highlighter-rouge">C-x M-:</code> or <code class="language-plaintext highlighter-rouge">C-x ESC ESC</code>.</p>
|
||
|
||
<p>That’s all I have for you today. The <code class="language-plaintext highlighter-rouge">consult</code> package is full of powerful versions
|
||
of built-in Emacs commands, so you’ll do well to spend some time exploring it. I know I will!</p> |