Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (require 'org)
- (require 'ess-site)
- (require 'poly-org)
- (require 'poly-R)
- (require 'ispell)
- (custom-set-variables
- '(inferior-R-args "--no-restore-history --no-save ")
- '(inhibit-startup-screen t)
- '(org-export-coding-system (quote utf-8))
- '(org-latex-default-packages-alist (quote (("utf8" "inputenc" t) ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t) ("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "soul" t) ("" "textcomp" t) ("" "latexsym" t) ("" "hyperref" nil) "\\tolerance=1000")))
- '(org-latex-pdf-process (quote ("pdflatex -interaction nonstopmode -output-directory %o %f" "biber %b" "pdflatex -interaction nonstopmode -output-directory %o %f")))
- '(safe-local-variable-values (quote ((outline-minor-mode))))
- '(show-paren-mode t))
- ;; org-mode latex: remove temporary files.
- (setq backup-directory-alist
- `((".*" . ,temporary-file-directory)))
- (setq auto-save-file-name-transforms
- `((".*" ,temporary-file-directory t)))
- ;; activate hunspell (which is in path)
- (add-to-list 'ispell-local-dictionary-alist '("deutsch-hunspell"
- "[[:alpha:]]"
- "[^[:alpha:]]"
- "[']"
- t
- ("-d" "de_DE_comb"); Dictionary file name
- nil
- iso-8859-1))
- (add-to-list 'ispell-local-dictionary-alist '("english-hunspell"
- "[[:alpha:]]"
- "[^[:alpha:]]"
- "[']"
- t
- ("-d" "en_US")
- nil
- iso-8859-1))
- (setq ispell-program-name "hunspell" ; Use hunspell to correct mistakes
- ispell-dictionary "english-hunspell") ; Default dictionary to use
- (dolist (hook '(text-mode-hook))
- (add-hook hook (lambda () (flyspell-mode 1))))
- ;;(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
- ;; set nicer font
- (custom-set-faces
- '(default ((t (:inherit nil :stipple nil :background "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 113 :width normal :foundry "outline" :family "Consolas")))))
- ;; cua mode
- (setq cua-rectangle-mark-key (kbd "C-c r"))
- (cua-mode 1)
- (setq cua-auto-tabify-rectangles nil) ;; Don't tabify after rectangle commands
- (transient-mark-mode 1) ;; No region when it is not highlighted
- (setq ocua-keep-region-after-copy t) ;; Standard Windows behaviour
- (require 'ox-latex)
- (unless (boundp 'org-latex-classes)
- (setq org-latex-classes nil))
- (add-to-list 'org-latex-classes
- '("article"
- "\\documentclass{scrartcl}"
- ("\\section{%s}" . "\\section*{%s}")
- ("\\subsection{%s}" . "\\subsection*{%s}")
- ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
- ("\\paragraph{%s}" . "\\paragraph*{%s}")
- ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
- (add-to-list 'org-latex-classes
- '("apa6"
- "\\documentclass{apa6}"
- ("\\section{%s}" . "\\section*{%s}")
- ("\\subsection{%s}" . "\\subsection*{%s}")
- ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
- ("\\paragraph{%s}" . "\\paragraph*{%s}")
- ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
- (defun org-mode-reftex-setup ()
- (load-library "reftex")
- (and (buffer-file-name)
- (file-exists-p (buffer-file-name))
- (reftex-parse-all))
- (define-key org-mode-map (kbd "C-c b") 'reftex-citation)
- )
- (global-visual-line-mode 1)
- (remove-hook 'text-mode-hook #'turn-on-auto-fill)
- (add-hook 'org-mode-hook 'org-mode-reftex-setup)
- ;; ESS
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . nil)
- (R . t)))
- (setq inferior-R-program-name "C:/Program Files/R/R-3.1.1/bin/x64/rterm.exe")
- (setq org-babel-R-command "C:/Progra~1/R/R-3.1.1/bin/x64/rterm.exe --slave --no-save")
- (setq org-confirm-babel-evaluate nil)
- (setq ess-ask-for-ess-directory nil)
- (setq ess-local-process-name "R")
- (setq comint-scroll-to-bottom-on-input t)
- (setq comint-scroll-to-bottom-on-output t)
- (setq comint-move-point-for-output t)
- (add-hook 'ess-mode-hook
- '(lambda()
- (local-unset-key (kbd "_"))
- (local-set-key (kbd "M--") 'ess-insert-S-assign)
- ))
- (add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
- (add-to-list 'load-path "~/.emacs.d/")
- (require 'auto-complete-config)
- (add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
- (ac-config-default)
- (define-key (current-global-map) (kbd "C-M-ß") 'indent-region)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement