[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/orgit f956d802f1 75/76: orgit-rev-description-format: New
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/orgit f956d802f1 75/76: orgit-rev-description-format: New option |
Date: |
Thu, 13 Jan 2022 13:58:48 -0500 (EST) |
branch: elpa/orgit
commit f956d802f19ea495efa95af6c673588afeb3adc5
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
orgit-rev-description-format: New option
Closes #39.
---
orgit.el | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/orgit.el b/orgit.el
index 018c063c0b..d103b3f476 100644
--- a/orgit.el
+++ b/orgit.el
@@ -219,6 +219,25 @@ then store a link to the commit itself."
:group 'orgit
:type 'boolean)
+(defcustom orgit-rev-description-format "%%N (magit-rev %%R)"
+ "Format used for `orgit-rev' links.
+
+The format is used in two passes. The first pass consumes all
+specs of the form `%C'; to preserve a spec for the second pass
+it has to be quoted like `%%C'.
+
+The first pass accepts the \"pretty formats\" documented in
+the git-show(1) manpage. The second pass accepts these specs:
+
+`%%N' The name or id of the repository.
+`%%R' If `orgit-store-reference' is non-nil, then the tag or
+ branch that points at the commit, if any. Otherwise the
+ abbreviated commit hash. (A prefix argument reverses the
+ meaning of `orgit-store-reference'.)"
+ :package-version '(orgit . "1.8.0")
+ :group 'orgit
+ :type 'string)
+
;;; Command
;;;###autoload
@@ -379,8 +398,10 @@ store links to the Magit-Revision mode buffers for these
commits."
:type "orgit-rev"
:link (format "orgit-rev:%s::%s" repo
(or ref (magit-rev-parse rev)))
- :description (format "%s (magit-rev %s)" repo
- (or ref (magit-rev-abbrev rev))))))
+ :description (format-spec
+ (magit-rev-format orgit-rev-description-format rev)
+ `((?N . ,repo)
+ (?R . ,(or ref (magit-rev-abbrev rev))))))))
;;;###autoload
(defun orgit-rev-open (path)
- [nongnu] elpa/orgit 7d6afa5ae9 60/76: orgit-log-open: Call magit-log-arguments from repo, (continued)
- [nongnu] elpa/orgit 7d6afa5ae9 60/76: orgit-log-open: Call magit-log-arguments from repo, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit a4e689f009 64/76: make: Remove obsolete dependencies, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 609fd0ccfb 68/76: orgit-export: Handle missing local repository explicitly, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit b7eb6de8c6 19/76: orgit-log-store: use first rev as intended, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 78a3932797 45/76: orgit--{current-repository, repository-directory: New functions, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 467f424df4 47/76: orgit-store-repository-id: New option, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit d7e773e1b6 50/76: Add .github/FUNDING.yml, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 9e5f93d516 51/76: Update for Org 9.3, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 1d257c8cb2 52/76: Change term used for copyright holders, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit a4a565be2a 74/76: Export repository-ID based links, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit f956d802f1 75/76: orgit-rev-description-format: New option,
ELPA Syncer <=
- [nongnu] elpa/orgit e8db8dc741 69/76: orgit-*-complete-link: Respect orgit-store-repository-id, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ab28d1785c 67/76: orgit-export: Signal correct error type, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 1b0e34b596 73/76: Fix indentation, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ac9b1a4286 66/76: orgit-log-export: Reduce arguments to a single branch, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 043db4f095 71/76: Use with-eval-after-load, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 1e3a958835 11/76: Bump magit dependency down to 2.0.50, ELPA Syncer, 2022/01/13