(feat): add org-roam-random-note (#898)

This commit is contained in:
Jethro Kuan 2020-07-07 14:45:28 +08:00 committed by GitHub
parent d19a711a44
commit 9f7ed4353c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -11,7 +11,8 @@
- [#847](https://github.com/org-roam/org-roam/pull/847) Add GC threshold `org-roam-db-gc-threshold` to temporarily change the threshold on expensive operations.
- [#847](https://github.com/org-roam/org-roam/pull/847) Use sqlite3 transactions instead of storing the values to be inserted.
- [#851](https://github.com/org-roam/org-roam/pull/851) Add `'first-directory'` option for `org-roam-tag-sources`
- [#863](https://github.com/org-roam/org-roam/pull/863) Display outline hierarchy in backlinks buffer
- [#863](https://github.com/org-roam/org-roam/pull/863) Display outline hierarchy in backlinks buffer
- [#898](https://github.com/org-roam/org-roam/pull/898) Add `org-roam-random-note` to browse a random note.
### Bugfixes

View file

@ -1393,6 +1393,12 @@ included as a candidate."
(plist-get :path))))
(org-roam--find-file file)))
;;;###autoload
(defun org-roam-random-note ()
"Find a random Org-roam file."
(interactive)
(find-file (seq-random-elt (org-roam--list-all-files))))
;;;###autoload
(defun org-roam-insert (&optional lowercase completions filter-fn description)
"Find an Org-roam file, and insert a relative org link to it at point.