5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Emacsを使いこなす(1) - Emacsをソースからビルドする

Last updated at Posted at 2015-08-07

背景

emacs23とemacs24では結構違う部分も多いのですが、apt-getやyumで入れたりするとemacs23が入ってしまいます。そこで、emacsをソースからビルドします。

最初に

emacsをビルドするために必要な gcc, make などをインストールします。とりあえずyumでのインストール方法だけ載せておきます。

sudo yum -y install gcc make ncurses-devel 

Macはdeveloper toolsを入れておけば問題ないような気がします。ubuntuの場合は、apt-getで↑と似たような名前のパッケージが配布されていると思います。またubuntuでやったら追記したいと思います。

ビルドしたいバージョンのemacsを探す

http://ftp.jaist.ac.jp/pub/GNU/emacs/ から、ビルドしたい emacs のバージョンのtar.gzを探します。今回は24.3だとします。

ダウンロードしてビルドする

emacs 24.3 のURLは http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-24.3.tar.gz なので、これをダウンロードして解凍してビルドします。

$ wget http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-24.3.tar.gz 
$ tar xvf emacs-24.3.tar.gz 
$ cd emacs-24.3 
$ ./configure 
$ sudo make
$ sudo make install

path を通す

古いemacsが存在していたりすると、pathが通らなかったりするのでpathを通します。

$ emacs --version
GNU Emacs 23.1

$ which emacs
/usr/bin/emacs
sudo rm /usr/bin/emacs

$ sudo ln -s /usr/local/bin/emacs-24.3 /usr/bin/emacs

おわりに

とりあえず最初はemacsの最新版を入れる方法について書きました。これから、Emacsの操作方法やプラグインなどについてまとめていき、これを読んでいくとEmacsが使いこなせるような、そんなドキュメントを書いていきたいと思います。(ついでに自分のEmacsの勉強になればと思っています)

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?