org-drill doesn't work with org-mode 9.2

Issue #62 new
Álvaro Tejero-Cantero
created an issue

To reproduce I create a drill-tagged headline in an empty file and invoke M-x org-drill, which fails with error message:

Invalid match tag: ""

Works correctly with Org 9.1.14 but not with 9.2; tested in both cases with the outdated org-drill 2.4.7 bundled with org-plus-contrib and with org-drill 2.6.1 from this repository.

Presumably connected with the recent org-get-tags meaning change, but I unfortunately lack emacs-fu to diagnose further.

Comments (3)

  1. Matthys Matthys

    Changing "" to t in org-drill-hide-subheadings-if seems to fix the problem:

    (defun org-drill-hide-subheadings-if (test)
      "TEST is a function taking no arguments. TEST will be called for each
    of the immediate subheadings of the current drill item, with the point
    on the relevant subheading. TEST should return nil if the subheading is
    to be revealed, non-nil if it is to be hidden.
    Returns a list containing the position of each immediate subheading of
    the current topic."
      (let ((drill-entry-level (org-current-level))
            (drill-sections nil))
        (org-show-subtree)
        (save-excursion
          (org-map-entries
           (lambda ()
             (when (and (not (outline-invisible-p))
                        (> (org-current-level) drill-entry-level))
               (when (or (/= (org-current-level) (1+ drill-entry-level))
                            (funcall test))
                 (hide-subtree))
               (push (point) drill-sections)))
           t 'tree))
        (reverse drill-sections)))
    
  2. Hakan Serce

    TL;DR

    I have an org-drill fork that fixes the problem here: https://github.com/hakanserce/org-drill

    Just use this one instead of the built-in org-drill.

    Details

    It seems like the problem is associated with the following commit: https://code.orgmode.org/bzg/org-mode/commit/9df82be0742722b0c008b9b13e02627899c3387d

    With this change org-tags-expand fails with a blank match argument.

    The fix requires either a change in org.el to use nil when match argument is empty (instead of failing), or a fix in org-drill.el to use nil (or t) instead of blank string when calling org-map-entries (which in turn ends up calling org-tags-expand).

    Fix in my fork of org-drill: https://github.com/hakanserce/org-drill/commit/9e07edde08ce4b439bbc8baa33d3f09d28745c81

  3. Jake Vossen

    How long until this is pushed up stream?

    I am having the error

    File mode specification error: (void-function org-drill-add-cloze-fontification)
    

    , could this be related?

  4. Log in to comment