### You're reading the English version, Chinese users, please read [中文版本](https://github.com/manateelazycat/emacs-application-framework/blob/master/README_CN.md)
### You're reading the English README. Chinese users please read [中文版本](https://github.com/manateelazycat/emacs-application-framework/blob/master/README_CN.md)
# What is Emacs Application Framework (EAF)?
EAF extends GNU Emacs to an entire universe of powerful GUI applications.
EAF is a new GUI application framework that revolutionizes Emacs graphical capabilities to ultimately achieve the goal of *Living in Emacs*.
## EAF Application Overview
EAF is extensible, you can develop any PyQt application and integrate it into Emacs.
EAF is an extensible framework, one can develop any Qt5 application and integrate it into Emacs.
| Browser | Markdown Previewer |
| :--------: | :----: |
@ -36,18 +36,22 @@ EAF is extensible, you can develop any PyQt application and integrate it into Em
6. For EAF Browser download to work, please install ```aria2```.
### Dependency List
Packages listed as **Core** are mandatory to make EAF to work, whereas packages listed as **Application** are optional - install if you want the corresponding EAF feature.
| Package | Package Repo | Classification | Description and Depended by ... |
| :-------- | :---- | :------ | :------ |
| pyqt5 | pip3 | Core | Essential GUI library |
| dbus-python | pip3 | Core | DBus IPC to connect Python with Elisp |
Packages listed as **Core** are mandatory for EAF to work, whereas other packages are optional - install if you want to use corresponding EAF Application.
| aria2 | pacman (Arch) | Browser |Downloadfiles from the web |
| wetty | yarn | Terminal | Communicate between browser and local TTY |
## Launch EAF Applications
| Application Name | Launch |
@ -119,74 +121,74 @@ Packages listed as **Core** are mandatory to make EAF to work, whereas packages
| RSS Reader | `M-x eaf-open-rss-reader` |
| Demo | `M-x eaf-open-demo` to verify basic functionality |
- To open the file under the cursor in `dired` using EAF, use `eaf-open-this-from-dired` instead.
- To open the file under the cursor in `dired` using appropriate EAF Application, use `eaf-open-this-from-dired` instead.
```
NOTE:
EAF use DBus' session bus, it must run in general user.
Please don't run EAF with root user, a root user can only access DBus's system bus.
EAF use DBus' session bus, it must run by a general user.
Please don't use EAF when Emacs is started with sudo or root user, a root user can only access DBus's system bus.
```
## Wiki
Please check the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) for documentations on Keybinding, Customization, EAF Structure and TODOLIST.
It is **highly** suggested to read the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) first before using EAF.
You can also find helpful config tips to make EAF work with Docker, Helm.
Wiki consists of documentations on Keybinding, Customization, Design and TODOLIST. There also are some helpful tips to make EAF work with Docker, Helm, etc.
## FAQ and Support
## FAQ
### How does EAF make this possible?
### How does EAF work?
EAF implements three major functionalities:
1. Integrate PyQt program window into Emacs frame using Xlib Reparent technology.
2. Listen to EAF buffer's keyboard event flow and control the keyboard input of PyQt program via DBus IPC.
3. Create a window compositer to make a PyQt program window adapt Emacs's Window/Buffer design.
### EAF vs EXWM?
1. The goal of EAF and EXWM are to improve collaboration efficiency Emacs and other tools.
2. EXWM is a X11 Window Manager, control other tools by keyboard; EAF is not a Window Manager, it use Emacs as a Window Manager.
3. The goal of EAF is create PyQt5 application to expand the multimedia capabilities of Emacs, the ultimate goal is "Live In Emacs".
4. According to EAF programming model, you can use Elisp control Python code, vice versa, you even can use Elisp control JavaScript code in browser, or any other tools.
1. EAF and EXWM share a common goal: enhance collaboration between the standard GNU Emacs with other GUI tools.
2. EXWM is an X11 Windows Manager, it manages and controls other software using a keyboard, but it cannot modify, customize and extend the behavior of other software. For example, it cannot modify the behavior when you press a key in Chrome or a PDF viewer.
3. EAF is *not* a Windows Manager, it utilizes the windows managing capabilities of Emacs to display its applications.
4. The intention of EAF is to provide a framework to write PyQt5 applications that extends the multimedia experience of Emacs. From the perspective of Emacs' buffer/mode design, EAF is not different from any other package, with the former uses Qt for drawing contents while the latter uses Emacs' built-in text libraries instead.
5. Through EAF's design, one can use Elisp to control Python and vice versa, and even able to use Elisp to control JavaScript in EAF Browser. EAF enables Emacs to the world of **multi-language scripting**.
Both projects only from the interface is very similar to the senses, EAF and EXWM on the design goals are two completely different projects, please do not do meaningless comparison, thanks!
Both projects are similar in terms of interface, but they are two completely different projects with different goals in mind. Sometimes one may find EAF is more suitable than EXWM, sometimes it's the other way around. Please do not meaninglessly compare them.
### EAF is (currently) Linux only. Why?
Below are mainly obstacles:
1. None of EAF's core developers use MacOS or Windows or BSD family OS.
2. EAF uses X11 Reparent to stick Qt5 window to Emacs frame, we know that other OS how to implement similar techniques.
3. DBus is Linux-specific technical, it's difficult to support DBus in other OS.
4. Qt5's QGraphicsScene technology not work on MacOS.
1. As of now, none of EAF's core developers use MacOS or Windows or BSD family OS.
2. EAF uses X11 Reparent to stick Qt5 window to Emacs frame. Other operating systems may implement similar features, but the core developers don't know how to work with them.
3. DBus is Linux-specific technology, it's difficult to support DBus in other operating systems.
4. Qt5's QGraphicsScene technology does not work on MacOS.
If you've figure them out, PRs are always welcome
If you've figure them out, PRs are always welcome!
### How about Wayland?
EAF use X11 XReparent, Wayland doesn't support it as of now.
EAF use X11 XReparent technology, Wayland doesn't support it (right now).
We recommend to use KDE or Xfce, they supports X11 XReparent and handling of keyboard focus events correctly. Other DE, LightDE or TileWM not support EAf very well, such as ```i3wm``` or ```awesome```.
We recommend to use KDE or Xfce, they supports X11 XReparent and handling of keyboard focus events correctly. Other Lighter DEs or Tiling WMs do not support EAF very well, such as ```i3wm``` or ```awesome```.
### `[EAF] *eaf* aborted (core dumped)`
### `[EAF] *eaf* aborted (core dumped)` error
Please check the `*eaf*` buffer, something is wrong on the Python side. Usually due to Python dependencies are not installed correctly.
If Python dependences is ok, please send issue `*eaf*` buffer content, it contains many clues that can help us locate the problem faster.
If you're sure Python dependences are installed correctly, please create an issue with the `*eaf*` buffer content, it contains many clues that can help us locate the problem faster.
### "undefined symbol" error
### `undefined symbol` error
If you got "undefined symbol" error after start EAF, and you use Arch Linux, yes, it's a bug of Arch.
You need use pip install all dependences after you upgrade your Arch system, then undefine symbol error will fix.
If you use EAF Markdown Previewer, you need the access to a [Personal access token](https://github.com/settings/tokens/new?scopes=), fill something in "Token description" and click button "Generate token" to get your personal token, then set token:
### What is Github Personal Access Tokens?
If you use EAF Markdown Previewer, to get consistent previewing, you need to access [Github Personal access token site](https://github.com/settings/tokens/new?scopes=), fill something in "Token description" and click button "Generate token" to get your personal token. Then set the token:
```Elisp
(setq eaf-grip-token "yourtokencode")
```
Otherwise, github might popup "times limit" error because there are just so many people using grip. ;)
Although Markdown Previewer works for the first few times by entering empty string when prompted, eventually it stops working and gives "GitHub Rate Limit Reached" error.
### Proxy
If you need to use proxy to access internet, you can configure the proxy settings.
If you need to use proxy to access internet, one can configure the proxy settings.
```Elisp
(setq eaf-proxy-type "http")
@ -194,7 +196,7 @@ If you need to use proxy to access internet, you can configure the proxy setting
(setq eaf-proxy-port "1080")
```
If you use Socks5 as local proxy, you can set proxy type with:
If you use Socks5 as local proxy, one can set proxy type with:
```Elisp
(setq eaf-proxy-type "socks5")
@ -212,22 +214,23 @@ If we missed your package, please make a PR to add it to the list.
For any installation and configuration assistance, please read the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) first!
If you encounter any problem with EAF, please use command `emacs -q` with minimal setups and re-test to see if the bug is reproducible. If `emacs -q` works fine, probably something is wrong with your Emacs config.
If you encounter any problem with EAF, please use command `emacs -q` with a minimal setup that only contains EAF and verify the bug is reproducible. If `emacs -q` works fine, probably something is wrong with your Emacs config.
If the problem persists, please [report bug here](https://github.com/manateelazycat/emacs-application-framework/issues/new).
## Join Us
Do you want to make Emacs a real operating system?
Do you want to make Emacs a real "operating system"?
Do you want to live in Emacs more comfortably?
Want to create unparalleled plugins to extend Emacs?
Do you want to revolutionize the capabilities of Emacs?
### You are reading Chinese version, International users please read [English Version](https://github.com/manateelazycat/emacs-application-framework/blob/master/README.md)
### You are reading Chinese version. International users please read [English Version](https://github.com/manateelazycat/emacs-application-framework/blob/master/README.md)
# 什么是 Emacs Application Framework (EAF)?
EAF 是一个全新的图形应用框架,扩展Emacs的多媒体能力,最终达到 Live in Emacs 的目标。
EAF 是一个全新的图形应用框架,扩展Emacs的多媒体能力,最终达到 Living in Emacs 的终极目标。