mu4e: Set org-capture date of emails to a week from the email's date
parent
5c1f06192f
commit
bd17f2514d
|
@ -336,9 +336,12 @@ This function could be useful in `mu4e-compose-mode-hook'."
|
|||
;;; Org captures
|
||||
(when (require 'org-mu4e nil t)
|
||||
(require 'init-org) ; For org-agenda-files
|
||||
(defun ambrevar/org-mail-date (&optional msg)
|
||||
(with-current-buffer (mu4e-get-headers-buffer)
|
||||
(mu4e-message-field (or msg (mu4e-message-at-point)) :date)))
|
||||
(add-to-list 'org-capture-templates
|
||||
`("t" "Mark e-mail in agenda" entry (file+headline ,(car org-agenda-files) "E-mails")
|
||||
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n"))
|
||||
"* %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"++7d\" nil (ambrevar/org-mail-date)))\n%a\n"))
|
||||
|
||||
;; TODO: Don't duplicate contacts.
|
||||
(defun ambrevar/mu4e-contact-dwim ()
|
||||
|
|
Loading…
Reference in New Issue