branch: externals/denote-review
commit 00620e6f57223a67e8f0ab039829e461d42de79e
Author: Matto Fransen <[email protected]>
Commit: Matto Fransen <[email protected]>

    solved bug in random note picker
---
 denote-review.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/denote-review.el b/denote-review.el
index d3e8302648..8aa6d71393 100644
--- a/denote-review.el
+++ b/denote-review.el
@@ -5,7 +5,7 @@
 ;; Author:  Matto Fransen <[email protected]>
 ;; Maintainer:  Matto Fransen <[email protected]>
 ;; Url: https://codeberg.org/mattof/denote-review
-;; Version: 1.0.5
+;; Version: 1.0.6
 ;; Keywords: files
 ;; Package-Requires: ((emacs "28.1") (denote "4.1.3"))
 
@@ -263,8 +263,9 @@ Must be called from the tabulated list view"
   "Open a random file in other window.
 Must be called from the tabulated list view."
   (interactive nil denote-review-mode)
-  (let ((k (random (length tabulated-list-entries))))
-    (find-file-other-window (car (nth k tabulated-list-entries)))))
+  (let ((entries (funcall tabulated-list-entries)))
+    (find-file-other-window (car (nth (random (length entries))
+                                      entries)))))
 
 (defvar-keymap denote-review-mode-map
   :doc "Keymap for `denote-review-mode-map'."

Reply via email to