From 00a169c75b934a2eb42ea8620e8eebf34577d4ca Mon Sep 17 00:00:00 2001 From: Chris Barrett Date: Fri, 3 May 2024 20:50:59 +1200 Subject: [PATCH] Suppress spurious warnings from org-element Thanks to @christoffer-arvidsson for digging into this one! Resolves #6. --- lisp/org-roam-review.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org-roam-review.el b/lisp/org-roam-review.el index af3a8b6..fdee007 100644 --- a/lisp/org-roam-review.el +++ b/lisp/org-roam-review.el @@ -279,7 +279,10 @@ A higher score means that the node will appear less frequently." (declare (indent 0)) `(if-let* ((buf (car (org-roam-review-buffers)))) (with-current-buffer buf - ,@body) + ;; KLUDGE: Suppress warnings from org-element about this being a + ;; non-org-mode buffer. + (let ((major-mode 'org-mode)) + ,@body)) (error "No review buffer"))) (defun org-roam-review--daily-file-p (&optional file)