Live in Emacs using EAF

Live in Emacs using Emacs Application Framework (EAF).

PDF Viewer in Emacs Buffer

Overview

“Emacs has a text editor” and the concept of “Living in Emacs” are some of the strong reasons that developers use Emacs. However, using Emacs as an operating system may not be easy for most developers. Many of the packages which make living in Emacs possible work well in a Linux environment but the functionalities will be reduced for non-Linux OS, e.g. exwm on macOS.

In this article let’s explore Emacs Application Framework (EAF) which is a GUI application framework for Emacs. It works for Linux, Windows, and macOS. However, for macOS it is still partially supported.

Setup

  1. Git clone EAF. In my case, I cloned it to ~/.config/emacs
git clone --depth=1 -b master https://github.com/manateelazycat/emacs-application-framework.git ~/.config/emacs/emacs-application-framework/

2. I use use-package to install the dependencies. You can refer to the configuration in this repository.

;;; desktop.el --- Desktop management
;;; Commentary:
;;; Desktop management
;;; Code:
(use-package eaf
:load-path "~/.config/emacs/emacs-application-framework"
:init
(use-package epc :defer t :ensure t)
(use-package ctable :defer t :ensure t)
(use-package deferred :defer t :ensure t)
(use-package s :defer t :ensure t)
:custom
(eaf-browser-continue-where-left-off t)
:config
(eaf-setq eaf-browser-enable-adblocker "true")
(eaf-bind-key scroll_up "C-n" eaf-pdf-viewer-keybinding)
(eaf-bind-key scroll_down "C-p" eaf-pdf-viewer-keybinding)
(eaf-bind-key take_photo "p" eaf-camera-keybinding)
(eaf-bind-key nil "M-q" eaf-browser-keybinding))
(provide 'desktop)
;;; desktop.el ends here

3. Install the dependencies using M-x eaf-install-dependencies.

Install EAF Dependencies

With the setup completed, let’s explore EAF.

What You Can Do with EAF

Browsing

Browsing within Emacs

Open PDF File

PDF Viewer in Emacs Buffer

Use Jupyter Notebook

Jupyter in Emacs Buffer

Open Camera

Use Camera within Emacs

Mindmapping

Mindmap in Emacs

There are many more that you can do with EAF but the experience is definitely much better if you are using a Linux machine.

Programmer and occasional blogger.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store