From 4bd4d66eb06c51676a5f5d92fdb3ad112a10166a Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 19 Jun 2018 18:36:28 +0200 Subject: [PATCH] mu4e-conversation: Init --- evil-collection-mu4e-conversation.el | 62 ++++++++++++++++++++++++++++ evil-collection.el | 1 + 2 files changed, 63 insertions(+) create mode 100644 evil-collection-mu4e-conversation.el diff --git a/evil-collection-mu4e-conversation.el b/evil-collection-mu4e-conversation.el new file mode 100644 index 0000000..a2e4c9c --- /dev/null +++ b/evil-collection-mu4e-conversation.el @@ -0,0 +1,62 @@ +;;; evil-collection-mu4e-conversation.el --- Evil bindings for mu4e-conversation -*- lexical-binding: t -*- + +;; Copyright (C) 2018 Pierre Neidhardt + +;; Author: Pierre Neidhardt +;; Maintainer: James Nguyen +;; Pierre Neidhardt +;; URL: https://github.com/emacs-evil/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "24.4") (evil "1.2.10")) +;; Keywords: evil, mu4e, tools + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published +;; by the Free Software Foundation; either version 3, or (at your +;; option) any later version. +;; +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; For a full copy of the GNU General Public License +;; see . + +;;; Commentary: +;; Evil bindings for mu4e-conversation. + +;;; Code: + +(require 'evil) +(require 'mu4e-conversation nil t) + +(declare-function evil-collection-define-key "evil-collection") +(defconst evil-collection-mu4e-conversation-maps '(mu4e-conversation-mode-map + mu4e-conversation-linear-map + mu4e-conversation-tree-map)) + +(defun evil-collection-mu4e-conversation-setup () + "Set up `evil' bindings for `mu4e-conversation'." + (evil-define-key 'normal mu4e-conversation-linear-map + "zv" 'mu4e-conversation-toggle-view) + (evil-define-key 'normal mu4e-conversation-tree-map + "zv" 'mu4e-conversation-toggle-view) + (evil-define-key '(normal visual) mu4e-conversation-linear-map + "#" 'mu4e-conversation-toggle-hide-cited + "[" 'mu4e-conversation-previous-message ; TODO: Don't override previous-unread? There is still "gk". + "]" 'mu4e-conversation-next-message + "q" 'mu4e~view-quit-buffer) + (evil-define-key '(normal visual) mu4e-conversation-tree-map + "C" 'mu4e-compose-new + "R" 'mu4e-compose-reply + "p" 'mu4e-conversation-save-attachment + "o" 'mu4e-conversation-open-attachment + "cc" 'mu4e-compose-new + "cr" 'mu4e-compose-reply + "ce" 'mu4e-compose-edit + "cf" 'mu4e-compose-forward + "q" 'mu4e-conversation-quit)) + +(provide 'evil-collection-mu4e-conversation) +;;; evil-collection-mu4e-conversation.el ends here diff --git a/evil-collection.el b/evil-collection.el index 40f7a7c..a8110a5 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -122,6 +122,7 @@ or evil-collection.") magit ,@(when evil-collection-setup-minibuffer '(minibuffer)) mu4e + mu4e-conversation neotree notmuch nov