Emacs Recipes

Getting Started

Running Emacs

Launch Emacs as a daemon to minimize initialization time of subsequent startups:

emacs --daemon

This command only needs to be executed once. I recommend launching it on startup. On KDE, for example, this can be done in the Autostart application:

Screenshot of the "KDE Autostart" application with emacs launch script.

To launch emacs from the terminal, do one of the following:

# Launch emacs in GUI mode
emacsclient -tuq -a '' 
# Launch emacs in
emacsclient -cuq -a ''

For brevity, I recommend creating an alias or wrapper script:

# In .bashrc file
alias vim='emacsclient -tuq -a'''
alias gvim='emacsclient -cuq -a'''

You may also want to create desktop entry

Basic Configurations

Here is a basic config to get you started:

;; Remove UI elements.
(scroll-bar-mode -1)
(tool-bar-mode -1)
(menu-bar-mode -1)
;; Disable backupse
(setq  make-backup-files nil)
;; Show column number
(column-number-mode 1)
;; Always highlight matching parenthesis
(show-paren-mode t)
;; Disable beeping & booping
(visible-bell t)

Store this as $HOME/.emacs. It may be useful to keep this file under source control.


Created 2019-09-13. Last updated 2020-06-22. View source.