Table of Contents
Emacs
Emacs is in essence “just” a text editor, but in reality it is much more than that, its a fully functional, highly customiseable, work environment. It has major and minor modes for modifying the tasks you can complete meaning its a full Integrated Development Environment (IDE) for a number of languages such as R and Python.
Topics
Custom Fields
Emacs 25.1 and onwards tries to automatically add configurable variables to either ~/.emacs
and/or ~/.emacs.d/init.el
, this can be avoided using the methods suggested here. A simple one is to have custom variables written to their own file and this called from your ~/.emacs.d/init.el
.
However, as of Emacs 27.1 it is now possible to use ~/.config/emacs/
for all your configuration files and it would be wise to do so (it helps keep your home directory a bit cleaner). However, you must get rid of ~/.emacs*
files and directories if they have ever existed otherwise Emacs will try loading configuration from there first and not look in ~/.config/emacs
.
Debugging
When things go wrong on Emacs it can be frustrating to trouble shoot and work out where they have gone awry. A useful strategy (gleaned from here) is to..
- Toggle on debugging when an error occurs (
M-x toggle-debug-on-error
) - Reproduce the error.
- View the
*Backtrace*
buffer to see what has happened.
Trouble Shooting
A useful video on troubleshooting gave me most of this information.
Recent Commands
Use C-h l
to start lossage
which lists the last commands and key sequences, default history is 300 and can be configured via lossage-size
.
An extension of this idea is to open-dribble-file
providing a location and your commands are logged there for future use/analysis.
Emacs Locks
You don't have to kill Emacs if its locked, you can use pkill -SIGUSR2 emacs
this kills whatever it is doing and drops it into a debugger.
Links
- EmacsDocs.org - alternative formatting of several Emacs manuals.
EmacsConf
Books
Configuration
Startup
MELPA
Python
Shells, Terminals and SSH
R under Emacs
Git under Emacs
Markdown
Get Things Done
Misc
- Protesilaos Stavrou dotemacs guy knows a lot about Emacs, worth reading (plus his playlist of videos).
- Emacs from Scratch playlist of live streams showing how to use Emacs.