feat(emacs): more niceties
This commit is contained in:
parent
48e1c41198
commit
d1d3f31634
1 changed files with 57 additions and 14 deletions
|
|
@ -720,29 +720,29 @@ frame if FRAME is nil, and to 1 if AMT is nil."
|
|||
(setq org-agenda-custom-commands
|
||||
'(("n" "Dashboard"
|
||||
((tags-todo "+DEADLINE<\"<today>\""
|
||||
((org-agenda-overriding-header "Overdue!")))
|
||||
((org-agenda-overriding-header "⚠ Overdue!")))
|
||||
(agenda "" ((org-agenda-span 'day)
|
||||
(org-deadline-warning-days 7)
|
||||
(org-agenda-time-grid nil)
|
||||
(org-agenda-overriding-header "Today")))
|
||||
(org-agenda-overriding-header "📅 Today")))
|
||||
(todo "STARTED"
|
||||
((org-agenda-overriding-header "In Progress")))
|
||||
((org-agenda-overriding-header "🔨 In Progress")))
|
||||
(todo "WAITING"
|
||||
((org-agenda-overriding-header "Waiting")))
|
||||
((org-agenda-overriding-header "⏳ Waiting")))
|
||||
(tags-todo "+DEADLINE>=\"<today>\"+DEADLINE<=\"<+7d>\""
|
||||
((org-agenda-overriding-header "Due This Week")))
|
||||
((org-agenda-overriding-header "📆 Due This Week")))
|
||||
(tags-todo "inbox"
|
||||
((org-agenda-overriding-header "Inbox")))
|
||||
((org-agenda-overriding-header "📥 Inbox")))
|
||||
(agenda "" ((org-agenda-span 7)
|
||||
(org-agenda-start-day "+1d")
|
||||
(org-agenda-start-on-weekday nil)
|
||||
(org-agenda-show-all-dates t)
|
||||
(org-agenda-time-grid nil)
|
||||
(org-agenda-overriding-header "Next 7 Days")))
|
||||
(org-agenda-overriding-header "📅 Next 7 Days")))
|
||||
(alltodo ""
|
||||
((org-agenda-skip-function
|
||||
'(org-agenda-skip-entry-if 'scheduled 'deadline 'todo '("STARTED" "WAITING")))
|
||||
(org-agenda-overriding-header "Backlog")))))
|
||||
(org-agenda-overriding-header "📋 Backlog")))))
|
||||
("w" "Week View"
|
||||
((agenda "" ((org-agenda-span 'week)
|
||||
(org-deadline-warning-days 14)))))
|
||||
|
|
@ -811,11 +811,15 @@ frame if FRAME is nil, and to 1 if AMT is nil."
|
|||
(lambda ()
|
||||
(local-set-key (kbd "C-c C-s") 'mu4e-compose-sign-message)))
|
||||
|
||||
;; Keybindings: r for reply, R for reply-all
|
||||
(define-key mu4e-headers-mode-map (kbd "r") 'mu4e-compose-reply)
|
||||
(define-key mu4e-headers-mode-map (kbd "R") 'mu4e-compose-wide-reply)
|
||||
(define-key mu4e-view-mode-map (kbd "r") 'mu4e-compose-reply)
|
||||
(define-key mu4e-view-mode-map (kbd "R") 'mu4e-compose-wide-reply)
|
||||
;; Keybindings: r for reply, R for reply-all (use hooks to override defaults)
|
||||
(add-hook 'mu4e-headers-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key (kbd "r") 'mu4e-compose-reply)
|
||||
(local-set-key (kbd "R") 'mu4e-compose-wide-reply)))
|
||||
(add-hook 'mu4e-view-mode-hook
|
||||
(lambda ()
|
||||
(local-set-key (kbd "r") 'mu4e-compose-reply)
|
||||
(local-set-key (kbd "R") 'mu4e-compose-wide-reply)))
|
||||
|
||||
;; Keybinding: e for refile (archive)
|
||||
(define-key mu4e-headers-mode-map (kbd "e") 'mu4e-headers-mark-for-refile)
|
||||
|
|
@ -824,6 +828,45 @@ frame if FRAME is nil, and to 1 if AMT is nil."
|
|||
;; t to mark (u to unmark is default)
|
||||
(define-key mu4e-headers-mode-map (kbd "t") 'mu4e-headers-mark-for-something)
|
||||
|
||||
;; T to mark all messages (like neomutt T.)
|
||||
(defun mu4e-headers-mark-all-for-something ()
|
||||
"Mark all messages in current view for an action (prompts once)."
|
||||
(interactive)
|
||||
(let* ((mark (mu4e-read-option "Mark all as: "
|
||||
'(("Read" . read)
|
||||
("Unread" . unread)
|
||||
("Trash" . trash)
|
||||
("Delete" . delete)
|
||||
("Archive" . refile)
|
||||
("Move" . move)
|
||||
("Flag" . flag)
|
||||
("uNflag" . unflag))))
|
||||
;; For move, prompt for target folder once
|
||||
(target (when (eq mark 'move)
|
||||
(mu4e-ask-maildir "Move all to: ")))
|
||||
(count 0))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
;; Find first message
|
||||
(while (and (not (eobp))
|
||||
(not (get-text-property (point) 'msg)))
|
||||
(forward-line 1))
|
||||
;; Iterate through all messages
|
||||
(while (not (eobp))
|
||||
(when (get-text-property (point) 'msg)
|
||||
(cond
|
||||
((eq mark 'move)
|
||||
(mu4e-mark-at-point 'move target))
|
||||
((eq mark 'refile)
|
||||
(mu4e-mark-at-point 'refile (mu4e--mark-get-refile-target
|
||||
(mu4e-message-at-point))))
|
||||
(t
|
||||
(mu4e-mark-at-point mark nil)))
|
||||
(setq count (1+ count)))
|
||||
(forward-line 1)))
|
||||
(message "Marked %d messages for %s" count mark)))
|
||||
(define-key mu4e-headers-mode-map (kbd "T") 'mu4e-headers-mark-all-for-something)
|
||||
|
||||
;; Use completing-read (works with vertico)
|
||||
(setq mu4e-completing-read-function 'completing-read)
|
||||
|
||||
|
|
@ -851,7 +894,7 @@ frame if FRAME is nil, and to 1 if AMT is nil."
|
|||
(mu4e-drafts-folder . "/personal/[Gmail]/Drafts")
|
||||
(mu4e-sent-folder . "/personal/[Gmail]/Sent Mail")
|
||||
(mu4e-trash-folder . "/personal/[Gmail]/Trash")
|
||||
(mu4e-refile-folder . "/personal/[Gmail]/All Mail")
|
||||
(mu4e-refile-folder . "/personal/Archive")
|
||||
(message-sendmail-extra-arguments . ("--read-envelope-from" "-a" "personal"))))))
|
||||
|
||||
;; Set default context
|
||||
|
|
|
|||
Loading…
Reference in a new issue