Move magit settings to init.org

This commit is contained in:
Tom Willemse 2015-06-17 10:43:14 +02:00
parent 26689b0eec
commit 739f89bace
2 changed files with 63 additions and 6 deletions

View file

@ -1165,10 +1165,6 @@ from myaethon2.core.decorators import (
(stante-after jit-lock (stante-after jit-lock
(setq jit-lock-defer-time 0.2)) (setq jit-lock-defer-time 0.2))
(stante-after magit
(setq magit-repo-dirs '("~/projects/"))
(setq magit-diff-refine-hunk 'all))
(stante-after message (stante-after message
(setq message-send-mail-function 'message-send-mail-with-sendmail) (setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq message-sendmail-extra-arguments '("-a" "ryuslash"))) (setq message-sendmail-extra-arguments '("-a" "ryuslash")))
@ -1525,8 +1521,6 @@ from myaethon2.core.decorators import (
(load (system-name) :noerror) (load (system-name) :noerror)
(setq magit-last-seen-setup-instructions "1.4.0")
;;; Test ;;; Test
;; (defun my-special-buffer-predicate (buffer) ;; (defun my-special-buffer-predicate (buffer)

View file

@ -1276,6 +1276,69 @@
(setq browse-url-generic-program "conkeror")) (setq browse-url-generic-program "conkeror"))
#+END_SRC #+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 * Load custom file
I don't really use the Emacs customization interface much, but I I don't really use the Emacs customization interface much, but I