Notes on GNU Emacs and Org mode documentation
Emacs ancester: TECO (1962)
- TECO : Tape/text Editor and COrrector
- An editor and a language to write text editing macros
- The language was interpreted and imperative
- Bad reputation as a "write-only" language (APL, …)
- "TECO is not a text editor, it is a programming language"
- TINT: TINT Is Not TECO (very first recursive acronym)
- MUNG: MUNG Until No Good (cli for TECO)
Emacs (1976): Editing MACroS running on TECO
- RMS extends TECO: real-time full-screen mode, active keys
- First Emacs (1976) was written as a set of TECO macros
- Both an editor and an environment to run editing macros
- Modeless editing by default (vs
Vi
modal editing) - Emacs code-base is using
C
andEmacs Lisp
Emacs initial screen
Emacs initial screen elements
- Link to a tutorial
- Link to a guided tour
- Link to the Emacs manual
- Link to ordering a manual
- Quick start: open a file/directory
- Quick help: recover a file
Anything missing?
(How to quit Emacs?)
(Not such a bad question after all)
Fundamental Emacs design elements
- menu-bar and tool-bar: make commands more accessible
- A buffer: the place to edit text
- A cursor: which state can give some information
- A modeline: a read-only place for quick info
- An echo area: a read/write place for quick interactions
- A fringe: where to display indicators
- A margin: for indicators (e.g.
\
in the right margin) - A header-line: for more modeline-like informations
- Transient regions: highlight selected text
- Scroll bars: visual clues on where you are
- Help text and tooltips: information on active text
- Text properties: for hints on syntax or actions
- Overlay properties: for more hints on actions
Beyond Emacs design elements
Emacs design extensible and configurable and place context at the heart of every interaction.
linum-mode
: display line numbershl-line-mode
: highlight current lineguide-key-mode
: display available keybindingshelm-mode
&ido-mode
: contextual minibuffersM-x doctor RET
: when you're really really lost
Example: Emacs scratch buffer
Example: guide-key-mode
Emacs documentation-related commands
C-h a
: search for symbol or commandC-h g
: open the HTML manual in a browserC-h t
: open the Emacs tutorialC-h k
: type a key and get the commandC-h f
: search for function or commandsC-h v
: search for variables or optionsC-h C-d
: help for debugging Emacs- …
C-h C-h
: display more help commands
There is a dedicated help-mode to display help information
and documentation-oriented commands like info
and man
.
Emacs documentation materials and tools
Documentation materials:
- The GNU Emacs manual and guided tour
- Many online tutorials and screencasts
- https://www.emacswiki.org
- https://www.reddit.com/r/emacs/
Documentation tools:
- GNU coding standards
- Recommandations on writing documentation
M-x checkdoc RET
: Emacs Lisp docstrings linter
Emacs: really "self-documenting"?
"Is Emacs better at documenting itself than Google?"
Terminology is still a blocker for beginners:
- yank => copy
- kill => cut
- window => pane
- frame => window
- kill buffer => close buffer
What about Org-mode?
Eating our own dogfood
- Org-mode is both a text editing/publishing tool and a todo list manager
- Org-mode is used to write documentation (and
README.org
on Github) - Org-mode is used to track and display bugs (
M-x debbugs-org RET
)
worg/worg-todo.org
Org-mode and the Joel test
Do you use source control? | Yes, Git |
---|---|
Can you make a build in one step? | Yes |
Do you fix bugs before writing new code? | Generally |
Do you have a spec? | For elements |
Do you use the best tools money can buy? | Yes, Emacs |
Do you have testers? | Yes, users |
Do you do hallway usability testing? | Not enough |
Do you have a bug database? | NO (Well, yes.) |
Basic facts about org-mode development
- There are 22087 commits as of 2019-03-28
- We don't have a roadmap (but good willing users)
- We don't use Github (but code.orgmode.org)
- We don't have a bug tracker (but a mailing list)
- We have a single mailing list for developers and users
Github made it easy to report issues and to start projects: it does not mean this "default" widely used interface is not questionable.
Facts about org-mode and its documentation
- We have both a manual and a "compact" guide
- We have a book version of the manual for Org 7.0
- We started Worg, a git-based collaborative documentation
- The Org manual, guide and worg docs are
.org
files - We taught users how to give useful feedback in the manual
- We promote the notion of "ECM" (complete minimal example)
- The mailing list is welcoming, a place to learn
For the Org 7.0 book, we received the help of a professional editor, which taught us a lot.
Worg: collaborative documentation
A mailing list as a bug tracker, are you insane?
- Bugs get a very large exposure
- It promotes a collective sense of responsability
- Each bug is discussed in a unique place (a thread)
- It is easy to refer to bugs with a simple URL
- Patches are all discussed on the list
Yes, we can do better
- Enhance documents about Org syntax and elements
- Fix obsolete resources on Worg
- Test Org-mode with beginners
- Test Org documentation with beginners
- Publish documentation for the Org stable and unstable
- …
Resources
- fr.wikipedia.org/wiki/TECO
- fr.wikipedia.org/wiki/Emacs
- Where does the name "Emacs" come from?
- Stack Overflow: Helping One Million Developers Exit Vim
- How do I undo the most recent commits in Git?
- How to effectively use the self-documenting system of Emacs?
- The Joel Test: 12 Steps to Better Code
The XKCD drawing is published here under the CC-by-nd 2.5 license.
📣 Let's discuss this on floss.social
📧 Subscribe to read me from time to time