From b2f663e93cc255115a8ec2e5a1195130e9f98853 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 13 Nov 2025 13:45:14 -0600 Subject: Fix missing return value in org-drill-get-tags-advice Added fallback to original function when org-get-local-tags doesn't exist. Changes: - Removed underscore from orig-fun parameter (now used) - Added else clause to fallback to (apply orig-fun args) - Added explanatory comment Impact: In older org-mode versions where org-get-local-tags doesn't exist, the function now properly falls back to the original org-get-tags behavior instead of returning nil, fixing tag functionality. Fixes severity A bug in todo.org --- org-drill.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org-drill.el b/org-drill.el index 16133c5..781d63e 100644 --- a/org-drill.el +++ b/org-drill.el @@ -701,11 +701,14 @@ regardless of whether the test was successful.") (when (version< org-version "9.2") (advice-add 'org-get-tags :around #'org-drill-get-tags-advice)) -(defun org-drill-get-tags-advice (_orig-fun &rest args) +(defun org-drill-get-tags-advice (orig-fun &rest args) ;; the two arg call obsoletes get-local-tags (if (= 2 (length args)) ;; and we don't want any byte compile errors - (if (fboundp 'org-get-local-tags) (org-get-local-tags)) + (if (fboundp 'org-get-local-tags) + (org-get-local-tags) + ;; Fallback to original function if org-get-local-tags doesn't exist + (apply orig-fun args)) ;; the non-arg version doesn't return inherited tags, but ;; org-get-tags does. (org-get-tags))) -- cgit v1.2.3