#+TITLE: サブ環境の Emacs の設定ファイル * はじめに サブ環境用の Emacs の設定ファイル。 可能な限りの可搬性を優先し、自動化や一部の詳細な設定はこのファイルではおこなわない。 ** 設定すること/しないこと 可搬性を優先するため下記の設定はこのファイルではない。 - 見た目に関連する設定 - フォントの設定 - テーマの設定 - Gnus の設定 それに対して org 関連は重要なため設定する。 どの環境も =~/org= を使う org のファイル置き場と仮定する。 なお、メイン環境との =~/org= の共有はしないとする。 * 環境構築の仕方 ホームディレクトリで下記を実行する。 #+begin_src shell :eval no git clone https://git.tojo.tokyo/init.el.git #+end_src =~/.emacs.d/init.el= の先頭に下記を追記。 #+begin_example (org-babel-load-file "~/init.el.git/init.org") #+end_example 設定はこれで完了。 環境依存の設定はこのファイルを変更するのではなくて、 =~/.emacs.d/init.el= に設定を追記するように。 * パッケージマネージャの導入 =straight.el= を導入する。 #+begin_src emacs-lisp (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) #+end_src * バックアップファイルを作らないようにする 助けられた経験よりも邪魔に感じることの方が明らかに多いため。 #+begin_src emacs-lisp (setq make-backup-files nil) #+end_src * インデントの設定 デフォルト設定は空白とタブを混ぜてインデントしてしまう。 空白のみを使ってインデントする。 #+begin_src emacs-lisp (setq-default indent-tabs-mode nil) #+end_src * 文字コードの設定 #+begin_src emacs-lisp (prefer-coding-system 'utf-8-unix) #+end_src * undo-tree-mode の設定 #+begin_src emacs-lisp (straight-use-package 'undo-tree) #+end_src #+begin_src emacs-lisp (setq undo-tree-auto-save-history nil) (global-undo-tree-mode) #+end_src * ベルを無効化する ベルが鳴らないようにする。 #+begin_src emacs-lisp (setq ring-bell-function 'ignore) #+end_src * SKK #+begin_src emacs-lisp (straight-use-package 'ddskk) #+end_src