Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to use EAF in chemacs #309

Merged
merged 2 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
HollowMan6 marked this conversation as resolved.
Show resolved Hide resolved

```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/`.
HollowMan6 marked this conversation as resolved.
Show resolved Hide resolved

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:
HollowMan6 marked this conversation as resolved.
Show resolved Hide resolved

```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.

Expand Down
28 changes: 28 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`.
HollowMan6 marked this conversation as resolved.
Show resolved Hide resolved

在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才能工作。其余依赖都可选,若想其使用对应的应用时,你才需要安装这些依赖。当然我们推荐先把所有依赖都安装好,等到真正使用的时候就不用再次折腾。

Expand Down