Skip to content

Commit

Permalink
(feat): add org-roam-random-note (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
jethrokuan authored Jul 7, 2020
1 parent d19a711 commit 9f7ed43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions org-roam.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9f7ed43

Please sign in to comment.