[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/agitate 5a1b31fe09 06/67: Add agitate-log-view-kill-rev
From: |
ELPA Syncer |
Subject: |
[elpa] externals/agitate 5a1b31fe09 06/67: Add agitate-log-view-kill-revision command |
Date: |
Wed, 28 Sep 2022 16:57:25 -0400 (EDT) |
branch: externals/agitate
commit 5a1b31fe09ceb3900eab05c585aac2dd2504bc2f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add agitate-log-view-kill-revision command
---
agitate.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/agitate.el b/agitate.el
index c4c83cc432..7f36ab93c8 100644
--- a/agitate.el
+++ b/agitate.el
@@ -32,12 +32,33 @@
;;; Code:
(require 'log-edit)
+(require 'log-view)
(require 'vc-git)
(defgroup agitate ()
"Work-in-progress."
:group 'vc)
+;;;; Commands for log-view (listings of commits)
+
+;;;###autoload
+(defun agitate-log-view-kill-revision ()
+ "Append to `kill-ring' log-view revision at or around point.
+
+When the log-view is in the short format (one compact line per
+revision), the revision is the one on the current line. If the
+revision is expanded with `log-view-expanded-log-entry-function'
+and point is somewhere inside the expanded text, the revision is
+still the same.
+
+When the log-view is in the long format (detailed view where each
+revision spans several lines), the revision is the one pertinent
+to the text at point."
+ (interactive)
+ (when-let ((revision (cadr (log-view-current-entry (point) t))))
+ (kill-new (format "%s" revision))
+ (message "Copied: %s" revision)))
+
;;;; Commands for log-edit (commit messages)
(defun agitate--log-edit-extract-file (with-file-extension)
- [elpa] externals/agitate 51fd96aba6 56/67: Tweak format of quote in the README.org, (continued)
- [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
- [elpa] externals/agitate b6e5cdbdda 14/67: Add agitate-enable-outline-minor-mode function, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate d1de59188d 08/67: Set minimum Emacs to 28.1, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 764644c218 15/67: Use 'length>' again since b6e5cdb requires Emacs 28.1, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 95e6f9186e 09/67: Update one-line description, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 69e8f87214 04/67: Add agitate-vc-git-push, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 5a1b31fe09 06/67: Add agitate-log-view-kill-revision command,
ELPA Syncer <=
- [elpa] externals/agitate 2250f3d039 33/67: Expand the README.org, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 2c9f6bb3be 20/67: Rename to agitate-vc-git-push-prompt-for-remote, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 418d24bd13 60/67: Tweak comments about gitmoji, conventional commits, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate d808406253 48/67: Edit vc-git-show (PROOF OF CONCEPT), ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 4192d8d892 51/67: Clarify doc of helper function, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 9146d7cd54 31/67: Rename to agitate-diff-enable-outline-minor-mode, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 27cdb6fd95 57/67: Improve agitate-vc-git-prompt-format-patch-single, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 1df9714eb6 49/67: Accept optional long agitate--vc-git-commit-prompt, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate ed6c5cfb71 32/67: Capitalise Unicode in doc string, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate aa04a25eb1 58/67: Rename to agitate-vc-git-format-patch-single, ELPA Syncer, 2022/09/28