summaryrefslogtreecommitdiff
path: root/devdocs/elisp/minibuffer-commands.html
blob: 6286e5bcb93fee4bd33a911f935e9f297ed7a28e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 <h3 class="section">Minibuffer Commands</h3> <p>This section describes some commands meant for use in the minibuffer. </p> <dl> <dt id="exit-minibuffer">Command: <strong>exit-minibuffer</strong>
</dt> <dd><p>This command exits the active minibuffer. It is normally bound to keys in minibuffer local keymaps. The command throws an error if the current buffer is a minibuffer, but not the active minibuffer. </p></dd>
</dl> <dl> <dt id="self-insert-and-exit">Command: <strong>self-insert-and-exit</strong>
</dt> <dd><p>This command exits the active minibuffer after inserting the last character typed on the keyboard (found in <code>last-command-event</code>; see <a href="command-loop-info">Command Loop Info</a>). </p></dd>
</dl> <dl> <dt id="previous-history-element">Command: <strong>previous-history-element</strong> <em>n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th previous (older) history element. </p></dd>
</dl> <dl> <dt id="next-history-element">Command: <strong>next-history-element</strong> <em>n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th more recent history element. The position in the history can go beyond the current position and invoke “future history” (see <a href="text-from-minibuffer">Text from Minibuffer</a>). </p></dd>
</dl> <dl> <dt id="previous-matching-history-element">Command: <strong>previous-matching-history-element</strong> <em>pattern n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th previous (older) history element that matches <var>pattern</var> (a regular expression). </p></dd>
</dl> <dl> <dt id="next-matching-history-element">Command: <strong>next-matching-history-element</strong> <em>pattern n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th next (newer) history element that matches <var>pattern</var> (a regular expression). </p></dd>
</dl> <dl> <dt id="previous-complete-history-element">Command: <strong>previous-complete-history-element</strong> <em>n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th previous (older) history element that completes the current contents of the minibuffer before the point. </p></dd>
</dl> <dl> <dt id="next-complete-history-element">Command: <strong>next-complete-history-element</strong> <em>n</em>
</dt> <dd><p>This command replaces the minibuffer contents with the value of the <var>n</var>th next (newer) history element that completes the current contents of the minibuffer before the point. </p></dd>
</dl> <dl> <dt id="goto-history-element">Command: <strong>goto-history-element</strong> <em>nabs</em>
</dt> <dd><p>This function puts element of the minibuffer history in the minibuffer. The argument <var>nabs</var> specifies the absolute history position in descending order, where 0 means the current element and a positive number <var>n</var> means the <var>n</var>th previous element. NABS being a negative number -<var>n</var> means the <var>n</var>th entry of “future history.” </p></dd>
</dl><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Commands.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Commands.html</a>
  </p>
</div>