Compare commits

...

9 Commits

2 changed files with 35 additions and 21 deletions

View File

@@ -326,6 +326,7 @@ This returns a hash table of cid -> path."
ARG is passed directly to `message-send'."
;; This has to return a non-nil value so that org knows we handled the C-c C-c
(interactive "P")
(save-current-buffer
(let ((modified (buffer-modified-p))
;; we only restore the restriction if the sending below fails
(old-rest (cons (point-min) (point-max))))
@@ -343,7 +344,7 @@ ARG is passed directly to `message-send'."
(insert save-text)
(narrow-to-region (car old-rest) (cdr old-rest))
(restore-buffer-modified-p modified)
'failed)))))
'failed))))))
(defun org-mu4e-send-and-exit (&optional arg)
"Call `org-mu4e-send', the save and kill the buffer.

19
init.el
View File

@@ -4,6 +4,13 @@
(require 'cl-lib)
(require 'xdg)
;; Setup PATH
(dolist (file '("/usr/local/sbin" "~/.local/bin" "~/.ghcup/bin"
"/usr/bin/site_perl" "/usr/bin/vendor_perl"
"/usr/bin/core_perl"))
(add-to-list 'exec-path (directory-file-name
(expand-file-name file))))
;; Some other config files
(cl-eval-when (compile load eval)
(add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory))
@@ -2076,6 +2083,7 @@ This is :around advice, so OLDFUN is the real function
:ensure nil
:hook (sh-mode . my/-setup-sh-mode)
:init
(add-to-list 'auto-mode-alist '("/\\.envrc\\'" . sh-mode))
(defun my/-setup-sh-mode ()
(add-hook 'completion-at-point-functions #'cape-file nil t)))
@@ -3218,6 +3226,9 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
("C-c k" . khard-insert-email-contact))
:init
(require 'mu4e)
(evil-define-key '(normal motion) mu4e-headers-mode-map
"j" #'next-line
"k" #'previous-line)
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
(evil-define-key '(normal motion) mu4e-view-mode-map
"gy" #'mu4e-view-save-url
@@ -3266,7 +3277,7 @@ This is the same as `evil-ret' except that it works for links in
(concat "flag:unread AND NOT flag:trashed AND NOT "
"maildir:/protonmail/Trash AND NOT maildir:/protonmail/Spam AND NOT "
"maildir:/ucsc-gmail/[Gmail]/Trash AND NOT "
"maildir:/ucsc-gmail/[Gmail]/Spam")
"maildir:/ucsc-gmail/[Gmail]/Spam AND NOT maildir:\"/ucsc-gmail/[Gmail]/All Mail\"")
"Flag for mail which will appear as \"unread\" and will be notified.")
(setq message-kill-buffer-on-exit t
message-confirm-send t
@@ -3304,7 +3315,8 @@ This is the same as `evil-ret' except that it works for links in
(mu4e-refile-folder . "/protonmail/Archive")
(mu4e-sent-folder . "/protonmail/Sent")
(mu4e-drafts-folder . "/protonmail/Drafts")
(mu4e-trash-folder . "/protonmail/Trash")))
(mu4e-trash-folder . "/protonmail/Trash")
(mu4e-sent-messages-behavior . sent)))
(make-mu4e-context
:name "School"
:match-func (lambda (msg)
@@ -3319,7 +3331,8 @@ This is the same as `evil-ret' except that it works for links in
(mu4e-refile-folder . "/ucsc-gmail/[Gmail]/All Mail")
(mu4e-sent-folder . "/ucsc-gmail/[Gmail]/Sent Mail")
(mu4e-drafts-folder . "/ucsc-gmail/[Gmail]/Drafts")
(mu4e-trash-folder . "/ucsc-gmail/[Gmail]/Trash"))))))
(mu4e-trash-folder . "/ucsc-gmail/[Gmail]/Trash")
(mu4e-sent-messages-behavior . delete))))))
(use-package mu4e-alert
:after mu4e
:hook (after-init . mu4e-alert-enable-notifications)