General docstring+idempotency refactor
This commit is contained in:
parent
7c20a43be6
commit
2097498f3e
7 changed files with 35 additions and 25 deletions
|
@ -96,15 +96,15 @@
|
|||
("mime:image/*" "Messages with images" ?p)))
|
||||
|
||||
;; Add a column to display what email account the email belongs to.
|
||||
(cl-pushnew '(:account
|
||||
:name "Account"
|
||||
:shortname "Account"
|
||||
:help "Which account this email belongs to"
|
||||
:function
|
||||
(lambda (msg)
|
||||
(let ((maildir (mu4e-message-field msg :maildir)))
|
||||
(format "%s" (substring maildir 1 (string-match-p "/" maildir 1))))))
|
||||
mu4e-header-info-custom)
|
||||
(add-to-list 'mu4e-header-info-custom
|
||||
'(:account
|
||||
:name "Account"
|
||||
:shortname "Account"
|
||||
:help "Which account this email belongs to"
|
||||
:function
|
||||
(lambda (msg)
|
||||
(let ((maildir (mu4e-message-field msg :maildir)))
|
||||
(format "%s" (substring maildir 1 (string-match-p "/" maildir 1)))))))
|
||||
|
||||
;; In my workflow, emails won't be moved at all. Only their flags/labels are
|
||||
;; changed. Se we redefine the trash and refile marks not to do any moving.
|
||||
|
@ -157,12 +157,12 @@
|
|||
(imagemagick-register-types))
|
||||
|
||||
(after! evil
|
||||
(mapc (lambda (str) (evil-set-initial-state (car str) (cdr str)))
|
||||
'((mu4e-main-mode . normal)
|
||||
(mu4e-view-mode . normal)
|
||||
(mu4e-headers-mode . normal)
|
||||
(mu4e-compose-mode . normal)
|
||||
(mu4e~update-mail-mode . normal)))
|
||||
(cl-loop for str in '((mu4e-main-mode . normal)
|
||||
(mu4e-view-mode . normal)
|
||||
(mu4e-headers-mode . normal)
|
||||
(mu4e-compose-mode . normal)
|
||||
(mu4e~update-mail-mode . normal))
|
||||
do (evil-set-initial-state (car str) (cdr str)))
|
||||
|
||||
(setq mu4e-view-mode-map (make-sparse-keymap)
|
||||
;; mu4e-compose-mode-map (make-sparse-keymap)
|
||||
|
|
|
@ -242,7 +242,7 @@ across windows."
|
|||
(add-hook 'emacs-startup-hook #'evil-escape-mode)
|
||||
:config
|
||||
;; no `evil-escape' in minibuffer
|
||||
(push #'minibufferp evil-escape-inhibit-functions)
|
||||
(cl-pushnew #'minibufferp evil-escape-inhibit-functions)
|
||||
(map! :irvo "C-g" #'evil-escape))
|
||||
|
||||
|
||||
|
|
|
@ -74,10 +74,12 @@
|
|||
|
||||
(map! :map bibtex-mode-map "C-c \\" #'bibtex-fill-entry))
|
||||
|
||||
|
||||
(def-package! ivy-bibtex
|
||||
:when (featurep! :completion ivy)
|
||||
:commands ivy-bibtex)
|
||||
|
||||
|
||||
(def-package! helm-bibtex
|
||||
:when (featurep! :completion helm)
|
||||
:commands helm-bibtex)
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +org/browse-notes-for-major-mode ()
|
||||
"Browse org notes in `+org-code-notes-dir' in neotree, ido, ivy or helm --
|
||||
whichever is available."
|
||||
(interactive)
|
||||
(let ((dir (+org-mode-notes-dir)))
|
||||
(unless (file-in-directory-p dir +org-code-notes-dir)
|
||||
|
@ -28,5 +30,7 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +org/browse-notes-for-project ()
|
||||
"Browse org notes in `+org-project-notes-dir' in neotree, ido, ivy or helm --
|
||||
whichever is available."
|
||||
(interactive)
|
||||
(+org--explore-notes +org-project-notes-dir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue