This file is automatically generated from
ellit-org.elby GitHub#ellit-org.el tool. Do not edit manually.
Ultimate tool to document your Emacs Lisp project without much effort.
Generate documentation for your Emacs Lisp package by combining
.org files and useful bits from comments in .el files.
Idea is similar to https://github.com/tumashu/el2org
However ellit-org implements more features, such as:
- Easy to use comments extractor from
.el, see Commenting files - Combining multiple files,
.orgor.el - GitHub friendly
:CUSTOM_IDproperty generation for headings, so exporting html to GitHub Pages from resulting.orgis easy as callingorg-html-export-to-htmlfunction - Templating
Separate files for code and documentation is hard to get in sync. Once changing something in source code files, you might change comments as well and forget about documentation. In other words having documentation in source code is easier to maintain for the developers.
Also many things, useful for documentation, might be automatically extracted from source code. Such as:
- Keybindings
- Customizable options
- Docstrings for commands
- etc
Sample Makefile to generate user manual for the project:
EMACS=emacs -Q
manual.org: srcfile.el <list-of-other-files-used-to-generate-manual>
$(EMACS) -batch -f package-initialize -l ellit-org \
--eval '(ellit-org-export "srcfile.el" "manual.org")'ellit-orgitself, see Makefile- telega.el uses
ellit-orgto generate its Manual, see its Makefile - grammarbot.el, see its Makefile
- Use
;;; ellit-org: [LABEL]as trigger for ellit-org to start processing following comments - Processing stops on any non-commentary line
- When processing stops, newline is emmited to output
Here is the example:
;;; ellit-org:
;; * Heading1 <--- processing starts here
;; This line is included into output
;;
;; This line also included into output
<--- processing stops here
;; This line is NOT included into output
;; * This line also NOT included
;;; ellit-org:
;; - However this line, is included <--- processing starts here
;;
;; Since new processing is started, and it will stop only on
;; non-commentary line below
<--- processing stops here
;; This line is *not* includedMultiple .org and .el files might be combined forming final
result as single .org file.
TODO: Describe labels purpose inside ellit-driven files
TODO: Describe #+ELLIT-INCLUDE: directive, and its properties:
:eval-pto get include filename by evaluating sexp:no-loaddo not load corresponding.elfile:labelTo include only given label from.elor.orgfile:headingTo include only given heading
ellit-org relies on Org mode’s macro system by adding some useful macroses. See https://orgmode.org/manual/Macro-replacement.html
Macro replacement is done after processing comments, so make sure your macroses are in processed part of the comments.
Templates syntax:
{{{macro_name(arguments)}}}
ARGUMENTS are optional string supplied to function which does
processing for MACRO_NAME.
Supported templates:
- eval(
SEXP[,AS-STRING]) -
Insert results of the
SEXPevaluation. IfAS-STRINGis non-nil then use “%s” instead of “%S” for formattingSEXP. - as-is(
STRING) -
Insert
STRINGas is.as-is(STRING)filter is equivalent toeval("STRING", t) - ellit-filename([
VERBATIM]) -
Insert currently processing filename.
If
VERBATIMis specified, then outline filename with verbatim markup. - kbd(
KEY) -
Insert HTML <kbd> tag with
KEYcontents. - where-is(
COMMAND[,KEYMAP[,MENU-ITEMS]]) -
Insert list of keys that calls
COMMAND.KEYMAPis keymap where to lookup forCOMMAND. By defaultglobal-mapis considered.If
MENU-ITEMS-Pis specified, then also insert commands inside menu-items. - vardoc1(
VARIABLE) -
Insert first line from docstring for the
VARIABLE. - vardoc(
VARIABLE[,INDENT-LEVEL]) -
Insert full docstring for the
VARIABLE. - fundoc1(
FUNCTION) -
Insert first line from docstring for the
FUNCTION. - fundoc(
FUNCTION[,INDENT-LEVEL]) -
Insert full docstring for the
FUNCTION.
