blob: dd770337d0be98e920d7ea13481a9be6095f57f3 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
#+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
|