# emacs 配置文件 **Repository Path**: gemone/emacs.d ## Basic Information - **Project Name**: emacs 配置文件 - **Description**: [暂缓] 我的 .emacs.d - **Primary Language**: Emacs Lisp - **License**: Unlicense - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2019-10-19 - **Last Updated**: 2024-02-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #+STARTUP: overview #+OPTIONS: toc:3 #+TITLE: Emacs 配置 Emacs是复杂的,一个精简的配置可能无法实现需要的功能。开始整个配置文件主要写在本文件中,但扩展起来十分麻烦,则划分出模块文件来。 除本文件之外,其他配置均包含在docs目录当中,如果需要加载部分模块,直接将本文件的[[#加载配置][加载配置]]修改即可,具体配置的修改请直接查看源文件。 本配置仅确保在以下Gentoo/Archlinux系统运行(如果以后有其他电脑再手动适配): * 安装使用 建议阅读网络上的配置再写出属于自己的配置! 本配置参考: - [[https://github.com/redguardtoo/emacs.d][redguardtoo/emacs.d]] - [[https://github.com/zamansky/dot-emacs][zamansky/dot-emacs]] - [[https://github.com/manateelazycat/lazycat-emacs][manateelazycat/lazycat-emacs]] - [[https://github.com/purcell/emacs.d][purcell/emacs.d]] - [[https://github.com/xuchunyang/emacs.d][xuchunyang/emacs.d]] 如果要直接使用: #+BEGIN_SRC shell git clone https://gitee.com/gemo-x/emacs.d ~/.emacs.d ## TODO ## 补充部分需要手动安装 emacs --debug-init #+END_SRC 你可能需要修改 emacs-rime 的配置,否则可能会不可用。 * 关于镜像源 本配置中采用的源地址并非[[https://github.com][Github]]官网,众所周知,国内速度无法达到理想,因而该处使用了相关的镜像网站,而镜像网站目前发现有两个: - [[https://hub.fastgit.org][Fastgit]] - [[https://github.com.cnpmjs.org][CNPM]] 其中[[https://hub.fastgit.org][Fastgit]]在浏览网页的过程中十分流畅,会自动转换地址到代理源,但克隆速度有些不理想,而[[https://github.com.cnpmjs.org][CNPM]]镜像源提供的镜像在下载方面速度还是很稳定的,但网页访问会有些不尽人意。 可以考虑两者综合,本文档会在使用包的地方提供相应的地址来源,将[[https://github.com][github.com]]置换成任一镜像即可使用镜像。 * 变量 此处定义变量统一设置便于后面修改: #+BEGIN_SRC emacs-lisp (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")) #+END_SRC * 目录定义 #+BEGIN_SRC emacs-lisp (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/")) #+END_SRC * 加载配置 - [[./docs/utils.org][Utils 包管理器和有用工具]] - [[./docs/ui.org][UI 界面相关配置]] - [[./docs/tools.org][Tools 其他工具类]] - [[./docs/editor.org][Editors 编辑器编辑优化]] - [[./docs/coding.org][Coding 代码相关]] #+BEGIN_SRC emacs-lisp (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)) #+END_SRC