From c875ce13310444e0d4628f2b40feb8bd7fc3ac70 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 8 Nov 2020 22:00:34 -0500 Subject: Add a dispatch transient for commands A standard prefix command would do, but since piem-b4 already depends on transient, use transient here as well to provide a more helpful interface. Message-Id: <20201109030034.11429-1-kyle@kyleam.com> --- piem.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'piem.el') diff --git a/piem.el b/piem.el index eb7b2f8..5ad2b94 100644 --- a/piem.el +++ b/piem.el @@ -5,7 +5,7 @@ ;; Author: Kyle Meyer ;; Keywords: vc, tools ;; Version: 0.1.0 -;; Package-Requires: ((emacs "26.3")) +;; Package-Requires: ((emacs "26.3") (transient "0.2.0")) ;; Homepage: https://git.kyleam.com/piem/about/ ;; This program is free software; you can redistribute it and/or modify @@ -43,6 +43,7 @@ (require 'piem-maildir) (require 'rfc2047) (require 'subr-x) +(require 'transient) (require 'url) (defvar url-http-end-of-headers) @@ -699,6 +700,13 @@ If CODEREPO is given, switch to this directory before calling (magit-status-setup-buffer) (dired ".")))) +;;;###autoload (autoload 'piem-dispatch "piem" nil t) +(define-transient-command piem-dispatch () + "Invoke a piem command." + [("a" "apply patch" piem-am) + ("b" "call b4-am" piem-b4-am) + ("i" "inject thread into maildir" piem-inject-thread-into-maildir)]) + (defun piem-please () -- cgit v1.2.3