From 36dcbbab463be479b92e9a3a2b737042db5a18a4 Mon Sep 17 00:00:00 2001 From: hollowman6 Date: Fri, 12 Jun 2020 20:49:26 +0100 Subject: [PATCH 1/2] Update chemacs config instructions --- README.md | 28 ++++++++++++++++++++++++++++ README.zh-CN.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/README.md b/README.md index a5e02ea33..d81e4cebe 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,34 @@ If you use [use-package](https://github.com/jwiegley/use-package), a sample conf (eaf-bind-key take_photo "p" eaf-camera-keybinding)) ``` +--- + +If you use [Chemacs](https://github.com/plexus/chemacs), a sample [`init.el`](./init.el) is provided as follows: + +```Elisp +;; An example of init.el + +(defun add-subdirs-to-load-path (dir) + "Recursive add directories to `load-path'." + (let ((default-directory (file-name-as-directory dir))) + (add-to-list 'load-path dir) + (normal-top-level-add-subdirs-to-load-path))) +(add-subdirs-to-load-path "~/.emacs.d/") + +(require 'eaf) +``` + + during EAF installation, you only need to modify the parameter value when calling function `add-subdirs-to-load-path`, change it into your full path to the EAF installation directory. The sample gives a situation when you install EAF at `~/.emacs.d/`. + +After EAF installation, let's assume your EAF installation directory is `~/eaf`, you only have Emacs configurations at `~/.emacs.d` and EAF installed on your computer, and you have installed Chemacs, then the `~/.emacs-profiles.el` should look like this: + +```Elisp +(("default" . ((user-emacs-directory . "~/.emacs.d"))) + ("EAF" . ((user-emacs-directory . "~/eaf")))) +``` + +When you want to use EAF by chemacs, you can excute `emacs --with-profile EAF` in the terminal. + ### Dependency List Packages listed as **Core** are mandatory for EAF to work, whereas other packages are optional - install if you want to use corresponding EAF Application. diff --git a/README.zh-CN.md b/README.zh-CN.md index 4ea3f0594..6d788ed26 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -81,6 +81,34 @@ git clone https://github.com/manateelazycat/emacs-application-framework.git --de (eaf-bind-key take_photo "p" eaf-camera-keybinding)) ``` +--- + +如果你使用[Chemacs](https://github.com/plexus/chemacs), 下面是一份 [`init.el`]的配置示例: + +```Elisp +;; An example of init.el + +(defun add-subdirs-to-load-path (dir) + "Recursive add directories to `load-path'." + (let ((default-directory (file-name-as-directory dir))) + (add-to-list 'load-path dir) + (normal-top-level-add-subdirs-to-load-path))) +(add-subdirs-to-load-path "~/.emacs.d/") + +(require 'eaf) +``` + +在安装EAF时,你仅需要修改此文件中调用函数`add-subdirs-to-load-path`的参数值,将其更改为你的EAF安装位置的绝对路径。 配置示例中的EAF是安装在`~/.emacs.d/`. + +在EAF安装完成后,假设你将它安装到了`~/eaf`,你电脑中只有存放在`~/.emacs.d`的Emacs配置文件和安装的EAF,并且你电脑中安装了Chemacs,此时`~/.emacs-profiles.el`应该这样配置: + +```Elisp +(("default" . ((user-emacs-directory . "~/.emacs.d"))) + ("EAF" . ((user-emacs-directory . "~/eaf")))) +``` + +当你想使用Chemacs打开EAF,只需在终端中执行`emacs --with-profile EAF`。 + ### 依赖列表 **核心** 分类代表必备依赖,这些包必须安装好EAF才能工作。其余依赖都可选,若想其使用对应的应用时,你才需要安装这些依赖。当然我们推荐先把所有依赖都安装好,等到真正使用的时候就不用再次折腾。 From 44eabff4eaf45b75af4a6fa311d311723a2a61de Mon Sep 17 00:00:00 2001 From: hollowman6 Date: Fri, 12 Jun 2020 21:28:22 +0100 Subject: [PATCH 2/2] Fix typos --- README.md | 6 +++--- README.zh-CN.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d81e4cebe..8e18b1585 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ If you use [use-package](https://github.com/jwiegley/use-package), a sample conf --- -If you use [Chemacs](https://github.com/plexus/chemacs), a sample [`init.el`](./init.el) is provided as follows: +If you use [Chemacs](https://github.com/plexus/chemacs), a sample `init.el` is provided as follows: ```Elisp ;; An example of init.el @@ -98,9 +98,9 @@ If you use [Chemacs](https://github.com/plexus/chemacs), a sample [`init.el`](./ (require 'eaf) ``` - during EAF installation, you only need to modify the parameter value when calling function `add-subdirs-to-load-path`, change it into your full path to the EAF installation directory. The sample gives a situation when you install EAF at `~/.emacs.d/`. +During EAF installation, you only need to modify the parameter value when calling function `add-subdirs-to-load-path`, change it into your full path to the EAF installation directory. The sample gives a situation when you install EAF at `~/.emacs.d/`. -After EAF installation, let's assume your EAF installation directory is `~/eaf`, you only have Emacs configurations at `~/.emacs.d` and EAF installed on your computer, and you have installed Chemacs, then the `~/.emacs-profiles.el` should look like this: +After EAF installation, let's assume your EAF installation directory is `~/eaf`, you only have Emacs configurations at `~/.emacs.d` and EAF installed on your computer, and you have installed Chemacs, then the `.emacs-profiles.el` should look like this: ```Elisp (("default" . ((user-emacs-directory . "~/.emacs.d"))) diff --git a/README.zh-CN.md b/README.zh-CN.md index 6d788ed26..c88e3fe7f 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -83,7 +83,7 @@ git clone https://github.com/manateelazycat/emacs-application-framework.git --de --- -如果你使用[Chemacs](https://github.com/plexus/chemacs), 下面是一份 [`init.el`]的配置示例: +如果你使用[Chemacs](https://github.com/plexus/chemacs), 下面是一份 `init.el`的配置示例: ```Elisp ;; An example of init.el @@ -100,7 +100,7 @@ git clone https://github.com/manateelazycat/emacs-application-framework.git --de 在安装EAF时,你仅需要修改此文件中调用函数`add-subdirs-to-load-path`的参数值,将其更改为你的EAF安装位置的绝对路径。 配置示例中的EAF是安装在`~/.emacs.d/`. -在EAF安装完成后,假设你将它安装到了`~/eaf`,你电脑中只有存放在`~/.emacs.d`的Emacs配置文件和安装的EAF,并且你电脑中安装了Chemacs,此时`~/.emacs-profiles.el`应该这样配置: +在EAF安装完成后,假设你将它安装到了`~/eaf`,你电脑中只有存放在`~/.emacs.d`的Emacs配置文件和安装的EAF,并且你电脑中安装了Chemacs,此时`.emacs-profiles.el`应该这样配置: ```Elisp (("default" . ((user-emacs-directory . "~/.emacs.d")))