Compare commits
No commits in common. "99f89be39c973630d00e10b481cd52572054f155" and "64198261f7a5e8c07f0ccf2dcac5b81d8ef77b7f" have entirely different histories.
99f89be39c
...
64198261f7
4
init.el
4
init.el
@ -718,7 +718,6 @@ split horizontally again, but this extra work should not matter much."
|
||||
org-password-manager-get-password-by-id
|
||||
db/org-bookmark-open
|
||||
db/org-bookmark-store-link
|
||||
db/org-bookmark-export
|
||||
db/org-lint-invalid-bookmark-link
|
||||
db/org-lint-possible-bookmark-link))
|
||||
|
||||
@ -1017,8 +1016,7 @@ split horizontally again, but this extra work should not matter much."
|
||||
number))))
|
||||
(org-link-set-parameters "bookmark"
|
||||
:follow #'db/org-bookmark-open
|
||||
:store #'db/org-bookmark-store-link
|
||||
:export #'db/org-bookmark-export)
|
||||
:store #'db/org-bookmark-store-link)
|
||||
(when (eq system-type 'windows-nt)
|
||||
(org-link-set-parameters "onenote" :follow #'db/org-onenote-open)
|
||||
(org-link-set-parameters "outlook" :follow #'db/org-outlook-open))
|
||||
|
||||
@ -482,7 +482,7 @@ Via %%(with-temp-buffer (db/org-add-link-to-current-clock) (string-trim (buffer-
|
||||
|
||||
(defun db/find-parent-task ()
|
||||
;; 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
|
||||
should not be clocked."
|
||||
@ -2262,23 +2262,6 @@ PARAMS may contain the following values:
|
||||
(org-link-store-props :link (concat "bookmark:" 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)
|
||||
"Org lint checker to verify bookmark links in AST point to known bookmarks."
|
||||
(bookmark-maybe-load-default-file)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user