-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Mastodon and NotMuch; we are not a kitchen sink :)
- Loading branch information
Showing
4 changed files
with
3 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,146 +141,6 @@ For Unicode emojis, install an emoji font like [[http://legionfonts.com/fonts/se | |
|
||
If you want to use your own fonts, do change the configuration, around line 90 in ~config.el~. | ||
|
||
In order to read email with Emacs, we need to install and configure =offlineimap= for synchronizing with the remote email server, =notmuch= for tagging the email, and =msmtp= for sending email. | ||
|
||
The following assumes that you are using Gmail. If you are not, see this article: [[https://www.maketecheasier.com/use-email-within-emacs/][How to Use Email within Emacs - Make Tech Easier]] | ||
|
||
We need to generate an application password here: [[https://myaccount.google.com/apppasswords][Application Passwords - Google Account]] | ||
|
||
Choose application password for “Mail”, and write the password down. | ||
|
||
**** Offlineimap | ||
#+begin_src bash | ||
sudo pacman -S offlineimap | ||
#+end_src | ||
|
||
Create a file called =.offlineimaprc= in your home directory, with the following contents: | ||
#+begin_src conf | ||
[general] | ||
accounts = gmailaccount | ||
|
||
[Account gmailaccount] | ||
localrepository = localgmail | ||
remoterepository = remotegmail | ||
postsynchook = ~/mail/postsync.sh # notmuch tagging script | ||
utf8foldernames = yes | ||
|
||
[Repository localgmail] | ||
type = GmailMaildir | ||
localfolders = /home/username/mail/[email protected] | ||
|
||
[Repository remotegmail] | ||
type = Gmail | ||
maxconnections=1 | ||
remotehost = imap.gmail.com | ||
remoteuser = [email protected] | ||
remotepass = PASSWORD | ||
ssl = yes | ||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt | ||
#+end_src | ||
|
||
Now run Offlineimap: | ||
#+begin_src bash | ||
offlineimap | ||
#+end_src | ||
It should, hopefully, download the email into ~/home/username/mail/username@gmail/~. | ||
**** Notmuch | ||
#+begin_src bash | ||
sudo pacman -S notmuch | ||
#+end_src | ||
|
||
The =.notmuch-config= file in my home directory: | ||
#+begin_src conf | ||
# .notmuch-config - Configuration file for the notmuch mail system | ||
# Database configuration | ||
[database] | ||
|
||
# User configuration | ||
[user] | ||
[email protected] | ||
|
||
# Configuration for "notmuch new" | ||
[new] | ||
tags=inbox;unread; | ||
ignore= | ||
|
||
# Search configuration | ||
[search] | ||
exclude_tags = junk;deleted; | ||
|
||
# Maildir compatibility configuration | ||
[maildir] | ||
synchronize_flags=true | ||
#+end_src | ||
|
||
Now we need to create an =Offlineimap= postsync hook so that it can run =notmuch new= after synchronizing with the remote email server. | ||
|
||
Create a file called =postsync.sh= in ~/home/username/mail/~: | ||
#+begin_src bash | ||
#!/usr/bin/env bash | ||
# ~/mail/postsync.sh | ||
|
||
# tag_new <tags> <search-term> | ||
function tag_new { notmuch tag $1 -- tag:inbox and $2; } | ||
|
||
# blacklist <search-term> | ||
function blacklist { tag_new "-inbox -unread +deleted" $1; } | ||
|
||
# spam <search-term> | ||
function spam { tag_new "-inbox -unread +spam +deleted" $1; } | ||
|
||
# security <search-term> | ||
function security { tag_new "-inbox +Security" $1; } | ||
|
||
# update : let notmuch process new mails | ||
notmuch new | ||
#+end_src | ||
Make the file executable: | ||
#+begin_src bash | ||
chmod +x postsync.sh | ||
#+end_src | ||
|
||
**** msmtp | ||
#+begin_src bash | ||
sudo pacman -S msmtp | ||
#+end_src | ||
Create a file called =.msmtprc= in your home directory: | ||
#+begin_src conf | ||
# Set default values for all following accounts. | ||
defaults | ||
auth on | ||
tls on | ||
tls_trust_file /etc/ssl/certs/ca-certificates.crt | ||
logfile ~/.msmtp.log | ||
|
||
# Gmail | ||
account gmail | ||
host smtp.gmail.com | ||
port 465 | ||
tls_starttls off | ||
from [email protected] | ||
user username | ||
password PASSWORD | ||
|
||
# Set a default account | ||
account default : gmail | ||
#+end_src | ||
Set the correct permissions on the file: | ||
#+begin_src bash | ||
chmod 600 .msmtprc | ||
#+end_src | ||
See this wiki article for reference: [[https://wiki.archlinux.org/title/Msmtp#Basic_setup][msmtp - ArchWiki]] | ||
|
||
**** Notmuch Address Lookup tool | ||
To aid in looking up email addresses for auto-completion, we need to download (via git) and compile an address lookup tool coded in C. | ||
#+begin_src bash | ||
git clone [email protected]:aperezdc/notmuch-addrlookup-c.git | ||
cd notmuch-addrlookup-c | ||
make | ||
#+end_src | ||
See [[https://github.com/aperezdc/notmuch-addrlookup-c][aperezdc/notmuch-addrlookup-c]] for details. | ||
*** Maim and Gifsicle | ||
For creating gif screencasts, we use Maim and Gifsicle. Install =maim= and =gifsicle= using your package manager of choice. | ||
#+begin_src bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,6 @@ | |
"~/enestaaende/enestaaende.org" | ||
"~/Dropbox/skriv/habits/habits.org")) | ||
|
||
(defvar my-notmuch-address-command "/home/moena/notmuch-addrlookup-c/notmuch-addrlookup") | ||
(defvar my-puppeteer-config-file "/home/moena/puppeteerConfigFile.json") | ||
(defvar my-flymake-vale-executable "/home/moena/bin/vale") | ||
|
||
|
@@ -73,9 +72,6 @@ | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(setq user-full-name "Jacob Moena" | ||
user-mail-address "[email protected]" | ||
user-mail-domain "gmail.com" | ||
user-instance-url "https://writing.exchange" | ||
mastodon-username "@jacmoe" | ||
) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
@@ -195,7 +191,6 @@ | |
(remove-hook 'doom-first-buffer-hook #'global-hl-line-mode) ; Do not highlight current line | ||
(setq global-page-break-lines-mode t) ; Pretty page breaks everywhere | ||
(setq confirm-kill-processes nil) ; Don't ask to kill running processes when exiting Emacs. | ||
(setq +notmuch-sync-backend 'offlineimap) | ||
(add-hook 'text-mode-hook (lambda () (setq-local line-spacing 0.1))) ; Setting a more comfortable line spacing for prose | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
@@ -314,8 +309,6 @@ | |
;; Emacs-everywhere | ||
;; Atomic-chrome | ||
;; Engine-mode | ||
;; Mastodon | ||
;; Smtpmail | ||
;; Keycast | ||
;; Gif-screencast | ||
;; Olivetti-mode | ||
|
@@ -976,39 +969,6 @@ | |
"https://github.com/search?ref=simplesearch&q=%s" | ||
:keybinding "g")) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; ;; | ||
;;; Mastodon ;; | ||
;; ;; | ||
;; https://codeberg.org/martianh/mastodon.el ;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(setq mastodon-instance-url user-instance-url | ||
mastodon-active-user mastodon-username | ||
mastodon-toot--download-custom-emoji t | ||
mastodon-toot--enable-custom-emoji t | ||
mastodon-toot--enable-completion t) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; ;; | ||
;;; Smtpmail ;; | ||
;; ;; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
(setq mail-host-address user-mail-domain) | ||
(setq user-full-name user-full-name) | ||
(setq user-mail-adress user-mail-address) | ||
(setq mail-user-agent 'message-user-agent) | ||
(setq message-send-mail-function 'message-send-mail-with-sendmail) | ||
(setq message-kill-buffer-on-exit t) | ||
(setq mail-specify-envelope-from t) | ||
(setq sendmail-program "/usr/bin/msmtp" | ||
mail-specify-envelope-from t | ||
mail-envelope-from 'header | ||
message-sendmail-envelope-from 'header) | ||
|
||
(require 'notmuch-address) | ||
(setq notmuch-address-command my-notmuch-address-command) | ||
|
||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; ;; | ||
;;; Keycast ;; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters