commit c4a16cfbfcad70b60c3b03901a2ea60cf817cf87 parent ef6108f45e931ee440e8f2fa48133f796ad56dea Author: Ashymad <czilukim@o2.pl> Date: Tue, 5 Dec 2017 11:19:22 +0100 merge .emacs from master branch Diffstat:
| M | .emacs | | | 42 | +++++++++++++++++++++++++++++++++++++++--- |
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/.emacs b/.emacs @@ -8,12 +8,48 @@ (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) -;; (require 'paradox) -;; (paradox-enable) +(setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path)) +(require 'ess-site) +(load "auctex.el" nil t t) +(load "preview-latex.el" nil t t) + +(add-to-list 'load-path "~/.emacs.d/evil") (require 'evil) (evil-mode 1) +(setq TeX-source-correlate-mode t + TeX-source-correlate-start-server t) + +(setq ess-swv-pdflatex-commands (quote ("pdflatex" "texi2pdf" "make"))) + +(setq ess-swv-processor 'knitr) + +(require 'ess-site) +(setq ess-swv-plug-into-AUCTeX-p t) + +(defun ess-swv-add-TeX-commands () + "Add commands to AUCTeX's \\[TeX-command-list]." + (unless (and (featurep 'tex-site) (featurep 'tex)) + (error "AUCTeX does not seem to be loaded")) + (add-to-list 'TeX-command-list + '("Knit" "Rscript -e \"library(knitr); knit('%t')\"" + TeX-run-command nil (latex-mode) :help + "Run Knitr") t) + (add-to-list 'TeX-command-list + '("LaTeXKnit" "%l %(mode) %s" + TeX-run-TeX nil (latex-mode) :help + "Run LaTeX after Knit") t) + (setq TeX-command-default "Knit") + (mapc (lambda (suffix) + (add-to-list 'TeX-file-extensions suffix)) + '("nw" "Snw" "Rnw"))) + +(defun ess-swv-remove-TeX-commands (x) + "Helper function: check if car of X is one of the Knitr strings" + (let ((swv-cmds '("Knit" "LaTeXKnit"))) + (unless (member (car x) swv-cmds) x))) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -24,7 +60,7 @@ '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]) '(custom-enabled-themes (quote (tsdh-dark))) - '(package-selected-packages (quote (## evil paradox))) + '(package-selected-packages (quote (evil ## polymode paradox))) '(tool-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom.