summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-03-25 20:31:53 -0400
committerKyle Meyer <kyle@kyleam.com>2016-03-25 20:31:53 -0400
commit05e2388914942fa10c0d23ba5070c20c0af6a445 (patch)
treeb2461e3dc30d06c0bbf94ec8c58c45f18c04846d /lisp
parent7261b8b20d6a1246cb3d19cf65229df4a884f7e3 (diff)
downloademacs.d-05e2388914942fa10c0d23ba5070c20c0af6a445.tar.gz
Add gnus-pipe-to-project command
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-mail.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/km-mail.el b/lisp/km-mail.el
index 9a3a3ab..35355c5 100644
--- a/lisp/km-mail.el
+++ b/lisp/km-mail.el
@@ -21,6 +21,7 @@
;;; Code:
(require 'dash)
+(require 'projectile)
(require 'gnus)
(require 'gnus-group)
(require 'gnus-topic)
@@ -127,6 +128,17 @@ to group buffer instead of moving to next group."
(shr-browse-url)
(shr-next-link))
+(defun km/gnus-pipe-to-project ()
+ "Call `gnus-summary-pipe-output' in project root."
+ (interactive)
+ (let ((default-directory (completing-read
+ "Project: "
+ (projectile-relevant-known-projects)))
+ (gnus-summary-pipe-output-default-command
+ (or gnus-summary-pipe-output-default-command
+ "git am")))
+ (call-interactively #'gnus-summary-pipe-output)))
+
;;; Message mode