From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4ea1::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id qE7CN3H0zGHEYQAAsNZ9tg (envelope-from ); Wed, 29 Dec 2021 23:51:13 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CGq4NHH0zGGruQAAG6o9tA (envelope-from ); Thu, 30 Dec 2021 00:51:13 +0100 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1640821873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3FhM3LlwiNAsDQGINLD1C7Lgx3B/PtzkjMCPvEGOigA=; b=LfiCMisIDdoRGHbtRpdR9NCFMb9NlHulhdbjDcmQm6gQoNiYDOunpDZEpTHFna/KvSLL+H YCUP1Bb3abqq+jrWOUdluy9zNIkF4b8m6hKpF3C+SOPaFi5R3kCZ4RfV1CdZtQdQeVNJ7J BMYXDtzNi4uVqg8e7jv9hIOTEFSHWvqKo13Z+hlO+JD0prlo+9+B/yfrnbTuGLRqbUVHYJ 4uUxEhm/Jn/UiP9NWNIo40JSOy+n4L6/QpkKFJ7+XWogA3vowHKNDo7pjQiHWEEN1IKRcy 31ejBg/BSUVIuqSzA1hoQ5Jecp0tS1HXHiTQ66fw6rTRBVeZIVqSHucQYM5EjQ== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [RFC PATCH 13/14] am: Move functionality under a dedicated transient Date: Wed, 29 Dec 2021 18:50:35 -0500 Message-Id: <20211229235036.372313-14-kyle@kyleam.com> In-Reply-To: <20211229235036.372313-1-kyle@kyleam.com> References: <20211229235036.372313-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyleam.com X-TUID: IP+3mWRXxxIv This provides a place to bind piem-am-extend (and perhaps other things, like piem-edit). At least for my use, I expect piem-am-create to the dominant variant, so make the prefix default to calling that without showing the popup. --- piem.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/piem.el b/piem.el index 73e331cc..2b1d3095 100644 --- a/piem.el +++ b/piem.el @@ -1031,6 +1031,16 @@ (defun piem-am-extend (mbox &optional format coderepo toggle-worktree) (user-error "Worktree can't be created with coderepo's current branch"))) (piem--git-am mbox format am-directory))) +;;;###autoload (autoload 'piem-am "piem" nil t) +(transient-define-prefix piem-am (&optional transient) + "Feed an am-ready mbox to `git am'." + [[("a" "create new branch" piem-am-create) + ("A" "extend existing branch" piem-am-extend)]] + (interactive "P") + (if transient + (transient-setup 'piem-am) + (call-interactively #'piem-am-create))) + ;;;;; Patch editing @@ -1069,7 +1079,7 @@ (define-derived-mode piem-edit-patch-mode text-mode "piem-edit-patch" ;;;###autoload (autoload 'piem-dispatch "piem" nil t) (transient-define-prefix piem-dispatch () "Invoke a piem command." - [[("a" "apply patch" piem-am-create) + [[("a" "apply patch" piem-am) ("b" "call b4-am" piem-b4-am)] [("i" "inject thread into maildir" piem-inject-thread-into-maildir) ("l" "copy public-inbox link" piem-copy-mid-url)] -- 2.34.0