Compare commits

..

No commits in common. "99f89be39c973630d00e10b481cd52572054f155" and "64198261f7a5e8c07f0ccf2dcac5b81d8ef77b7f" have entirely different histories.

2 changed files with 2 additions and 21 deletions

View File

@ -718,7 +718,6 @@ split horizontally again, but this extra work should not matter much."
org-password-manager-get-password-by-id org-password-manager-get-password-by-id
db/org-bookmark-open db/org-bookmark-open
db/org-bookmark-store-link db/org-bookmark-store-link
db/org-bookmark-export
db/org-lint-invalid-bookmark-link db/org-lint-invalid-bookmark-link
db/org-lint-possible-bookmark-link)) db/org-lint-possible-bookmark-link))
@ -1017,8 +1016,7 @@ split horizontally again, but this extra work should not matter much."
number)))) number))))
(org-link-set-parameters "bookmark" (org-link-set-parameters "bookmark"
:follow #'db/org-bookmark-open :follow #'db/org-bookmark-open
:store #'db/org-bookmark-store-link :store #'db/org-bookmark-store-link)
:export #'db/org-bookmark-export)
(when (eq system-type 'windows-nt) (when (eq system-type 'windows-nt)
(org-link-set-parameters "onenote" :follow #'db/org-onenote-open) (org-link-set-parameters "onenote" :follow #'db/org-onenote-open)
(org-link-set-parameters "outlook" :follow #'db/org-outlook-open)) (org-link-set-parameters "outlook" :follow #'db/org-outlook-open))

View File

@ -482,7 +482,7 @@ Via %%(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-
(defun db/find-parent-task () (defun db/find-parent-task ()
;; http://doc.norang.ca/org-mode.html#Clocking ;; http://doc.norang.ca/org-mode.html#Clocking
"Return point of the nearest parent task, and nil if no such task exists. "Return point of the nearest parent task, and NIL if no such task exists.
Ignores headlines tagged with NOP or PERIODIC, as those items Ignores headlines tagged with NOP or PERIODIC, as those items
should not be clocked." should not be clocked."
@ -2262,23 +2262,6 @@ PARAMS may contain the following values:
(org-link-store-props :link (concat "bookmark:" bookmark) (org-link-store-props :link (concat "bookmark:" bookmark)
:description bookmark)))) :description bookmark))))
(defun db/org-bookmark-export (path description backend)
"Export Org bookmark links by resolving them to their target path.
PATH denotes the bookmark name, while DESCRIPTION is the (optional)
description of that link. BACKEND denotes the target format for export."
(condition-case err
(let* ((bmk-target (or (bookmark-prop-get path 'location)
(bookmark-prop-get path 'filename)
(user-error "Cannot resolve bookmark for export: %s"
path))))
;; TODO: the following might be quite heavy, as it invokes the Org parser again. Maybe
;; exporting links can be done more easily?
(org-export-string-as (org-link-make-string bmk-target description)
backend))
(error (error "Error of type “%s” while exporting bookmark “%s”: “%s”"
(car err) path (cadr err)))))
(defun db/org-lint-invalid-bookmark-link (ast) (defun db/org-lint-invalid-bookmark-link (ast)
"Org lint checker to verify bookmark links in AST point to known bookmarks." "Org lint checker to verify bookmark links in AST point to known bookmarks."
(bookmark-maybe-load-default-file) (bookmark-maybe-load-default-file)