summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-06-17 10:43:14 +0200
committerGravatar Tom Willemse2015-06-17 10:43:14 +0200
commit739f89bace4edad306b19f74919335715154858d (patch)
tree11cb5e252974fb6485c034a280beb8bf8883383c /emacs
parent26689b0eec2e45a389bb29952ae366bc655589e4 (diff)
downloaddotfiles-739f89bace4edad306b19f74919335715154858d.tar.gz
dotfiles-739f89bace4edad306b19f74919335715154858d.zip
Move magit settings to init.org
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el6
-rw-r--r--emacs/.emacs.d/init.org63
2 files changed, 63 insertions, 6 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 293881a..829644e 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -1165,10 +1165,6 @@ from myaethon2.core.decorators import (
(stante-after jit-lock
(setq jit-lock-defer-time 0.2))
-(stante-after magit
- (setq magit-repo-dirs '("~/projects/"))
- (setq magit-diff-refine-hunk 'all))
-
(stante-after message
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-sendmail-extra-arguments '("-a" "ryuslash")))
@@ -1525,8 +1521,6 @@ from myaethon2.core.decorators import (
(load (system-name) :noerror)
-(setq magit-last-seen-setup-instructions "1.4.0")
-
;;; Test
;; (defun my-special-buffer-predicate (buffer)
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 439c1dd..f4d8b30 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1276,6 +1276,69 @@
(setq browse-url-generic-program "conkeror"))
#+END_SRC
+* Magit
+
+ Recently Magit gained the annoying habit of producing a /huge/ warning
+ message whenever you don't tell it that you've already seen it. To
+ tell it you've already seen the message you need to specify the
+ following.
+
+ #+BEGIN_SRC emacs-lisp
+ (eval-and-compile
+ (defvar magit-last-seen-setup-instructions "1.4.0"))
+ #+END_SRC
+
+ I use a =defvar= here in order to keep the byte-compiler from
+ complaining about an undefined variable. It needs to be specified
+ before magit is loaded otherwise magit will keep complaining.
+
+** Project directory
+
+ I keep all my projects in =~/projects/=, so Magit shouldn't have to
+ look anywhere else.
+
+ #+NAME: magit-repo-dirs
+ #+BEGIN_SRC emacs-lisp :tangle no
+ (setq magit-repo-dirs '("~/projects/"))
+ #+END_SRC
+
+** Show fine differences
+
+ I like to see all the little differences in diffs that I can. They
+ really help reading diffs. I also just want to see them on all
+ diffs and not the selected one, which would make an unnecessary
+ amount of navigation required to properly read the diffs.
+
+ #+NAME: magit-diff-refine-hunk
+ #+BEGIN_SRC emacs-lisp :tangle no
+ (setq magit-diff-refine-hunk 'all)
+ #+END_SRC
+
+** Don't revert all the buffers
+
+ I'd never noticed it much before, but lately magit's habit of
+ reverting all the buffers after almost every action I perform has
+ become disturbingly slow. I personally don't rely on that
+ functionality being either off or on, so turning it off shouldn't
+ bother me too much.
+
+ #+NAME: magit-auto-revert-mode
+ #+BEGIN_SRC emacs-lisp :tangle no
+ (setq magit-auto-revert-mode nil)
+ #+END_SRC
+
+** Delay setting
+
+ The settings in the previous sections should only be set after
+ Magit has loaded.
+
+ #+BEGIN_SRC emacs-lisp :noweb yes
+ (stante-after magit
+ <<magit-repo-dirs>>
+ <<magit-diff-refine-hunk>>
+ <<magit-auto-revert-mode>>)
+ #+END_SRC
+
* Load custom file
I don't really use the Emacs customization interface much, but I