2020-02-04 18:46:11 +00:00
|
|
|
* Table of Contents :TOC_3:noexport:
|
|
|
|
- [[#general-settings][General settings]]
|
|
|
|
- [[#projectile][Projectile]]
|
|
|
|
- [[#circe][Circe]]
|
|
|
|
- [[#org-mode][Org mode]]
|
|
|
|
- [[#general-settings-1][General settings]]
|
|
|
|
- [[#org-protocol-capture-html][org-protocol-capture-html]]
|
|
|
|
- [[#org-capture-templates][org-capture-templates]]
|
|
|
|
- [[#capture-web-data-for-org-protocol-capture-html][Capture web data for org-protocol-capture-html]]
|
|
|
|
- [[#mu4e][mu4e]]
|
|
|
|
- [[#elfeed][Elfeed]]
|
|
|
|
- [[#elfeed-and-elfeed-protocol-to-read-feeds][elfeed and elfeed-protocol to read feeds.]]
|
|
|
|
- [[#elfeed-org][elfeed-org]]
|
|
|
|
- [[#elfeed-goodies][elfeed-goodies]]
|
|
|
|
- [[#spelling][Spelling]]
|
|
|
|
|
2019-12-06 19:10:37 +00:00
|
|
|
* General settings
|
2019-12-18 23:18:57 +00:00
|
|
|
[[https://raw.githubusercontent.com/hlissner/emacs-doom-themes/screenshots/doom-molokai.png][doom-molokai screenshot]]
|
|
|
|
|
2020-02-02 12:12:22 +00:00
|
|
|
Variable font sizes depending on screen width. Set font to [[https://www.jetbrains.com/lp/mono/][JetBrains Mono]]
|
2019-12-18 23:18:57 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(when window-system
|
|
|
|
(if (> (x-display-pixel-width) 2560)
|
2020-02-02 12:12:22 +00:00
|
|
|
(setq doom-font (font-spec :family "JetBrains Mono" :size 12))
|
|
|
|
(setq doom-font (font-spec :family "JetBrains Mono" :size 16))))
|
2019-12-18 23:18:57 +00:00
|
|
|
|
|
|
|
#+END_SRC
|
|
|
|
Theme is set to doom-molokai from [[https://github.com/hlissner/emacs-doom-themes][doom-themes]]
|
2019-12-06 19:10:37 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
2019-12-18 23:18:57 +00:00
|
|
|
(setq doom-theme 'doom-molokai)
|
2019-12-06 19:10:37 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
2019-12-11 09:40:11 +00:00
|
|
|
Fetch password from authinfo
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(defun my-fetch-password (&rest params)
|
|
|
|
(require 'auth-source)
|
|
|
|
(let ((match (car (apply #'auth-source-search params))))
|
|
|
|
(if match
|
|
|
|
(let ((secret (plist-get match :secret)))
|
|
|
|
(if (functionp secret)
|
|
|
|
(funcall secret)
|
|
|
|
secret))
|
|
|
|
(error "Password not found for %S" params))))
|
|
|
|
#+END_SRC
|
2019-12-06 19:10:37 +00:00
|
|
|
* [[https://www.projectile.mx/en/latest/][Projectile]]
|
2019-12-07 12:58:47 +00:00
|
|
|
Set default paths [[https://www.projectile.mx/en/latest/][projectile]] should search
|
2019-12-06 19:10:37 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! projectile
|
|
|
|
:config
|
2019-12-30 18:37:50 +00:00
|
|
|
(setq projectile-project-search-path '("~/devel/personal/" "~/devel/andthensome/" "~/Documents/" "~/dotfiles" "~/private-dotfiles"))) ; Default paths
|
2019-12-06 19:10:37 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* [[https://github.com/jorgenschaefer/circe][Circe]]
|
|
|
|
Connect to [[https://wiki.znc.in/ZNC][ZNC]]. Passwords are gotten from [[https://www.passwordstore.org/][Password Store]].
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! circe
|
|
|
|
:config
|
|
|
|
(setq circe-network-options
|
|
|
|
`(
|
|
|
|
("znc-freenode"
|
|
|
|
:host "irc.higherlearning.eu"
|
|
|
|
:port "5000"
|
|
|
|
:tls t ;; Enable tls
|
|
|
|
:user "l0rd/freenode"
|
|
|
|
:server-buffer-name "⇄ Freenode (ZNC)"
|
|
|
|
:pass (lambda (&rest _) (+pass-get-secret "controlpanel/irc.higherlearning.eu")) ;; Get password from pass
|
|
|
|
:channels ("#emacs"))
|
|
|
|
("znc-snoonet"
|
|
|
|
:host "irc.higherlearning.eu"
|
|
|
|
:port "5000"
|
|
|
|
:tls t
|
|
|
|
:user "l0rd/snoonet"
|
|
|
|
:server-buffer-name "⇄ Snoonet (ZNC)"
|
|
|
|
:pass (lambda (&rest _) (+pass-get-secret "controlpanel/irc.higherlearning.eu"))
|
|
|
|
:channels ("#islam"))
|
|
|
|
))
|
|
|
|
)
|
2019-12-10 18:30:15 +00:00
|
|
|
(add-hook 'circe-channel-mode-hook 'enable-lui-autopaste)
|
2019-12-06 19:10:37 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* [[https://orgmode.org/][Org mode]]
|
2019-12-12 18:09:43 +00:00
|
|
|
** General settings
|
2019-12-06 19:10:37 +00:00
|
|
|
When moving entries up and down in the buffer use `j` and `k` instead of `↑` and `↓`
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(after! org
|
|
|
|
(map! :map org-mode-map
|
|
|
|
:n "M-j" #'org-metadown
|
|
|
|
:n "M-k" #'org-metaup)
|
|
|
|
)
|
|
|
|
#+END_SRC
|
|
|
|
|
2020-03-18 08:31:55 +00:00
|
|
|
Auto save org-mode files
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(add-hook 'auto-save-hook 'org-save-all-org-buffers)
|
|
|
|
#+END_SRC
|
|
|
|
|
2019-12-12 18:09:43 +00:00
|
|
|
- Set default org directories
|
2019-12-06 19:10:37 +00:00
|
|
|
- When task is set to `DONE` [[https://orgmode.org/manual/Closing-items.html][add timestamp and give the opportunity to type in a note]]
|
|
|
|
- Show images in buffers as default
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2019-12-07 14:20:18 +00:00
|
|
|
(setq org-directory "~/Documents/org"
|
2020-01-07 18:55:27 +00:00
|
|
|
org-agenda-files '("~/Documents/org" "~/Documents/org/freelance")
|
2019-12-06 19:10:37 +00:00
|
|
|
org-log-done 'note
|
|
|
|
org-startup-with-inline-images t)
|
|
|
|
#+END_SRC
|
2019-12-12 18:09:43 +00:00
|
|
|
** [[https://github.com/alphapapa/org-protocol-capture-html][org-protocol-capture-html]]
|
|
|
|
Require package
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2020-01-02 12:06:42 +00:00
|
|
|
(use-package! org-protocol-capture-html)
|
2019-12-12 18:09:43 +00:00
|
|
|
#+END_SRC
|
|
|
|
** org-capture-templates
|
|
|
|
*** Capture web data for [[https://github.com/alphapapa/org-protocol-capture-html][org-protocol-capture-html]]
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(after! org
|
|
|
|
(add-to-list 'org-capture-templates '("w" "Web site" entry
|
|
|
|
(file+olp "~/Documents/org/web.org" "Web")
|
2019-12-18 23:18:57 +00:00
|
|
|
"* %c\n%U %?%:initial"))
|
2019-12-12 18:09:43 +00:00
|
|
|
)
|
|
|
|
#+END_SRC
|
2019-12-10 18:30:15 +00:00
|
|
|
* [[https://www.djcbsoftware.nl/code/mu/mu4e.html][mu4e]]
|
|
|
|
Setup mu4e with multiple profiles
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! mu4e
|
|
|
|
:config
|
2019-12-11 08:32:30 +00:00
|
|
|
(setq sendmail-program "/usr/bin/msmtp"
|
|
|
|
send-mail-function
|
|
|
|
'smtpmail-send-it
|
|
|
|
message-sendmail-f-is-evil
|
|
|
|
t
|
|
|
|
message-sendmail-extra-arguments
|
|
|
|
'("--read-envelope-from")
|
|
|
|
message-send-mail-function
|
|
|
|
'message-send-mail-with-sendmail)
|
|
|
|
(setq mu4e-maildirs-extension-custom-list '("/ryankes/INBOX" "/ryankes/Sent" "/ryankes/Drafts"
|
|
|
|
"/ryankes/Archive" "/ryankes/Archive.quicknet"
|
|
|
|
"/gmail/INBOX" "/gmail/Sent" "/gmail/Drafts"
|
|
|
|
"/gmail/Archive" "/andthensome/INBOX" "/andthensome/Sent"
|
|
|
|
"/andthensome/Drafts" "/andthensome/Archive")))
|
2019-12-10 18:30:15 +00:00
|
|
|
(setq mu4e-maildir "~/.local/share/mail"
|
|
|
|
mu4e-maildir-shortcuts
|
|
|
|
'(("/ryankes/INBOX" . ?r)
|
|
|
|
("/gmail/INBOX" . ?g)
|
|
|
|
("/andthensome/INBOX" . ?a))
|
2020-02-28 17:49:24 +00:00
|
|
|
mu4e-mu-home
|
|
|
|
"~/.cache/mu"
|
2019-12-10 18:30:15 +00:00
|
|
|
mu4e-update-interval
|
|
|
|
300
|
|
|
|
mu4e-get-mail-command
|
|
|
|
"mailsync"
|
|
|
|
mu4e-enable-mode-line
|
|
|
|
t
|
|
|
|
mu4e-use-fancy-chars
|
|
|
|
t
|
|
|
|
mu4e-context-policy
|
|
|
|
'pick-first
|
|
|
|
mu4e-attachment-dir
|
|
|
|
"~/Downloads/")
|
|
|
|
(after! mu4e
|
2019-12-11 08:32:16 +00:00
|
|
|
;; load package to be able to capture emails for GTD
|
|
|
|
(require 'org-mu4e)
|
|
|
|
|
2019-12-10 18:30:15 +00:00
|
|
|
(setq mu4e-contexts
|
|
|
|
`(,(make-mu4e-context :name "Ryankes"
|
|
|
|
:match-func (lambda (msg)
|
|
|
|
(when msg
|
|
|
|
(string-match-p "^/ryankes"
|
|
|
|
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "ryan@ryankes.eu")
|
|
|
|
(user-full-name . "Ryan")
|
|
|
|
(mu4e-sent-folder . "/ryankes/Sent")
|
|
|
|
(mu4e-drafts-folder . "/ryankes/Drafts")
|
|
|
|
(mu4e-trash-folder . "/ryankes/Trash")
|
|
|
|
(mu4e-refile-folder . "/ryankes/Archive")))
|
|
|
|
,(make-mu4e-context :name "Gmail"
|
|
|
|
:match-func (lambda (msg)
|
|
|
|
(when msg
|
|
|
|
(string-match-p "^/gmail"
|
|
|
|
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "alrayyes@gmail.com")
|
|
|
|
(user-full-name . "Ryan")
|
|
|
|
(mu4e-sent-folder . "/gmail/Sent")
|
|
|
|
(mu4e-drafts-folder . "/gmail/Drafts")
|
|
|
|
(mu4e-trash-folder . "/gmail/Trash")
|
2019-12-11 08:58:07 +00:00
|
|
|
(mu4e-refile-folder . "/gmail/Archive")))
|
2019-12-10 18:30:15 +00:00
|
|
|
,(make-mu4e-context :name "Andthensome"
|
|
|
|
:match-func (lambda (msg)
|
|
|
|
(when msg
|
|
|
|
(string-match-p "^/andthensome"
|
|
|
|
(mu4e-message-field msg :maildir)))):vars'((user-mail-address . "ryan@andthensome.nl")
|
|
|
|
(user-full-name . "Ryan Kes")
|
|
|
|
(mu4e-sent-folder . "/andthensome/Sent")
|
|
|
|
(mu4e-drafts-folder . "/andthensome/Drafts")
|
|
|
|
(mu4e-trash-folder . "/andthensome/Trash")
|
2019-12-11 08:58:07 +00:00
|
|
|
(mu4e-refile-folder . "/andthensome/Archive"))))))
|
2019-12-10 18:30:15 +00:00
|
|
|
(add-hook 'mu4e-view-mode-hook 'visual-line-mode)
|
|
|
|
#+END_SRC
|
2019-12-11 16:50:40 +00:00
|
|
|
* [[https://github.com/skeeto/elfeed][Elfeed]]
|
2019-12-11 17:52:19 +00:00
|
|
|
** elfeed and [[https://github.com/fasheng/elfeed-protocol][elfeed-protocol]] to read feeds.
|
2019-12-11 16:50:40 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! elfeed
|
|
|
|
:config
|
|
|
|
(setq elfeed-use-curl t)
|
|
|
|
(elfeed-set-timeout 36000)
|
|
|
|
(setq elfeed-protocol-ttrss-maxsize 200) ; bigger than 200 is invalid
|
|
|
|
(elfeed-protocol-enable)
|
|
|
|
;
|
|
|
|
(defadvice elfeed (after configure-elfeed-feeds activate)
|
|
|
|
"Make elfeed-org autotags rules works with elfeed-protocol."
|
|
|
|
(defvar elfeed-protocol-tags)
|
|
|
|
(setq elfeed-protocol-tags elfeed-feeds)
|
|
|
|
(setq elfeed-feeds (list
|
|
|
|
(list "ttrss+https://alrayyes@rss.higherlearning.eu"
|
|
|
|
:password (password-store-get "emacs/rss")
|
|
|
|
:autotags elfeed-protocol-tags)))))
|
|
|
|
#+END_SRC
|
2019-12-11 17:52:19 +00:00
|
|
|
** [[https://github.com/remyhonig/elfeed-org][elfeed-org]]
|
2019-12-11 16:50:40 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! elfeed-org
|
|
|
|
:config
|
|
|
|
(setq rmh-elfeed-org-files '("~/Documents/org/elfeed.org"))
|
|
|
|
)
|
|
|
|
#+END_SRC
|
2019-12-11 17:52:19 +00:00
|
|
|
** [[https://github.com/algernon/elfeed-goodies][elfeed-goodies]]
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package! elfeed-goodies
|
|
|
|
:config
|
|
|
|
(elfeed-goodies/setup))
|
|
|
|
#+END_SRC
|
2020-01-02 12:06:42 +00:00
|
|
|
* Spelling
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(after! ispell
|
2020-01-05 23:04:51 +00:00
|
|
|
(setq ispell-dictionary "en_GB-large,nl_NL")
|
2020-01-02 12:06:42 +00:00
|
|
|
(ispell-set-spellchecker-params)
|
|
|
|
(ispell-hunspell-add-multi-dic "en_GB-large,nl_NL"))
|
|
|
|
#+END_SRC
|