[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive c12e88da4a 09/19: Add/Change: (hyperdrive-histo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive c12e88da4a 09/19: Add/Change: (hyperdrive-history-find-file-other-window) |
Date: |
Sat, 14 Oct 2023 16:00:46 -0400 (EDT) |
branch: elpa/hyperdrive
commit c12e88da4a91c4478705ebbd920f2932b0e7f768
Author: Adam Porter <adam@alphapapa.net>
Commit: Joseph Turner <joseph@ushin.org>
Add/Change: (hyperdrive-history-find-file-other-window)
---
hyperdrive-history.el | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 262f0df5bf..6819bddb5e 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -124,6 +124,7 @@ and ENTRY's version are nil."
:parent hyperdrive-ewoc-mode-map
:doc "Local keymap for `hyperdrive-history-mode' buffers."
"RET" #'hyperdrive-history-find-file
+ "o" #'hyperdrive-history-find-file-other-window
"v" #'hyperdrive-history-view-file
"=" #'hyperdrive-history-diff
"+" #'hyperdrive-history-fill-version-ranges
@@ -257,11 +258,13 @@ Interactively, diff range entry at point with previous
entry."
:then (lambda ()
(pop-to-buffer (current-buffer)))))
-(defun hyperdrive-history-find-file (range-entry)
+(cl-defun hyperdrive-history-find-file
+ (range-entry &key (then (lambda ()
+ (pop-to-buffer (current-buffer)
'(display-buffer-same-window)))))
"Visit hyperdrive entry in RANGE-ENTRY at point.
-When entry does not exist, does nothing and returns nil.
-When entry is not known to exist, attempts to load entry at
-RANGE-ENTRY's RANGE-END.
+Then call THEN. When entry does not exist, does nothing and
+returns nil. When entry is not known to exist, attempts to load
+entry at RANGE-ENTRY's RANGE-END.
Interactively, visit entry at point in `hyperdrive-history'
buffer."
@@ -270,7 +273,7 @@ buffer."
(pcase-exhaustive (hyperdrive-range-entry-exists-p range-entry)
('t
;; Known to exist: open it.
- (hyperdrive-open (cdr range-entry)))
+ (hyperdrive-open (cdr range-entry) :then then))
('nil
;; Known to not exist: warn user.
(hyperdrive-user-error "File does not exist!"))
@@ -278,6 +281,20 @@ buffer."
;; Not known to exist: fill version ranges:
(hyperdrive-history-fill-version-ranges range-entry))))
+(defun hyperdrive-history-find-file-other-window (range-entry)
+ "Visit hyperdrive entry in RANGE-ENTRY at point in other window.
+Then call THEN. When entry does not exist, does nothing and
+returns nil. When entry is not known to exist, attempts to load
+entry at RANGE-ENTRY's RANGE-END.
+
+Interactively, visit entry at point in `hyperdrive-history'
+buffer."
+ (declare (modes hyperdrive-history-mode))
+ (interactive (list (hyperdrive-history-range-entry-at-point)))
+ (hyperdrive-history-find-file
+ range-entry :then (lambda ()
+ (pop-to-buffer (current-buffer)
'(display-buffer-other-window)))))
+
(declare-function hyperdrive-view-file "hyperdrive")
(defun hyperdrive-history-view-file (range-entry)
"Open hyperdrive entry in RANGE-ENTRY at point in `view-mode'.
- [nongnu] elpa/hyperdrive updated (73006298c8 -> 4bfb60b6f0), ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 1ae7acf6c2 01/19: Change: (hyperdrive-open) pop-to-buffer in default THEN, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 16da934f02 04/19: Change: (hyperdrive-dir-find-file) Use our own callback, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive c12e88da4a 09/19: Add/Change: (hyperdrive-history-find-file-other-window),
ELPA Syncer <=
- [nongnu] elpa/hyperdrive c6ffaa39c5 03/19: Change: (hyperdrive-bookmark-handler) pop-to-buffer, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive a730cdc9e9 05/19: Change: (hyperdrive-open) Use display-buffer-same-window action, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 42604be206 08/19: Add: -dir-find/view-file-other-window commands and bindings, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 2d1cbb9d2c 12/19: Tidy: Indentation, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 25086dcb71 13/19: Fix: (hyperdrive-dir-find-file-other-window), ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive dfbeeae2c9 14/19: Fix: (hyperdrive-history-find-file-other-window) Display buffer action, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 09124e9230 15/19: Fix: (hyperdrive-dir-find-file) Use pop-to-buffer, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 0809111811 17/19: Tidy: Errors/assertions, ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 16d7963b6a 18/19: Merge branch 'wip/find-in-other-window', ELPA Syncer, 2023/10/14
- [nongnu] elpa/hyperdrive 4bfb60b6f0 19/19: Remove: (hyperdrive-storage-location), ELPA Syncer, 2023/10/14