Skip to content

Latest commit

 

History

History
81 lines (65 loc) · 3.11 KB

README.org

File metadata and controls

81 lines (65 loc) · 3.11 KB

My emacs literate configuration file

My config requires evil-mode, org-mode and use-package. If you want to use it, make sure you have at least previously installed use-package. A minimal working ~/.emacs can look like this:

;; Change to your .emacs.d/ directory accordingly
(setq user-emacs-directory "/home/trajanus/.emacs.d") 
(require 'package)
(require 'use-package)

(package-initialize)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/"))

(use-package org
  :ensure t)

(use-package evil
  :ensure t
  :config
  (evil-mode 1))

;; Change to the path where you cloned the config to
(org-babel-load-file "/home/trajanus/.emacs.d/myinit.org")

Utility Cheat Sheet

KeyFunctionEvil Equivalent
C-x C-wWrite Current Buffer:write <filename>
C-x C-sSave Current Buffer:write
C-x sSave all open Buffers
C-x bSwitch Buffers:buffer
C-x iCopy file to current buffer:read <filename>
C-x kKill Buffer:quit
C-gAbort commands
C-h tEmacs basic Tutorial
C-h fDescribe Function by name
C-h vDescribe Variable by name
C-h cDescribe the Function a key calls
C-h mGet mode-specific information
M-xEmacs Function Call
C-x C-cExit Emacs

Emacs runit service

If you are on a Linux distribution which uses runit, you can also use my runit service for running Emacs in server mode.

Before doing so, you should change the owner of the emacs service by changing “trajanus” to the name of your user on the run scripts at sv/emacs/ and sv/emacs/log/. Notice you can also change the path inside the script sv/emacs/log/run to move your server logs to another directory.

Once that is done, you can enable the service by symlinking the folder sv/emacs to your var/service directory.

ln -s ${PWD}/sv/emacs /var/service/

The logging allows you to troubleshoot if you find any issues, so do leave it enabled if you are setting it up for the first time. Once that is done, you can add something like this to your rc.local file:

export EDITOR="emacsclient -nc"

To use the graphical emacs client as your default editor, it may be necessary to also run the command:

xhost +