mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-02-12 03:19:01 +00:00
25 lines
14 KiB
HTML
25 lines
14 KiB
HTML
![]() |
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Using the built-in help system of Emacs</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
|
||
|
MathJax = {
|
||
|
tex: {
|
||
|
inlineMath: [ ['$','$'], ['\(','\)'] ],
|
||
|
displayMath: [ ['$$','$$'], ['[',']'] ]
|
||
|
},
|
||
|
options = {
|
||
|
processHtmlClass = "math"
|
||
|
}
|
||
|
}
|
||
|
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Using the built-in help system of Emacs</h1><section class="post-metadata"><span>Date: <!-- -->2021-04-21 16:26:50 +08:00</span><span>Date modified: <!-- -->2021-07-22 14:25:46 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a href="/wiki/editor.emacs.help-system#general-help-system" class="toc-link toc-link-h1">General help system</a></li><li class="toc-item toc-item-h1"><a href="/wiki/editor.emacs.help-system#evil-mode" class="toc-link toc-link-h1">evil-mode</a></li><li class="toc-item toc-item-h1"><a href="/wiki/editor.emacs.help-system#doom-emacs-specific" class="toc-link toc-link-h1">Doom Emacs-specific</a></li></ol></nav><p><a href="/wiki/2021-06-20-20-42-44">GNU Emacs</a>, being a flexible program with a supremely overwhelming number of options to choose from (arguably), has a comprehensive help system.
|
||
|
</p><h1 id="general-help-system">General help system</h1><ul><li><p><code class="inline-code">help-for-help</code> is a function that gives you a metahelp interface to a number of options such as searching through pattern, logging the last keybindings, display the documentation from a keybinding, describe a language environment, and so on.
|
||
|
Most, if not all, of the options presented can be accessed in another way.
|
||
|
</p></li><li><p><code class="inline-code">apropos</code>, like its similarly named Unix program, searches through the entire symbol list of Emacs (e.g., variable, function) through a pattern.
|
||
|
</p></li><li><p>The series of functions from <code class="inline-code">describe-*</code> has multiple options for various specific things.
|
||
|
Among the list of describe functions, I recommend to start with <code class="inline-code">describe-key</code>, <code class="inline-code">describe-function</code>, <code class="inline-code">describe-variable</code>, <code class="inline-code">describe-package</code>, <code class="inline-code">describe-mode</code>, and <code class="inline-code">describe-variable</code>.
|
||
|
</p></li><li><p>Most of the objects (e.g., functions, variables, hooks) in Emacs also require a docstring so you'll have more relevant information at hand.
|
||
|
</p></li></ul><h1 id="evil-mode">evil-mode</h1><p>evil-mode, being inspired from Vim keybindings, adds further into more ways for an instant access to documentation.
|
||
|
</p><ul><li><p><code class="inline-code">evil-lookup</code>, similar to Vim's lookup key (<code class="inline-code">:help K</code>), searches through documentation of the language written on.
|
||
|
</p></li><li><p><code class="inline-code">evil-goto-definition</code> can sometimes go into the original file where the keyword was defined.
|
||
|
It is only useful when the keyword is defined in the project or at least located on the project root.
|
||
|
</p></li></ul><h1 id="doom-emacs-specific">Doom Emacs-specific</h1><ul><li><p><code class="inline-code">doom/help</code> for Doom-specific documentations.
|
||
|
</p></li><li><p><code class="inline-code">doom/help-faq</code> jumps ahead into the FAQ file with a convenient interface.
|
||
|
</p></li><li><p><code class="inline-code">doom/help-modules</code> prompts you to search the documentation for Doom modules.
|
||
|
</p></li></ul><section><h2>Backlinks</h2><ul><li><a href="/wiki/2021-04-06-22-25-17">Prefer referencing over remembering</a></li><li><a href="/wiki/2021-06-20-20-42-44">GNU Emacs</a></li></ul></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-04-21 16:26:50 +08:00\"","date_modified":"\"2021-07-22 14:25:46 +08:00\"","language":"en","source":""},"title":"Using the built-in help system of Emacs","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"general-help-system"},"children":[{"type":"text","value":"General help system"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.emacs.help-system#general-help-system"},"children":[{"type":"text","value":"General help system"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"evil-mode"},"children":[{"type":"text","value":"evil-mode"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.emacs.help-system#evil-mode"},"children":[{"type":"text","value":"evil-mode"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"doom-emacs-specific"},"children":[{"type":"text","value":"Doom Emacs-specific"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/editor.emacs.help-system#doom-emacs-specific"},"children":[{"type":"text","value":"Doom Emacs-specific"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"/2021-06-20-20-42-44"},"children":[{"type":"text","value":"GNU Emacs"}]},{"type":"text","value":", being a flexible program with a supremely overwhelming number of options to choose from (arguably), has a comprehensive help system.\n"}]},{"type":"element","tagName":"h1","properties":{"id":"general-help-system"},"children":[{"type":"text","value":"General help system"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"help-for-help"}]},{"type":"text","value":" is a function that gives you a metahelp interface to a number of options such as searching through pattern, logging the last keybindings, display the documentation from a keybinding, describe a language environment, and so on.\n Most, if not all, of the options presented can be accessed in another way.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"apropos"}]},{"type":"text","value":", like its similarly named Unix program, searches through the entire symbol list of Emacs (e.g., variable, function) through a pattern.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The series of functions from "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"describe-*"}]},{"type":"text","value":" has multiple options for various specific things.\n Among the list of describe functions, I recommend to start with "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"typ
|