[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-release/hyperdrive c8bc3d0238 2/5: Fix: (h/handler-default
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa-release/hyperdrive c8bc3d0238 2/5: Fix: (h/handler-default) Handle file links with bad targets |
Date: |
Fri, 13 Sep 2024 18:59:57 -0400 (EDT) |
branch: elpa-release/hyperdrive
commit c8bc3d023860961d9692eb7985fe6edb9df9312c
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Fix: (h/handler-default) Handle file links with bad targets
---
hyperdrive-lib.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index bddbd1d2bd..e8426d1240 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1437,13 +1437,14 @@ If then, then call THEN with no arguments. Default
handler."
(let ((buffer-file-name (he/name entry)))
(set-auto-mode t)))
(when target
- (pcase major-mode
- ('org-mode
- (require 'hyperdrive-org)
- (h/org--link-goto target))
- ('markdown-mode
- ;; TODO: Handle markdown link
- )))
+ (with-demoted-errors "Hyperdrive: %S"
+ (pcase major-mode
+ ('org-mode
+ (require 'hyperdrive-org)
+ (h/org--link-goto target))
+ ('markdown-mode
+ ;; TODO: Handle markdown link
+ ))))
(h/blob-mode (if version +1 -1))
(when then
(funcall then)))))