[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/agitate cbe4eed8b2 23/67: Add agitate-log-edit-emoji-co
From: |
ELPA Syncer |
Subject: |
[elpa] externals/agitate cbe4eed8b2 23/67: Add agitate-log-edit-emoji-commit command+option |
Date: |
Wed, 28 Sep 2022 16:57:27 -0400 (EDT) |
branch: externals/agitate
commit cbe4eed8b2fecd895ff2dc931563c352d44f2116
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add agitate-log-edit-emoji-commit command+option
---
agitate.el | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/agitate.el b/agitate.el
index 30b5064e11..6a41f3e0eb 100644
--- a/agitate.el
+++ b/agitate.el
@@ -41,6 +41,23 @@
:group 'diff
:group 'vc)
+;; Inspired by <https://gitmoji.dev/>, though I think most of those
+;; are superfluous. Less is more. THIS IS NOT an implementation of
+;; gitmoji.
+(defcustom agitate-log-edit-emoji-collection
+ '(":art: Refine"
+ ":bug: Fix"
+ ":memo: Document"
+ ":rocket: Update"
+ ":skull: Delete"
+ ":sparkles: Add")
+ "Completion candidates for `agitate-log-edit-emoji-commit'.
+It is recommended to use the :EMOJI: notation, as it works even
+in terminals that cannot output unicode. Relevant applications
+will render those as their corresponding graphical emoji."
+ :type '(repeat string)
+ :group 'agitate)
+
;;;; Commands for diffs
(defvar-local agitate--refine-diff-state nil
@@ -198,6 +215,22 @@ file extension. Else omit it."
(interactive "P" log-edit-mode)
(insert (format "%s: " (agitate--log-edit-extract-file
with-file-extension))))
+(defvar agitate--log-edit-emoji-commit-history nil
+ "Minibuffer history of `agitate-log-edit-emoji-commit'.")
+
+;;;###autoload
+(defun agitate-log-edit-emoji-commit (emoji-commit)
+ "Insert EMOJI-COMMIT message at point.
+When called interactively, prompt for EMOJI-COMMIT among the
+`agitate-log-edit-emoji-collection'."
+ (interactive
+ (list
+ (completing-read
+ "Select type of commit+emoji: "
+ agitate-log-edit-emoji-collection nil t nil
+ 'agitate--log-edit-emoji-commit-history)))
+ (insert emoji-commit))
+
;;;; Commands for vc-git (Git backend for the Version Control framework)
;;;###autoload
- [elpa] externals/agitate d6aaced969 10/67: Actually depend on Emacs 27.1, (continued)
- [elpa] externals/agitate d6aaced969 10/67: Actually depend on Emacs 27.1, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate e7b6acb8f7 12/67: Limit agitate-diff-refine-cycle to diff-mode, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 43027aefb9 16/67: Add agitate-diff-narrow-dwim command, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 4baa368ffd 02/67: Depend on Emacs 29, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 417539dc73 03/67: Add agitate-log-edit-insert-file-name command, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 1f35cecc20 17/67: Add agitate-diff-kill-dwim prototype, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 839892328b 28/67: Add missing backronym, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 4ed8d553ba 22/67: Record TODO for vc-git-push replacements, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate bb94713469 40/67: Fix formatting of inline code in the manual, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 475b75a91a 26/67: Add skeleton of README.org, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate cbe4eed8b2 23/67: Add agitate-log-edit-emoji-commit command+option,
ELPA Syncer <=
- [elpa] externals/agitate c54fe94ac1 55/67: Add agitate-vc-git-prompt-format-patch-single cmd, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 6c89d23954 47/67: Remove agitate-diff-kill-dwim (doesn't work), ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 91e685d0fb 37/67: Add dir-locals.el, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate a5ee057fd5 65/67: Add sample configuration to the manual, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 052d3e3570 61/67: Simplify agitate--vc-git-commit-prompt, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 51fd96aba6 56/67: Tweak format of quote in the README.org, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate dce39b452c 63/67: Make agitate-vc-git-kill-commit-message use completion, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate da4a2bb77a 34/67: Update agitate.el headers and Commentary, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 7564713208 29/67: Rewrite outline heading for diffs, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate f736eb51a7 67/67: Tweak markup of "git-grep(1)", ELPA Syncer, 2022/09/28