Advertisement
singmann

my .emacs file (windows, custom emacs installation)

Oct 8th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 5.00 KB | None | 0 0
  1.  
  2. (require 'org)
  3. (require 'ess-site)
  4. (require 'poly-org)
  5. (require 'poly-R)
  6. (require 'ispell)
  7.  
  8.  
  9. (custom-set-variables
  10.  '(inferior-R-args "--no-restore-history --no-save ")
  11.  '(inhibit-startup-screen t)
  12.  '(org-export-coding-system (quote utf-8))
  13.  '(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")))
  14.  '(org-latex-pdf-process (quote ("pdflatex -interaction nonstopmode -output-directory %o %f" "biber %b" "pdflatex -interaction nonstopmode -output-directory %o %f")))
  15.  '(safe-local-variable-values (quote ((outline-minor-mode))))
  16.  '(show-paren-mode t))
  17.  
  18. ;; org-mode latex: remove temporary files.
  19.  (setq backup-directory-alist
  20. `((".*" . ,temporary-file-directory)))
  21. (setq auto-save-file-name-transforms
  22. `((".*" ,temporary-file-directory t)))
  23.  
  24. ;; activate hunspell (which is in path)
  25. (add-to-list 'ispell-local-dictionary-alist '("deutsch-hunspell"
  26.                                               "[[:alpha:]]"
  27.                                               "[^[:alpha:]]"
  28.                                               "[']"
  29.                                               t
  30.                                               ("-d" "de_DE_comb"); Dictionary file name
  31.                                               nil
  32.                                               iso-8859-1))
  33.  
  34. (add-to-list 'ispell-local-dictionary-alist '("english-hunspell"
  35.                                               "[[:alpha:]]"
  36.                                               "[^[:alpha:]]"
  37.                                               "[']"
  38.                                               t
  39.                                               ("-d" "en_US")
  40.                                               nil
  41.                                               iso-8859-1))
  42.  
  43. (setq ispell-program-name "hunspell"          ; Use hunspell to correct mistakes
  44.       ispell-dictionary   "english-hunspell") ; Default dictionary to use
  45.  
  46. (dolist (hook '(text-mode-hook))
  47.   (add-hook hook (lambda () (flyspell-mode 1))))
  48. ;;(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
  49.  
  50. ;; set nicer font
  51. (custom-set-faces
  52.  '(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")))))
  53.  
  54. ;; cua mode
  55.  (setq cua-rectangle-mark-key (kbd "C-c r"))
  56.  (cua-mode 1)  
  57.    (setq cua-auto-tabify-rectangles nil) ;; Don't tabify after rectangle commands
  58.    (transient-mark-mode 1) ;; No region when it is not highlighted
  59.    (setq ocua-keep-region-after-copy t) ;; Standard Windows behaviour
  60.  
  61. (require 'ox-latex)
  62. (unless (boundp 'org-latex-classes)
  63.   (setq org-latex-classes nil))
  64. (add-to-list 'org-latex-classes
  65.              '("article"
  66.                "\\documentclass{scrartcl}"
  67.                ("\\section{%s}" . "\\section*{%s}")
  68.                ("\\subsection{%s}" . "\\subsection*{%s}")
  69.                ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  70.                ("\\paragraph{%s}" . "\\paragraph*{%s}")
  71.                ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
  72.  
  73. (add-to-list 'org-latex-classes
  74.              '("apa6"
  75.                "\\documentclass{apa6}"
  76.                ("\\section{%s}" . "\\section*{%s}")
  77.                ("\\subsection{%s}" . "\\subsection*{%s}")
  78.                ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  79.                ("\\paragraph{%s}" . "\\paragraph*{%s}")
  80.                ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
  81.  
  82. (defun org-mode-reftex-setup ()
  83. (load-library "reftex")
  84. (and (buffer-file-name)
  85. (file-exists-p (buffer-file-name))
  86. (reftex-parse-all))
  87. (define-key org-mode-map (kbd "C-c b") 'reftex-citation)
  88. )
  89.  
  90. (global-visual-line-mode 1)
  91. (remove-hook 'text-mode-hook #'turn-on-auto-fill)
  92.  
  93. (add-hook 'org-mode-hook 'org-mode-reftex-setup)
  94.  
  95.  
  96. ;; ESS
  97.  
  98. (org-babel-do-load-languages
  99. 'org-babel-load-languages
  100. '((emacs-lisp . nil)
  101. (R . t)))
  102.  
  103. (setq inferior-R-program-name "C:/Program Files/R/R-3.1.1/bin/x64/rterm.exe")
  104. (setq org-babel-R-command "C:/Progra~1/R/R-3.1.1/bin/x64/rterm.exe --slave --no-save")
  105. (setq org-confirm-babel-evaluate nil)
  106.  
  107. (setq ess-ask-for-ess-directory nil)
  108. (setq ess-local-process-name "R")
  109. (setq comint-scroll-to-bottom-on-input t)
  110. (setq comint-scroll-to-bottom-on-output t)
  111. (setq comint-move-point-for-output t)
  112.  
  113. (add-hook 'ess-mode-hook
  114.           '(lambda()
  115.              (local-unset-key (kbd "_"))
  116.              (local-set-key (kbd "M--") 'ess-insert-S-assign)
  117.              ))
  118.  
  119. (add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
  120.  
  121. (add-to-list 'load-path "~/.emacs.d/")
  122. (require 'auto-complete-config)
  123. (add-to-list 'ac-dictionary-directories "~/.emacs.d//ac-dict")
  124. (ac-config-default)
  125.  
  126. (define-key (current-global-map) (kbd "C-M-ß") 'indent-region)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement