在 Ubuntu 18.04 系统下安装 Emacs 26.3
Table of Contents
1. 下载 Emacs 26 的源代码
mkdir ~/.local/ && cd ~/.local/
wget http://mirrors.ustc.edu.cn/gnu/emacs/emacs-28.2.tar.gz
tar xzvf emacs-28.2.tar.gz
2. 更新系统包管理器并下载依赖项
ubuntu
sudo apt-get update && apt-get upgrade sudo apt-get install build-essential libncurses-dev autoconf make gcc \ texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev \ libncurses5-dev libxml2-dev libgnutls28-dev
centos
yum install -y libXpm-devel libtiff-devel gnutls-devel giflib-devel \
libjpeg-turbo-devel ncurses-devel libpng-devel libXaw-devel texinfo
3. 编译及安装
cd emacs-26.3
./autogen.sh
./configure
make -j 4
make docs
sudo make install && make install-doc
4. 启动 Emacs
emacs # -nw 表示无窗口方式启动 emacs -nw
5. tree-sitter 支持
sudo apt-get -y install libtree-sitter-dev
./configure --with-tree-sitter