mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): add org-roam-prefer-id-links to select linking method (#1238)
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
### Features
|
||||
|
||||
- [#1183](https://github.com/org-roam/org-roam/pull/1183) add interactive functions for managing aliases and tags in Org-roam file, namely `org-roam-alias-add`, `org-roam-alias-delete`, `org-roam-tag-add`, and `org-roam-tag-delete`.
|
||||
- [#1238](https://github.com/org-roam/org-roam/pull/1238) add `org-roam-prefer-id-links` variable to select linking method
|
||||
|
||||
### Bugfixes
|
||||
|
||||
|
@ -147,6 +147,11 @@ Formatter may be a function that takes title as its only argument."
|
||||
(function :tag "Custom function"))
|
||||
:group 'org-roam)
|
||||
|
||||
(defcustom org-roam-prefer-id-links t
|
||||
"If non-nil, use ID for linking instead where available."
|
||||
:type 'boolean
|
||||
:group 'org-roam)
|
||||
|
||||
(defcustom org-roam-list-files-commands
|
||||
(if (member system-type '(windows-nt ms-dos cygwin))
|
||||
nil
|
||||
@ -806,7 +811,8 @@ backlinks."
|
||||
TYPE defaults to \"file\".
|
||||
Here, we also check if there is an ID for the file."
|
||||
(setq type (or type "file"))
|
||||
(when-let ((id (and (string-equal type "file")
|
||||
(when-let ((id (and org-roam-prefer-id-links
|
||||
(string-equal type "file")
|
||||
(caar (org-roam-db-query [:select [id] :from ids
|
||||
:where (= file $s1)
|
||||
:and (= level 0)
|
||||
|
Reference in New Issue
Block a user