X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2Fconfiguration%2Fdon-configuration.org;h=eba219f92d602e338e3768d3bff5268837a9c9fe;hb=d5cfe2e7ba4ed4a433b9c7e58f4a49269fa471e2;hp=2ad5527fc0a3f2dcd795fc64b977df148bd665ea;hpb=b565b20b0def2023e7f3cbf5d58def92c5733435;p=lib.git diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index 2ad5527..eba219f 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -233,12 +233,16 @@ value, scrolling continues until there is no more output. *** Yasnippet #+BEGIN_SRC emacs-lisp -(use-package yasnippet - :ensure t - :diminish yas-minor-mode - :config (progn - (yas-global-mode) - (setq yas-verbosity 1))) + (use-package yasnippet + :ensure t + :diminish yas-minor-mode + :config (progn + (yas-global-mode) + (setq yas-verbosity 1) + (define-key yas-minor-mode-map (kbd "") nil) + (define-key yas-minor-mode-map (kbd "TAB") nil) + (define-key yas-minor-mode-map (kbd "") 'yas-expand) + )) #+END_SRC ** Helm Flx @@ -274,13 +278,13 @@ value, scrolling continues until there is no more output. :config (with-library 'tinyprocmail ;; (setq tinyprocmail--procmail-version "v3.22") (add-hook 'tinyprocmail--load-hook 'tinyprocmail-install)) - + ) #+END_SRC ** Magit #+BEGIN_SRC emacs-lisp :tangle don-configuration.el (use-package magit - :ensure f + :ensure t :config ;; don't verify where we are pushing (setq magit-push-always-verify nil) @@ -292,8 +296,7 @@ value, scrolling continues until there is no more output. load-path)) ) (use-package magit-annex - :ensure f - :config (require 'magit-annex) + :ensure t ) #+END_SRC @@ -357,107 +360,126 @@ value, scrolling continues until there is no more output. #+END_SRC ** LaTeX #+BEGIN_SRC emacs-lisp - (load "auctex.el" nil t t) - (load "preview-latex.el" nil t t) - (load "latex.el" nil t t) - - ;; this is in the very newest auctex; avoid for now - (add-to-list 'LaTeX-fill-excluded-macros - '("Sexpr")) - (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style") - ;; REFTEX (much enhanced management of cross-ref, labels, etc) - ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/ - (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) - (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) - (autoload 'reftex-citation "reftex-cite" "Make citation" nil) - (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) - (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode - (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode - (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode - (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode - - ; use smart quotes by default instead of `` and '' - ; taken from http://kieranhealy.org/esk/kjhealy.html - (setq TeX-open-quote "“") - (setq TeX-close-quote "”") - - ;; (TeX-add-style-hook - ;; "latex" - ;; (lambda () - ;; (TeX-add-symbols - ;; '("DLA" 1)))) - ;; (custom-set-variables - ;; '(font-latex-user-keyword-classes - ;; '(("fixme" - ;; ("DLA" "RZ") - ;; font-lock-function-name-face 2 (command 1 t)))) - ;; ) - - (require 'font-latex) - (setq font-latex-match-reference-keywords - '( - ("fref" "{") - ("Fref" "{") - ("citep" "{") - ("citet" "{") - ("acs" "{") - ("acsp" "{") - ("ac" "{") - ("acp" "{") - ("acl" "{") - ("aclp" "{") - ("acsu" "{") - ("aclu" "{") - ("acused" "{") - ; )) - ; (setq font-latex-match-warning-keywords - ; '( - ("DLA" "{") - ("RZ" "{") - ("OM" "{") - ("DL" "{") - ("fixme" "{"))) - - (setq-default TeX-parse-self t) - (setq-default TeX-auto-save t) - (setq-default TeX-master nil) - (eval-after-load - "latex" - '(TeX-add-style-hook - "cleveref" - (lambda () - (if (boundp 'reftex-ref-style-alist) - (add-to-list - 'reftex-ref-style-alist - '("Cleveref" "cleveref" - (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D))))) - (reftex-ref-style-activate "Cleveref") - (TeX-add-symbols - '("cref" TeX-arg-ref) - '("Cref" TeX-arg-ref) - '("cpageref" TeX-arg-ref) - '("Cpageref" TeX-arg-ref))))) - ;; this doesn't seem to work; not currently sure why - ; (setq font-latex-user-keyword-classes - ; '(("my-warning-commands" - ; (("DLA" "{") - ; ("RZ" "{") - ; ("OM" "{") - ; ("DL" "{") - ; ("fixme" "{") - ; ) - ; (:foreground "red" :weight bold :underline (:color foreground-color :style line))) - ; )) - - (setq-default reftex-default-bibliography - '("~/projects/research/references.bib")) - + (use-package tex + :defer t + :ensure auctex + :config + (add-to-list 'LaTeX-fill-excluded-macros + '("Sexpr")) + (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style") + ;; REFTEX (much enhanced management of cross-ref, labels, etc) + ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/ + (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) + (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) + (autoload 'reftex-citation "reftex-cite" "Make citation" nil) + (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) + (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode + (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode + (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode + (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode + + ;; support fake section headers + (setq TeX-outline-extra + '(("%chapter" 1) + ("%section" 2) + ("%subsection" 3) + ("%subsubsection" 4) + ("%paragraph" 5))) + ;; add font locking to the headers + (font-lock-add-keywords + 'latex-mode + '(("^%\\(chapter\\|\\(sub\\|subsub\\)?section\\|paragraph\\)" + 0 'font-lock-keyword-face t) + ("^%chapter{\\(.*\\)}" 1 'font-latex-sectioning-1-face t) + ("^%section{\\(.*\\)}" 1 'font-latex-sectioning-2-face t) + ("^%subsection{\\(.*\\)}" 1 'font-latex-sectioning-3-face t) + ("^%subsubsection{\\(.*\\)}" 1 'font-latex-sectioning-4-face t) + ("^%paragraph{\\(.*\\)}" 1 'font-latex-sectioning-5-face t))) + + ;; use smart quotes by default instead of `` and '' + ;; taken from http://kieranhealy.org/esk/kjhealy.html + (setq TeX-open-quote "“") + (setq TeX-close-quote "”") + + ;; (TeX-add-style-hook + ;; "latex" + ;; (lambda () + ;; (TeX-add-symbols + ;; '("DLA" 1)))) + ;; (custom-set-variables + ;; '(font-latex-user-keyword-classes + ;; '(("fixme" + ;; ("DLA" "RZ") + ;; font-lock-function-name-face 2 (command 1 t)))) + ;; ) + (setq-default TeX-parse-self t) + (setq-default TeX-auto-save t) + (setq-default TeX-master nil) + (eval-after-load + "latex" + '(TeX-add-style-hook + "cleveref" + (lambda () + (if (boundp 'reftex-ref-style-alist) + (add-to-list + 'reftex-ref-style-alist + '("Cleveref" "cleveref" + (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D))))) + (reftex-ref-style-activate "Cleveref") + (TeX-add-symbols + '("cref" TeX-arg-ref) + '("Cref" TeX-arg-ref) + '("cpageref" TeX-arg-ref) + '("Cpageref" TeX-arg-ref))))) + + (setq-default reftex-default-bibliography + '("~/projects/research/references.bib")) + (use-package font-latex + :config + (setq font-latex-match-reference-keywords + '( + ("fref" "{") + ("Fref" "{") + ("citep" "{") + ("citet" "{") + ("acs" "{") + ("acsp" "{") + ("ac" "{") + ("acp" "{") + ("acl" "{") + ("aclp" "{") + ("acsu" "{") + ("aclu" "{") + ("acused" "{") + ("DLA" "{") + ("RZ" "{") + ("OM" "{") + ("DL" "{") + ("fixme" "{")) + ) + ) + ) #+END_SRC ** Org #+BEGIN_SRC emacs-lisp (require 'org-mode-configuration) #+END_SRC +*** Org-Gcal +#+BEGIN_SRC emacs-lisp + (use-package calfw + :ensure f + ) + (use-package calfw-org + :ensure f + ) + (use-package org-gcal + :ensure f + :config '((if (file-readable-p "~/.hide/org_gcal.el") + (load-file "~/.hide/org_gcal.el")) + ) + ) +#+END_SRC ** ESS #+BEGIN_SRC emacs-lisp (use-package ess @@ -465,21 +487,36 @@ value, scrolling continues until there is no more output. :config (require 'ess_configuration)) #+END_SRC +** Rainbowmode +From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colorizes color strings + +#+BEGIN_SRC emacs-lisp + (use-package rainbow-mode + :ensure f + ;; add ess to the x major mode + :config (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[S]) + (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[R]) + ) +#+END_SRC ** Polymode #+BEGIN_SRC emacs-lisp - (setq load-path - (append '("~/lib/emacs_el/polymode/modes") - load-path)) - (require 'polymode) - (require 'poly-R) - (require 'poly-noweb) - (require 'poly-markdown) - (add-to-list 'auto-mode-alist '("\\.Snw" . poly-noweb+r-mode)) - (add-to-list 'auto-mode-alist '("\\.Rnw" . poly-noweb+r-mode)) - (add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode)) + (use-package polymode + :config + (use-package poly-R) + (use-package poly-noweb) + (use-package poly-markdown) + :mode ("\\.Snw" . poly-noweb+r-mode) + :mode ("\\.Rnw" . poly-noweb+r-mode) + :mode ("\\.Rmd" . poly-markdown+r-mode) + ) #+END_SRC +** Outlining +*** Outline magic +#+BEGIN_SRC emacs-lisp + (use-package outline-magic) +#+END_SRC * Keybindings ** Override other things #+BEGIN_SRC emacs-lisp @@ -491,7 +528,7 @@ value, scrolling continues until there is no more output. ; use iedit everywhere (define-key my-keys-minor-mode-map (kbd "C-;") 'iedit-mode) ;; use outline mode keybindings everywhere - (define-key my-keys-minor-mode-map (kbd "C-;") 'my/mydra-outline/body) + ;; (define-key my-keys-minor-mode-map (kbd "C-;") 'my/mydra-outline/body) (define-minor-mode my-keys-minor-mode "A minor mode so that my key settings override annoying major modes." @@ -581,14 +618,7 @@ value, scrolling continues until there is no more output. ; (require 'google-weather) ; (require 'org-google-weather) ; (setq-default org-google-weather-format "%i %c, [%l,%h] %s %C") - - ; http://julien.danjou.info/projects/emacs-packages#rainbow-mode - ; this colorizes color strings - (require 'rainbow-mode) - ; add ess to the x major mode - (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[S]) - (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[R]) - + (global-set-key "\C-xp" 'server-edit) (setq-default auto-mode-alist (cons '("\.wml$" . @@ -764,7 +794,7 @@ value, scrolling continues until there is no more output. (put 'downcase-region 'disabled nil) (put 'narrow-to-region 'disabled nil) - + (setq ispell-program-name "ispell") (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t) (add-hook 'message-mode-hook 'turn-on-flyspell) (add-hook 'text-mode-hook 'turn-on-flyspell)