diff options
Diffstat (limited to 'home/dots')
-rw-r--r-- | home/dots/.emacs | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index d01e85e..6adf77c 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -1319,7 +1319,7 @@ (use-package rmail :init - (defvar selected-rmail-account "") + (defvar selected-rmail-account "home") (defun rmail-reply-t () "Reply only to the sender of the current message. (See rmail-reply.)" (interactive) @@ -1371,23 +1371,17 @@ (setq rmail-primary-inbox-list (list (concat "imaps://" "marc.coquand%40piva.earth" ":" piva-password "@imap.gmail.com:993")) rmail-default-file "~/personal-db/mail/work/RMAIL" - rmail-remote-password-required nil - rmail-preserve-inbox nil - rmail-secondary-file-regexp "~/personal-db/mail/work/archives" rmail-file-name "~/personal-db/mail/work/RMAIL" user-mail-address "marc.coquand@piva.earth" unrmail-mbox-format 'mboxo user-full-name "Marc Coquand" message-default-headers "FCC: ~/personal-db/mail/work/out/sent.mbox" - selected-rmail-account 'work message-signature "Marc Coquand\nFounder at PivÄ")) (defun mail-home () (interactive) (setq rmail-default-file "~/personal-db/mail/home/RMAIL" - rmail-remote-password-required nil - rmail-preserve-inbox nil rmail-primary-inbox-list (list (concat "imaps://" "marcc%40fastmail.fr" ":" fastmail-password "@imap.fastmail.com:993")) rmail-secondary-file-regexp "~/personal-db/mail/home/archives/*.mbox" rmail-output-file-alist '(("\\[PATCH.*\\]" . "patch.mbox") @@ -1400,38 +1394,51 @@ user-mail-address "marc@coquand.email" unrmail-mbox-format 'mboxo user-full-name "Marc Coquand" - selected-rmail-account 'home message-default-headers "FCC: ~/personal-db/mail/home/out/sent.mbox" message-signature "Marc")) - (easy-menu-define rmail-prompt-account global-map "Account" - '("Options" - ["Home" mail-home] - ["Work" mail-work])) - (defun rmail-open-no-check () + "Set account and open rmail. Will not check for new messages." (interactive) (let ((prev selected-rmail-account)) - (tmm-prompt rmail-prompt-account) + (setq selected-rmail-account + (completing-read + "Account: " + '(("home" 1) ("work" 2)) nil t)) (unless (eq selected-rmail-account prev) ;; First kill all RMAIL buffers to not leave any dangling - (kill-matching-buffers "\\.mbox\\|^RMAIL" nil t))) + (kill-matching-buffers "\\.mbox\\|^RMAIL" nil t)) + (if (string= selected-rmail-account "home") + (mail-home)) + (if (string= selected-rmail-account "work") + (mail-work))) (rmail-no-check)) (defun rmail-open () + "Set account and open rmail. Will check for new messages" (interactive) (let ((prev selected-rmail-account)) - (tmm-prompt rmail-prompt-account) + (setq selected-rmail-account + (completing-read + "Account: " + '(("home" 1) ("work" 2)) nil t)) (unless (eq selected-rmail-account prev) ;; First kill all RMAIL buffers to not leave any dangling - (kill-matching-buffers "\\.mbox\\|^RMAIL" nil t))) + (kill-matching-buffers "\\.mbox\\|^RMAIL" nil t)) + (if (string= selected-rmail-account "home") + (mail-home)) + (if (string= selected-rmail-account "work") + (mail-work))) (rmail)) :custom + (rmail-remote-password-required nil) + (rmail-preserve-inbox nil) (rmail-mime-prefer-html nil) ;; Makes forwarding works as expected (rmail-enable-mime-composing nil) (rmail-displayed-headers "^\\(?:Cc\\|Date\\|From\\|Subject\\|To\\|List-Id\\):")) + (use-package mastodon :defer t :hook @@ -1440,6 +1447,8 @@ (mastodon-active-user "marcc") (mastodon-instance-url "https://fosstodon.org")) + + (use-package eww :custom (browse-url-browser-function 'eww-browse-url) ; Use eww as the default browser |