Literate configuration for post-custom.el.
;;; post-custom.el --- Emacs customization -*- lexical-binding: t -*-
;; Copyright (c) 2022 mattiasdrp and contributors.
;; Author: mattiasdrp
;; Maintainer: mattiasdrp <https://github.com/mattiasdrp>
;; Created: 17 august 2022
;; Version: 1.0
;; Licence: MIT
;; Keywords: emacs, init, convenience, configuration
;; URL: https://github.com/mattiasdrp/pokemacs
;;; Commentary:
;; This file will be loaded when emacs has finished initializing everything
;; and allows to override some bindings and behaviours that are not
;; controlled by custom.el
;;; Code:
Based on this tutorial. For WSL see this
- Create directories for your mails
.maildir ├── acc1 ├── acc2 └── acc3
- Install mu4e from the latest release.
- Fill a
.mbsyncrc
with the following fields (for each account):IMAPAccount acc Host imap.mail.me.com User imap-user PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/mu4e/.mbsyncpass-acc.gpg" Port 993 SSLType IMAPS SSLVersions TLSv1.2 AuthMechs PLAIN SystemCertificates no CertificateFile /etc/ssl/certs/ca-certificates.crt IMAPStore acc-remote Account acc MaildirStore acc-local SubFolders Verbatim Path ~/.maildir/acc/ Inbox ~/.maildir/acc/INBOX Channel acc Far :acc-remote: Near :acc-local: Patterns * Create Near Sync All Expunge Both SyncState *
- To create
.mbsyncpass-acc.gpg
store your password in.mbsyncpass-acc
and encrypt withgpg2 -c .mbsyncpass-acc
before removing the original file. - Synchronise all your mails with
mbsync -aV
- Initialise
mu4e
withmu init -m ~/.maildir \ --my-address [email protected] \ --my-address [email protected] \ --my-address [email protected]
- Create the index with
mu index
- Fill a
.msmtprc
with the following fields (for each account):# Set default values for all the accounts. defaults logfile ~/.maildir/msmtp.log tls_trust_file /etc/ssl/certs/ca-certificates.crt # ====================================================================== account acc auth on host smtp.mail.me.com port 465 protocol smtp from [email protected] user smtp-login passwordeval "gpg2 -q --for-your-eyes-only --no-tty -d ~/mu4e/.mbsyncpass-acc.gpg" tls on tls_starttls off
(when use-mu4e
(use-package smtpmail
:ensure nil
:ensure-system-package msmtp))
;; (load-file (expand-file-name "~/mu4e/mu4e.el"))
You can unbind anything you want.
;; (general-unbind
;; "C-o"
;; )
(notice the quote before the name of the map)
;; (general-unbind
;; :keymaps 'tuareg-mode-map
;; "C-c TAB"
;; )
You can bind anything you want.
;; (general-define-key
;; "C-x 1" 'delete-other-windows
;; )
Grouped under a prefix, allowing to define multiple keybindings under the same prefix without having to rewrite the prefix.
;; (general-define-key
;; :prefix "M-z"
;; "w" 'mdrp/resize-window-width
;; "h" 'mdrp/resize-window-height)
(notice the quote before the name of the map)
;; (general-define-key
;; :keymaps 'tuareg-mode-map
;; "C-x M-1" 'delete-other-windows
;; )
You can obviously combine :keymaps
and :prefix
(provide 'post-custom)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; post-custom.el ends here