(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
2 changed files with 8 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
- [#847](https://github.com/org-roam/org-roam/pull/847) Use sqlite3 transactions instead of storing the values to be inserted. - [#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` - [#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 ### Bugfixes

View File

@@ -1393,6 +1393,12 @@ included as a candidate."
(plist-get :path)))) (plist-get :path))))
(org-roam--find-file file))) (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 ;;;###autoload
(defun org-roam-insert (&optional lowercase completions filter-fn description) (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. "Find an Org-roam file, and insert a relative org link to it at point.