1 ;; Added by Package.el. This must come before configurations of
2 ;; installed packages. Don't delete this line. If you don't want it,
3 ;; just comment it out by adding a semicolon to the start of the line.
4 ;; You may delete these explanatory comments.
7 ;; Use a dark theme now
8 (load-theme 'wheatgrass)
10 ;; ESS - for working in R
11 (autoload 'R-mode "ess-site.el" "Major mode for editing R source." t)
12 (setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path))
13 (load "/usr/share/emacs/site-lisp/ess/lisp/ess-site")
14 (setq inferior-julia-program-name "/usr/bin/julia")
16 ;; enable autocomplete
17 (add-hook 'after-init-hook 'global-company-mode)
22 (load "auctex.el" nil t t)
23 (load "preview-latex.el" nil t t)
25 ;; org-mode support for R and LaTeX
26 (org-babel-do-load-languages
27 'org-babel-load-languages
30 ;; Security risk - This is somewhat ill-advised it appears
31 (setq org-confirm-babel-evaluate nil)
33 ;; Automatically switch to various modes
35 '(("\\.mdwn\\'" . markdown-mode)
36 ("\\.md\\'" . markdown-mode)
37 ("\\.yarn\\'" . markdown-mode)
38 ("\\.js\\'" . js-mode)
39 ("\\.json\\'" . js-mode)
40 ("Makefile" . makefile-mode)
41 ("README" . markdown-mode)
42 ("NEWS" . markdown-mode)
43 ("COMMIT_EDITMSG\\'" . text-mode)
44 ("\\.html\\'" . html-mode)
45 ("\\.css\\'" . css-mode)
46 ("\\.yaml\\'" . yaml-mode)
47 ("\\.yml\\'" . yaml-mode)
48 ("\\.ick\\'" . yaml-mode)
49 ("\\.py\\'" . python-mode)
51 ("\\.org\\'" . org-mode)
52 ("\\.sh\\'" . shell-script-mode)
53 ("\\.hs\\'" . haskell-mode)))
55 ;; Enable the melpa archive for packages
57 (setq package-enable-at-startup nil)
58 (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
59 (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
60 (add-to-list 'package-archives
61 '("elpy" . "http://jorgenschaefer.github.io/packages/"))
64 ;; custom-set-variables was added by Custom.
65 ;; If you edit it by hand, you could mess it up, so be careful.
66 ;; Your init file should contain only one such instance.
67 ;; If there is more than one, they won't work right.
68 '(browse-url-browser-function 'browse-url-firefox)
69 '(org-export-backends '(ascii html icalendar latex md odt))
70 '(package-selected-packages
71 '(haskell-mode julia-mode elfeed-protocol ack company magit auctex lsp-mode elpy ## org htmlize leuven-theme lua-mode ess-smart-underscore ess-R-data-view ess)))
73 ;; custom-set-faces was added by Custom.
74 ;; If you edit it by hand, you could mess it up, so be careful.
75 ;; Your init file should contain only one such instance.
76 ;; If there is more than one, they won't work right.
77 '(default ((t (:family "Source Code Pro" :foundry "ADBO" :slant normal :weight normal :height 143 :width normal)))))
80 ;; Send mail using SMTP via mail.vanrenterghem.io.
81 (setq send-mail-function 'smtpmail-send-it)
82 (setq smtpmail-smtp-server "mail.vanrenterghem.io"
83 smtpmail-smtp-service 587
84 smtpmail-stream-type 'starttls)
85 (setq user-full-name "Frederik Vanrenterghem"
86 smtpmail-local-domain "vanrenterghem.io"
87 user-mail-address (concat "frederik@" smtpmail-local-domain))
88 (setq mail-default-headers
89 (concat "X-Mailer: GNU Emacs " (symbol-value 'emacs-version)))
90 (setq w3m-pop-up-frames t)
92 (global-set-key [remap list-buffers] 'ibuffer)
94 ;;; use pass (~/.password-store)
95 ;;; (see The Unix password store)
96 (auth-source-pass-enable)
98 ;; Elfeed news reader from Nextcloud
100 (require 'elfeed-protocol)
102 (setq elfeed-use-curl nil)
103 (elfeed-set-timeout 36000)
104 (setq elfeed-protocol-feeds '(
105 ("owncloud+https://frederik@owncloud.vanrenterghem.biz" :use-authinfo t)
107 (elfeed-protocol-enable)
108 (define-key elfeed-search-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-search-toggle-all '(star))))
109 (define-key elfeed-show-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-show-tag '(star))))
111 ;; Read email using mu4e
113 (setq mail-user-agent 'mu4e-user-agent)
114 (setq mu4e-get-mail-command "mbsync io")
115 (setq mu4e-use-fancy-chars t)
116 (setq mu4e-view-show-images t)
117 (setq mu4e-sent-folder "/Sent"
118 mu4e-drafts-folder "/Drafts"
119 mu4e-trash-folder "/Trash")