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")
15 ;; enable autocomplete
16 (add-hook 'after-init-hook 'global-company-mode)
21 (load "auctex.el" nil t t)
22 (load "preview-latex.el" nil t t)
24 ;; org-mode support for R and LaTeX
25 (org-babel-do-load-languages
26 'org-babel-load-languages
29 ;; Security risk - This is somewhat ill-advised it appears
30 (setq org-confirm-babel-evaluate nil)
32 ;; Automatically switch to various modes
34 '(("\\.mdwn\\'" . markdown-mode)
35 ("\\.md\\'" . markdown-mode)
36 ("\\.yarn\\'" . markdown-mode)
37 ("\\.js\\'" . js-mode)
38 ("\\.json\\'" . js-mode)
39 ("Makefile" . makefile-mode)
40 ("README" . markdown-mode)
41 ("NEWS" . markdown-mode)
42 ("COMMIT_EDITMSG\\'" . text-mode)
43 ("\\.html\\'" . html-mode)
44 ("\\.css\\'" . css-mode)
45 ("\\.yaml\\'" . yaml-mode)
46 ("\\.yml\\'" . yaml-mode)
47 ("\\.ick\\'" . yaml-mode)
48 ("\\.py\\'" . python-mode)
50 ("\\.org\\'" . org-mode)
51 ("\\.sh\\'" . shell-script-mode)))
53 ;; Enable the melpa archive for packages
55 (setq package-enable-at-startup nil)
56 (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
57 (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
58 (add-to-list 'package-archives
59 '("elpy" . "http://jorgenschaefer.github.io/packages/"))
62 ;; custom-set-variables was added by Custom.
63 ;; If you edit it by hand, you could mess it up, so be careful.
64 ;; Your init file should contain only one such instance.
65 ;; If there is more than one, they won't work right.
66 '(browse-url-browser-function 'browse-url-firefox)
67 '(org-export-backends '(ascii html icalendar latex md odt))
68 '(package-selected-packages
69 '(elfeed-protocol ack company magit auctex lsp-mode elpy ## org htmlize leuven-theme lua-mode ess-smart-underscore ess-R-data-view ess)))
71 ;; custom-set-faces was added by Custom.
72 ;; If you edit it by hand, you could mess it up, so be careful.
73 ;; Your init file should contain only one such instance.
74 ;; If there is more than one, they won't work right.
75 '(default ((t (:family "Source Code Pro" :foundry "ADBO" :slant normal :weight normal :height 143 :width normal)))))
78 ;; Send mail using SMTP via mail.vanrenterghem.io.
79 (setq send-mail-function 'smtpmail-send-it)
80 (setq smtpmail-smtp-server "mail.vanrenterghem.io"
81 smtpmail-smtp-service 587
82 smtpmail-stream-type 'starttls)
83 (setq user-full-name "Frederik Vanrenterghem"
84 smtpmail-local-domain "vanrenterghem.io"
85 user-mail-address (concat "frederik@" smtpmail-local-domain))
86 (setq mail-default-headers
87 (concat "X-Mailer: GNU Emacs " (symbol-value 'emacs-version)))
88 (setq w3m-pop-up-frames t)
90 (global-set-key [remap list-buffers] 'ibuffer)
92 ;;; use pass (~/.password-store)
93 ;;; (see The Unix password store)
94 (auth-source-pass-enable)
96 ;; Elfeed news reader from Nextcloud
98 (require 'elfeed-protocol)
100 (setq elfeed-use-curl nil)
101 (elfeed-set-timeout 36000)
102 (setq elfeed-protocol-feeds '(
103 ("owncloud+https://frederik@owncloud.vanrenterghem.biz" :use-authinfo t)
105 (elfeed-protocol-enable)
106 (define-key elfeed-search-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-search-toggle-all '(star))))
107 (define-key elfeed-show-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-show-tag '(star))))