Anonymous avatar Anonymous committed 6ff8dd7

Bug fix: when drill sessions span more than one file, display items in the other files correctly.
(Previously the only items which worked correctly were those in the buffer/file where org-drill was invoked.)

Comments (0)

Files changed (1)

 ;;; org-drill.el - Self-testing with org-learn
 ;;;
 ;;; Author: Paul Sexton <eeeickythump@gmail.com>
-;;; Version: 1.5
+;;; Version: 1.6
 ;;; Repository at http://bitbucket.org/eeeickythump/org-drill/
 ;;;
 ;;;
       (unless m
         (error "Unexpectedly ran out of pending drill items"))
       (save-excursion
-        (set-buffer (marker-buffer m))
+        (switch-to-buffer (marker-buffer m))
         (goto-char m)
         (setq result (org-drill-entry))
         (cond
           (setq end-pos (point-marker))
           (return-from org-drill-entries nil))
          ((eql result 'skip)
-          nil)   ; skip this item
+          nil)                          ; skip this item
          (t
           (cond
            ((<= result org-drill-failure-quality)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.