[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 5bad8e2762 040/123: Add: (hyperdrive-menu-hyper
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 5bad8e2762 040/123: Add: (hyperdrive-menu-hyperdrive) Transient for modifying hyperdrive |
Date: |
Fri, 6 Oct 2023 01:01:01 -0400 (EDT) |
branch: elpa/hyperdrive
commit 5bad8e276223c76296bca0e0236fac8bf535d252
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Add: (hyperdrive-menu-hyperdrive) Transient for modifying hyperdrive
---
hyperdrive-menu.el | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index a6093643b4..a47c319c63 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -49,6 +49,38 @@
(declare-function hyperdrive-dir--entry-at-point "hyperdrive-dir")
+(transient-define-prefix hyperdrive-menu-hyperdrive (hyperdrive)
+ "Show menu for editing HYPERDRIVE."
+ [ :description
+ (lambda ()
+ (let ((hyperdrive (oref transient--prefix scope)))
+ (concat (propertize "Drive: " 'face 'transient-heading)
+ (hyperdrive--format-hyperdrive hyperdrive :formats
'(public-key seed domain))
+ (format " latest:%s" (hyperdrive-latest-version
hyperdrive)))))
+ ("n" "set nickname" hyperdrive-menu-hyperdrive-set-nickname
+ :if (lambda ()
+ (hyperdrive-writablep (oref transient--prefix scope)))
+ :description (lambda ()
+ (format "Nickname: %s"
+ ;; TODO: Hyperdrive-metadata accessor (and maybe
gv setter).
+ (pcase (alist-get 'name
+ (hyperdrive-metadata
+ (oref transient--prefix scope)))
+ ('nil (propertize "none"
+ 'face
'transient-inactive-value))
+ (it (propertize it
+ 'face 'transient-value))))))]
+ (interactive (list (hyperdrive-complete-hyperdrive :force-prompt
current-prefix-arg)))
+ (transient-setup 'hyperdrive-menu-hyperdrive nil nil :scope hyperdrive))
+
+(transient-define-suffix hyperdrive-menu-hyperdrive-set-nickname (nickname)
+ ;; TODO: Offer current nickname as default value; note that
+ ;; transient--prefix and transient-current-prefix are both nil here.
+ (interactive (list (hyperdrive-read-name :prompt "New nickname")))
+ (hyperdrive-set-nickname nickname (oref transient-current-prefix scope)
+ :then (lambda (hyperdrive)
+ (hyperdrive-menu-hyperdrive hyperdrive))))
+
(transient-define-suffix hyperdrive-menu-up ()
;; :transient 'transient--do-call
(interactive)
- [nongnu] elpa/hyperdrive 094254c47f 014/123: WIP, (continued)
- [nongnu] elpa/hyperdrive 094254c47f 014/123: WIP, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 8d19126e2b 033/123: WIP checkpoint, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 3b688528df 020/123: WIP, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 621268b2a9 024/123: Add: (hyperdrive--context-entry), ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 2b0e67c35e 023/123: Tidy, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 3ff1877985 032/123: Change: (hyperdrive-up) Take ENTRY as argument and check mode, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 8b86e2dc69 026/123: Tidy, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive aa1aefdef9 048/123: Change: (hyperdrive-menu) Link to hyperdrive-menu-hyperdrive, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 90653597e7 035/123: WIP, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 2b0cf69857 050/123: Comment: Add TODO, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 5bad8e2762 040/123: Add: (hyperdrive-menu-hyperdrive) Transient for modifying hyperdrive,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 19ebc643b6 045/123: Change: (hyperdrive-menu-hyperdrive) Add petname setter, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 4fe3125a1a 051/123: Comment: Add TODO, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 9b4a50994a 055/123: Fix: (hyperdrive-menu) Handle nonexistent next entry, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 2ca5459ab3 067/123: Add: (hyperdrive-menu) Directory at point group, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive e4e6103838 071/123: Change: (hyperdrive-menu) Merge File at point and Directory at point, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 819f6358fb 085/123: Tidy, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 46e3cb960d 063/123: Comment: Add TODO, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 87a093db3a 089/123: Fix: Autoload -set-{petname, nickname} and add declarations, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 7a34065ea1 082/123: Comment: Add TODO, ELPA Syncer, 2023/10/06
- [nongnu] elpa/hyperdrive 4ed9c4995a 064/123: Change: (hyperdrive-menu) Make separate group for current directory, ELPA Syncer, 2023/10/06