[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive c1932fb6fd 74/82: Change: (hyperdrive--org-open
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive c1932fb6fd 74/82: Change: (hyperdrive--org-open-at-point) Include target |
Date: |
Mon, 25 Sep 2023 19:00:56 -0400 (EDT) |
branch: elpa/hyperdrive
commit c1932fb6fddbb64c7eb6842b7e270d80978bdadd
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Change: (hyperdrive--org-open-at-point) Include target
Also, use expand-file-name instead of hyperdrive-expand-url.
---
hyperdrive-lib.el | 9 ---------
hyperdrive-org.el | 8 +++++++-
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ed69d98b8a..b033121056 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1387,15 +1387,6 @@ When PATH is nil or blank, return \"/\"."
path)
"/")))
-(defun hyperdrive-expand-url (path &optional base)
- "Return a URL string of PATH expanded against current entry.
-When BASE is non-nil, PATH will be expanded against BASE instead."
- (let* ((urlobj (url-generic-parse-url path))
- (defobj (url-generic-parse-url (or base (hyperdrive-entry-url
hyperdrive-current-entry)))))
- ;; Destructively modify the URL object to give it the correct host and
path.
- (url-default-expander urlobj defobj)
- (url-recreate-url urlobj)))
-
;;;; Utilities
(defun hyperdrive-time-greater-p (a b)
diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index 47dff61750..b558b18202 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -146,7 +146,13 @@ the current location."
;; Don't treat link as a relative/absolute path in the
;; hyperdrive if "file:" protocol prefix is explicit.
(not (string-prefix-p "file:" raw-link-type)))
- (hyperdrive-open-url (hyperdrive-expand-url (org-element-property
:path context)))))))
+ (pcase-let* (((cl-struct hyperdrive-entry hyperdrive path)
hyperdrive-current-entry)
+ (entry (hyperdrive-entry-create
+ :hyperdrive (hyperdrive-entry-hyperdrive
hyperdrive-current-entry)
+ :path (expand-file-name (org-element-property
:path context)
+ (file-name-directory
path))
+ :etc `((target . ,(org-element-property
:search-option context))))))
+ (hyperdrive-open entry))))))
(defun hyperdrive--org-insert-link-after-advice (&rest _)
"Modify just-inserted link as appropriate for `hyperdrive-mode' buffers."
- [nongnu] elpa/hyperdrive dd795f5f2a 53/82: Test: Add tests for storing links, (continued)
- [nongnu] elpa/hyperdrive dd795f5f2a 53/82: Test: Add tests for storing links, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 990d23ab55 57/82: Test: Rename org-mode/* to org-mode-*, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive dc8af9b72c 59/82: Test: Remove roundtrip tests, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive d704c5a181 64/82: Meta: Update changelog, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive f1bb94bb83 66/82: Change: (hyperdrive-org-link-follow) Don't jump to ID target, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 6293463834 67/82: Comment: Add TODO, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 43f50f2ae7 69/82: Change/Fix: (hyperdrive--org-open-at-point) Don't handle fuzzy links, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 27d352dda2 70/82: Comment: Remove TODO, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 5588fb4e1d 71/82: Change/Fix: (hyperdrive--org-link-goto) Don't URI-decode target, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive dafc7f1b93 72/82: Fix: (hyperdrive--org-link-goto) Use org-link-search, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive c1932fb6fd 74/82: Change: (hyperdrive--org-open-at-point) Include target,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 20dd9efc70 76/82: Tidy, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 0a875bef41 78/82: Fix: Docstring, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive fe3c0c374a 79/82: Tests: Add relative/absolute link parsing tests, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 7d06ffd037 80/82: Meta: Update .gitignore, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 7826c10faa 81/82: Merge branch 'wip/org-heading-links', ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 903847d50e 82/82: Tidy: Docstrings, comments, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 670ae8050f 03/82: WIP: Add link tests, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 9b3b215444 04/82: WIP, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 62c487448f 06/82: WIP, ELPA Syncer, 2023/09/25
- [nongnu] elpa/hyperdrive 28d4b1a6d6 08/82: Add: (hyperdrive-equal-p, -entry-hyperdrive-equal-p), ELPA Syncer, 2023/09/25