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 (add-to-list 'load-path "~/.emacs.d/lisp/")
9 ;; Use a dark theme now
10 ;(load-theme 'wheatgrass)
13 ;;(load-theme 'leuven t)
14 (load-theme 'modus-operandi t)
16 ;; ESS - for working in R
17 (autoload 'R-mode "ess-site.el" "Major mode for editing R source." t)
18 (setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path))
19 (load "/usr/share/emacs/site-lisp/ess/lisp/ess-site")
20 (setq inferior-julia-program-name "/usr/bin/julia")
22 ;; enable autocomplete
23 (add-hook 'after-init-hook 'global-company-mode)
28 (load "auctex.el" nil t t)
29 (load "preview-latex.el" nil t t)
31 ;; org-mode support for R and LaTeX
32 (org-babel-do-load-languages
33 'org-babel-load-languages
36 ;; Security risk - This is somewhat ill-advised it appears
37 (setq org-confirm-babel-evaluate nil)
39 ;; Automatically switch to various modes
41 '(("\\.mdwn\\'" . markdown-mode)
42 ("\\.md\\'" . markdown-mode)
43 ("\\.yarn\\'" . markdown-mode)
44 ("\\.js\\'" . js-mode)
45 ("\\.json\\'" . js-mode)
46 ("Makefile" . makefile-mode)
47 ("README" . markdown-mode)
48 ("NEWS" . markdown-mode)
49 ("COMMIT_EDITMSG\\'" . text-mode)
50 ("\\.html\\'" . html-mode)
51 ("\\.css\\'" . css-mode)
52 ("\\.yaml\\'" . yaml-mode)
53 ("\\.yml\\'" . yaml-mode)
54 ("\\.ick\\'" . yaml-mode)
55 ("\\.py\\'" . python-mode)
57 ("\\.org\\'" . org-mode)
58 ("\\.sh\\'" . shell-script-mode)
59 ("\\.hs\\'" . haskell-mode)
60 ("\\.el\\'" . emacs-lisp-mode)))
62 ;; Enable the melpa archive for packages
64 (setq package-enable-at-startup nil)
65 (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
66 (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
67 (add-to-list 'package-archives
68 '("elpy" . "http://jorgenschaefer.github.io/packages/"))
71 ;; custom-set-variables 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 '(browse-url-browser-function 'browse-url-firefox)
77 '("0cf95236abcf59e05b1ea69b4edd53d293a5baec4fe4c3484543fee99bfd2204" "80b00f3bf7cdbdca6c80aadfbbb03145f3d0aacf6bf2a559301e61109954e30a" default))
78 '(denote-directory "/home/frederik/Nextcloud/notes/" t)
79 '(org-export-backends '(ascii html icalendar latex md odt))
80 '(package-selected-packages
81 '(ftable flx nerd-icons-dired nerd-icons all-the-icons-dired marginalia vertico denote ox-rss org-ql org-contrib mustache org-static-blog 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)))
83 ;; custom-set-faces was added by Custom.
84 ;; If you edit it by hand, you could mess it up, so be careful.
85 ;; Your init file should contain only one such instance.
86 ;; If there is more than one, they won't work right.
87 '(default ((t (:family "Source Code Pro" :foundry "ADBO" :slant normal :weight normal :height 143 :width normal)))))
90 ;; Send mail using SMTP via mail.vanrenterghem.io.
91 (setq send-mail-function 'smtpmail-send-it)
92 (setq smtpmail-smtp-server "mail.vanrenterghem.io"
93 smtpmail-smtp-service 587
94 smtpmail-stream-type 'starttls)
95 (setq user-full-name "Frederik Vanrenterghem"
96 smtpmail-local-domain "vanrenterghem.io"
97 user-mail-address (concat "frederik@" smtpmail-local-domain))
98 (setq mail-default-headers
99 (concat "X-Mailer: GNU Emacs " (symbol-value 'emacs-version)))
100 (setq w3m-pop-up-frames t)
102 (global-set-key [remap list-buffers] 'ibuffer)
104 ;;; use pass (~/.password-store)
105 ;;; (see The Unix password store)
106 (auth-source-pass-enable)
108 ;; Elfeed news reader from Nextcloud
110 (require 'elfeed-protocol)
112 (setq elfeed-use-curl nil)
113 (elfeed-set-timeout 36000)
114 (setq elfeed-protocol-feeds '(
115 ("owncloud+https://frederik@owncloud.vanrenterghem.biz" :use-authinfo t)
117 (elfeed-protocol-enable)
118 (define-key elfeed-search-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-search-toggle-all '(star))))
119 (define-key elfeed-show-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-show-tag '(star))))
121 ;; Read email using mu4e
123 (setq mail-user-agent 'mu4e-user-agent)
124 (setq mu4e-get-mail-command "mbsync io")
125 (setq mu4e-use-fancy-chars t)
126 (setq mu4e-view-show-images t)
127 (setq mu4e-sent-folder "/Sent"
128 mu4e-drafts-folder "/Drafts"
129 mu4e-trash-folder "/Trash")
131 ;; Load configuration for website
132 ;(load "mustache-html")
135 (setq denote-directory "/home/frederik/Nextcloud/notes/")
137 ;; Dired configuration
138 (with-eval-after-load 'dired
140 ;; Set dired-x global variables here. For example:
141 ;; (setq dired-x-hands-off-my-keys nil)
143 (add-hook 'dired-mode-hook
145 ;; Set dired-x buffer-local variables here.
147 (dired-hide-details-mode 1)
148 (nerd-icons-dired-mode 1)
150 (setq delete-by-moving-to-trash t)
151 (setq dired-guess-shell-alist-user
152 '(("\\.\\(png\\|jpe?g\\|tiff\\)" "feh" "xdg-open")
153 ("\\.\\(mp[34]\\|m4a\\|ogg\\|flac\\|webm\\|mkv\\)" "mpv" "xdg-open")
156 ;; Use `vertico' package to get a vertical view of the minibuffer.
157 (setq vertico-resize nil)
160 ;; Use `marginalia' package. This will display useful
161 ;; annotations next to entries in the minibuffer. For example, when
162 ;; using M-x it will show a brief description of the command as well
163 ;; as the keybinding associated with it (if any).
166 ;; Use 'winner' mode to undo and redo windows changes
167 ;; using C-c <left> and C-c <right>.