diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-15 21:14:30 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-15 21:15:56 +0100 |
commit | 62327a06540e18a5cb4ed694b5ec06d5fd1e692b (patch) | |
tree | 636d425d91346273e778a37f8a3de75ce0a4bd0b | |
parent | 54bb3284cac9d4799d09b456e36876f9d660ef31 (diff) |
Add git-email-notmuch.el
Add integration with notmuch.
* git-email-notmuch.el (git-email-notmuch-apply-patch):
-rw-r--r-- | git-email-notmuch.el | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/git-email-notmuch.el b/git-email-notmuch.el new file mode 100644 index 0000000..0dccc17 --- /dev/null +++ b/git-email-notmuch.el @@ -0,0 +1,46 @@ +;;; git-email-notmuch.el --- Notmuch integration for git-email -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 yoctocell + +;; Author: yoctocell <public@yoctocell.xyz> +;; URL: https://git.sr.ht/~yoctocell/git-email +;; Version: 0.2.0 +;; Package-Requires: ((emacs "27") (project "0.5.0") (notmuch "0.30.0")) +;; Keywords: git mail +;; License: GNU General Public License >= 3 + +;; This program 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 of the License, or +;; (at your option) any later version. + +;; This program 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. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This library offers some extra functions to make git-email work +;; better with notmuch. + +;;; Code: + +(require 'git-email) +(require 'notmuch-show) + +;;;###autoload +(defun git-email-notmuch-apply-patch (project &optional thread) + "Apply the patch in the notmuch-show buffer using 'git am' in PROJECT. + +If THREAD is non-nil or if invoked with a prefix argument, apply the patches +in the whole thread instead of the current message." + (interactive (list (git-email--get-project)) "p") + (let ((default-directory project)) + (notmuch-show-pipe-message thread git-email-apply-patch-command))) + +(provide 'git-email-notmuch) +;;; git-email-notmuch.el ends here |