app/email: remove ineffective flags in refile/trash marks + revise mu4e bookmarks
This commit is contained in:
parent
4c19cd3e28
commit
f74c2ff618
1 changed files with 17 additions and 15 deletions
|
@ -90,14 +90,15 @@
|
||||||
(:from . 25)
|
(:from . 25)
|
||||||
(:subject)))
|
(:subject)))
|
||||||
|
|
||||||
(setq mu4e-bookmarks `((,(mapconcat (lambda (arg) (format " maildir:/%s/Inbox " arg))
|
(let ((inbox-query (mapconcat (lambda (arg) (format " maildir:/%s/Inbox " arg))
|
||||||
(mapcar #'car +email--accounts) " OR ")
|
(mapcar #'car +email--accounts) " OR ")))
|
||||||
"Inbox" ?i)
|
(setq mu4e-bookmarks `((,inbox-query "Inbox" ?i)
|
||||||
("flag:unread" "Unread messages" ?u)
|
(,(format "flag:unread AND (%s)" inbox-query)
|
||||||
("flag:flagged" "Starred messages" ?s)
|
"Unread messages" ?u)
|
||||||
("date:today..now" "Today's messages" ?t)
|
("flag:flagged" "Starred messages" ?s)
|
||||||
("date:7d..now" "Last 7 days" ?w)
|
("date:today..now" "Today's messages" ?t)
|
||||||
("mime:image/*" "Messages with images" ?p)))
|
("date:7d..now" "Last 7 days" ?w)
|
||||||
|
("mime:image/*" "Messages with images" ?p))))
|
||||||
|
|
||||||
(push '(:account
|
(push '(:account
|
||||||
:name "Account"
|
:name "Account"
|
||||||
|
@ -119,7 +120,7 @@
|
||||||
:dyn-target (lambda (target msg) (mu4e-get-trash-folder msg))
|
:dyn-target (lambda (target msg) (mu4e-get-trash-folder msg))
|
||||||
:action
|
:action
|
||||||
(lambda (docid msg target)
|
(lambda (docid msg target)
|
||||||
(mu4e~proc-move docid (mu4e~mark-check-target target) "+S-u-N")))
|
(mu4e~proc-move docid (mu4e~mark-check-target target) "-N")))
|
||||||
mu4e-marks)
|
mu4e-marks)
|
||||||
|
|
||||||
;; Refile will set mail to All Mail (basically archiving them). I want this to
|
;; Refile will set mail to All Mail (basically archiving them). I want this to
|
||||||
|
@ -130,7 +131,7 @@
|
||||||
:dyn-target (lambda (target msg) (mu4e-get-refile-folder msg))
|
:dyn-target (lambda (target msg) (mu4e-get-refile-folder msg))
|
||||||
:action
|
:action
|
||||||
(lambda (docid msg target)
|
(lambda (docid msg target)
|
||||||
(mu4e~proc-move docid (mu4e~mark-check-target target) "+S-u-N")))
|
(mu4e~proc-move docid (mu4e~mark-check-target target) "-u-N")))
|
||||||
mu4e-marks)
|
mu4e-marks)
|
||||||
|
|
||||||
;; This hook correctly modifies the \Inbox and \Starred flags on email when
|
;; This hook correctly modifies the \Inbox and \Starred flags on email when
|
||||||
|
@ -161,14 +162,15 @@
|
||||||
(def-package! evil-mu4e
|
(def-package! evil-mu4e
|
||||||
:after mu4e
|
:after mu4e
|
||||||
:when (featurep! :feature evil)
|
:when (featurep! :feature evil)
|
||||||
:init (defvar evil-mu4e-state 'normal)
|
:init (defvar evil-mu4e-state 'motion)
|
||||||
:config
|
:config
|
||||||
(defun +email|headers-keybinds ()
|
(defun +email|headers-keybinds ()
|
||||||
(map! :Ln "-" #'mu4e-headers-mark-for-unflag
|
(map! :Lm "-" #'mu4e-headers-mark-for-unflag
|
||||||
:Ln "+" #'mu4e-headers-mark-for-flag
|
:Lm "+" #'mu4e-headers-mark-for-flag
|
||||||
:Ln "v" #'evil-visual-line
|
:Lm "v" #'evil-visual-line
|
||||||
:Ln "q" #'mu4e~headers-quit-buffer
|
:Lm "q" #'mu4e~headers-quit-buffer
|
||||||
;; Enable multiple markings via visual mode
|
;; Enable multiple markings via visual mode
|
||||||
|
:Lv "ESC" #'evil-motion-state
|
||||||
:Lv "d" #'+email/mark-multiple
|
:Lv "d" #'+email/mark-multiple
|
||||||
:Lv "-" #'+email/mark-multiple
|
:Lv "-" #'+email/mark-multiple
|
||||||
:Lv "+" #'+email/mark-multiple
|
:Lv "+" #'+email/mark-multiple
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue