Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wisdomfusion/dotemacs

My .emacs.d configration, structured as an org-mode file.
https://github.com/wisdomfusion/dotemacs

dotemacs emacs

Last synced: about 2 months ago
JSON representation

My .emacs.d configration, structured as an org-mode file.

Awesome Lists containing this project

README

        

# -*- mode: org; coding: utf-8 -*-

#+STARTUP: hidestars
#+STARTUP: showeverything

* About

My .emacs.d configration, structured as an [[http://orgmode.org/][org-mode]] file. You can preview the configurations on the web at [[./config.org][config.org]], cause GitHub parses org-mode files perfectly.

* Requirement

- GNU Emacs 29.0 or later
- macOS, *nix
- Install [[http://www.sbcl.org/][sbcl]] and [[https://common-lisp.net/project/slime/][slime]], before turn on slime on in init.el

#+BEGIN_SRC emacs-lisp
(defconst *hack-slime-p* t)
#+END_SRC

* Installation

Git clone or just download and exract files to *~/.emacs.d/* folder, and restart your Emacs.

All of the configration is written in *config.org* using [[http://orgmode.org/worg/org-contrib/babel/][org-babel]] blocks.

* Customization

** Fonts

Because I use org-mode in my daily life, I adjust font size seperately with English and Chinese fonts, you can specify them to you own favorites.

#+BEGIN_SRC emacs-lisp
;; fonts settings
(when window-system
(if *is-mac-p*
(progn
; English Font
(set-face-attribute 'default nil :font "Menlo 14")
; Chinese Font
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "PingFang SC" :size 16)))))
(if *is-win-p*
(progn
(set-face-attribute 'default nil :font "Fira Code 11")
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "YaHei Consolas Hybrid" :size 16))))))

(setq-default line-spacing 4)
#+END_SRC

** elpa

My dotemacs use tsinghua.edu.cn as elpa mirror in China mainland, adjust those archives if you have faster or native ones.

#+BEGIN_SRC emacs-lisp
(setq package-archives '(("gnu" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
("melpa-stable" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa-stable/")
("marmalade" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/marmalade/")
("org" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")))
#+END_SRC

* How it works

Using [[http://orgmode.org/worg/org-contrib/babel/][org-babel]], which is part of [[http://orgmode.org/][org-mode]].

The code in init.el invokes [[http://orgmode.org/worg/org-contrib/babel/][org-babel]] function org-babel-load-file, which will generate a config.el file and executes it immediately.