当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 1 Fork 0

Gemo / emacs 配置文件
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.org 3.63 KB
一键复制 编辑 原始数据 按行查看 历史

Emacs 配置

Emacs是复杂的,一个精简的配置可能无法实现需要的功能。开始整个配置文件主要写在本文件中,但扩展起来十分麻烦,则划分出模块文件来。

除本文件之外,其他配置均包含在docs目录当中,如果需要加载部分模块,直接将本文件的加载配置修改即可,具体配置的修改请直接查看源文件。

本配置仅确保在以下Gentoo/Archlinux系统运行(如果以后有其他电脑再手动适配):

安装使用

建议阅读网络上的配置再写出属于自己的配置!

本配置参考:

如果要直接使用:

git clone https://gitee.com/gemo-x/emacs.d ~/.emacs.d
## TODO
## 补充部分需要手动安装
emacs --debug-init

你可能需要修改 emacs-rime 的配置,否则可能会不可用。

关于镜像源

本配置中采用的源地址并非Github官网,众所周知,国内速度无法达到理想,因而该处使用了相关的镜像网站,而镜像网站目前发现有两个:

其中Fastgit在浏览网页的过程中十分流畅,会自动转换地址到代理源,但克隆速度有些不理想,而CNPM镜像源提供的镜像在下载方面速度还是很稳定的,但网页访问会有些不尽人意。

可以考虑两者综合,本文档会在使用包的地方提供相应的地址来源,将github.com置换成任一镜像即可使用镜像。

变量

此处定义变量统一设置便于后面修改:

(defconst custom/github-com-cnpmjs-org "github.com.cnpmjs.org/")
(defconst custom/hub-fastgit-org "hub.fastgit.org/")
(defconst custom/github-url custom/github-com-cnpmjs-org
  "Define Github Url, will be faster.")
(defconst custom/melpa-repo-url (concat "https://" custom/github-url "melpa/melpa.git")
  "The melpa repo url will load in quelpa.")
(defconst custom/quelpa-el-url (concat "https://" custom/hub-fastgit-org "/quelpa/quelpa/raw/master/quelpa.el"))

目录定义

(defconst custom/emacs-d-root user-emacs-directory
  "The root for emacs.d.")
(defconst custom/emacs-d-site-lisp (concat custom/emacs-d-root "site-lisp/"))
(defconst custom/emacs-d-elpa (concat custom/emacs-d-root "elpa/"))

加载配置

(defconst var/conf (concat custom/emacs-d-root "docs/"))

;; load org to el
;; org-babel-load-file
(defun utils/load-org-to-el (filepath)
  (org-babel-load-file (expand-file-name filepath)))
;; docs path file to el
(defun utils/dte (filename)
  (utils/load-org-to-el (format "%s%s.org" var/conf filename)))

(dolist (conf (list
		 ;; utils -- must load first
		 ;; 优先于所有配置,此处的文件将应用与后面的配置
		 'utils
		 'ui
		 'tools
		 'editor
		 'coding))
  (utils/dte conf))
Emacs Lisp
1
https://gitee.com/gemone/emacs.d.git
git@gitee.com:gemone/emacs.d.git
gemone
emacs.d
emacs 配置文件
master

搜索帮助