org-roam-export-backlinks/org-roam-export.el

39 lines
1.3 KiB
EmacsLisp
Raw Normal View History

2022-06-12 00:07:24 +00:00
;;; org-roam-export.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2022 Correl Roush
;;
;; Author: Correl Roush <correlr@zephyrus>
;; Maintainer: Correl Roush <correlr@zephyrus>
;; Created: June 10, 2022
;; Modified: June 10, 2022
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp
;; Homepage: https://github.com/correlr/org-roam-export
2022-06-12 01:17:07 +00:00
;; Package-Requires: ((emacs "24.3") org-roam s seq)
2022-06-12 00:07:24 +00:00
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; Description
;;
;;; Code:
2022-06-12 00:24:24 +00:00
(require 'org-roam)
2022-06-12 01:17:07 +00:00
(require 's)
(require 'seq)
(defun org-roam-export-backlink-title (backlink)
"Get exportable title of BACKLINK."
(s-join " > "
(seq-concatenate 'list
(list (org-roam-node-title (org-roam-backlink-source-node backlink)))
(plist-get (org-roam-backlink-properties backlink) :outline))))
(defun org-roam-export-backlink-link (backlink)
"Get Org link to BACKLINK."
(concat "id:" (org-roam-node-id (org-roam-backlink-source-node backlink))))
2022-06-12 00:07:24 +00:00
(provide 'org-roam-export)
;;; org-roam-export.el ends here