aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: add SM5 scheduler testsCraig Jennings2026-04-291-0/+337
| | | | | | | | The SM5 algorithm at org-drill-determine-next-interval-sm5 had no direct test coverage. SM2 has 37 tests. SM5 has zero. Adds a per-function test file that mirrors the SM2 file's structure. 32 tests cover Normal, Boundary, Error, and algorithm-verification categories. The SM5-specific surface gets dedicated coverage. Failure preserves the input EF, not the modified one. The of-matrix is copied, not mutated. The four delta-days configurations (nil, positive, negative-with-flag, negative-without-flag) each take a different code path. The Error category includes should-error cases for the cl-assert preconditions on n and quality, which is a gap SM2's tests still have. All 32 pass on first run as characterization. Full suite at 180 of 180.
* docs: clarify fork status in READMECraig Jennings2026-04-291-0/+6
| | | | Add a top note that flags this as a maintained fork with applied upstream patches, and a bottom note clarifying that the existing Author and History sections describe the original project. Helps anyone who lands on the GitHub mirror without context.
* chore: gitignore todo.orgCraig Jennings2026-04-291-0/+1
| | | | The maintenance notes weren't meant to live in public history. Removed from past commits via filter-repo.
* build: add nongnu source to Cask fileCraig Jennings2026-04-291-0/+1
| | | | The persist package moved to the nongnu ELPA archive years ago. The existing gnu/melpa/org sources couldn't resolve it, so cask install failed and make test-unit was unrunnable. Unblocks the test suite.
* fix: use correct calling convention for `display-buffer`p-snow2026-04-291-1/+1
| | | | (cherry picked from commit eacb6d0c018839d8207ee80e02b46b314278ac3f)
* Update org-drill-time-to-inactive-org-timestamp to Org 9.6 formatJoseph Turner2026-04-291-1/+4
| | | | (cherry picked from commit 76d45fb0ea6e216b2cb173bdcf73ef284d350ff8)
* fix: add error handling for malformed timestamps in ↵Craig Jennings2025-11-131-1/+3
| | | | | | | | | | | | | | | | org-drill-entry-days-since-creation Wrapped org-time-stamp-to-now call in condition-case to gracefully handle malformed DATE_ADDED property values. Now returns nil instead of crashing when encountering invalid timestamp formats. Changes: - Added condition-case around org-time-stamp-to-now (lines 2896-2898) - Returns nil on error, allowing the function to fall through to other branches or return nil gracefully This prevents unhandled errors in long-running sessions when drill entries have corrupted or manually-edited timestamp values.
* fix: correct property names in org-drill-merge-buffersCraig Jennings2025-11-131-4/+4
| | | | | | | | | | Changed incorrect property names to match standard naming convention: - LAST_QUALITY → DRILL_LAST_QUALITY (lines 3394-3395) - LAST_REVIEWED → DRILL_LAST_REVIEWED (lines 3397-3398) This ensures consistency with the rest of the codebase where all drill properties use the DRILL_ prefix. The old names would create properties that don't match the standard schema and wouldn't be read correctly.
* refactor: extract hardcoded lapse threshold into customizable variableCraig Jennings2025-11-131-6/+18
| | | | | | | | | | | | | Created org-drill-lapse-threshold-days defcustom (default 90) to replace hardcoded values scattered throughout the code. This improves maintainability and allows users to customize when entries are considered lapsed. Changes: - Added defcustom org-drill-lapse-threshold-days (line 660-669) - Updated org-drill-order-overdue-entries to use variable (line 2867) - Simplified org-drill--entry-lapsed-p to use variable (line 2884-2886) - Added safe-local-variable declaration (line 687) - Updated docstring references to use variable name
* fix: prevent window corruption in org-drill-merge-buffersCraig Jennings2025-11-131-16/+16
| | | | | | | | | | | | | | | | Replaced switch-to-buffer with with-current-buffer to avoid changing visible buffers during merge operation. This prevents window state corruption and allows the function to work correctly in batch mode. Changed line 3374-3375 from: (save-excursion (switch-to-buffer (marker-buffer marker)) ...) To: (with-current-buffer (marker-buffer marker) (save-excursion ...))
* refactor: remove obsolete commented code for failure countCraig Jennings2025-11-131-3/+0
| | | | | | | | Removed commented-out code that redundantly set the failures variable. The failures count is already obtained from org-drill-entry-failure-count on line 1538, making the commented code (lines 1548-1550) unnecessary. This cleans up maintainability issues and removes confusing dead code.
* fix: improve error handling for empty property blocks in cloze processingCraig Jennings2025-11-131-4/+18
| | | | | | | | | | | Previously used (or (cdr (org-get-property-block)) (point)) which could return invalid position if no property block exists. Now properly positions after heading and metadata using org-end-of-meta-data when property block is missing. Affects: - org-drill-present-multicloze-hide-n (line 2267) - org-drill-present-multicloze-hide-nth (line 2345)
* Fix race condition with timer cleanup and marker leakCraig Jennings2025-11-131-13/+16
| | | | | | | | | | | | | | Timer cleanup fix: - Wrapped recursive-edit in unwind-protect to ensure org-drill-presentation-timer-cancel is always called - Timer is now cancelled even if recursive-edit exits abnormally Marker leak fix: - Moved org-drill-free-markers outside the (unless (oref session end-pos)) condition - Done-entries markers are now always freed in cleanup, even on error or suspension - Prevents memory leaks in long-running Emacs sessions Fixes two severity B bugs in todo.org
* Fix docstring typo and style in org-drill-entry-overdue-pCraig Jennings2025-11-131-1/+1
| | | | | | | Changed 'dasy' to 'days' and improved docstring to follow Emacs conventions (imperative mood: 'Return non-nil' instead of 'Returns true'). Fixes severity B bug in todo.org
* Fix potential infinite loop in marker selectionCraig Jennings2025-11-131-5/+12
| | | | | | | | | | | | | | | | Added safety counter to prevent infinite loop when all pending entries are invalid (deleted or no longer have drill tag). Changes: - Added attempts counter with max-attempts limit of 1000 - Loop now exits if max attempts reached - Returns nil if no valid entry found after exhausting attempts Impact: Prevents infinite loop if all pending entries become invalid, which could happen if entries are deleted or tags are removed during a session. Fixes severity B bug in todo.org
* Fix potential division by zero in org-drill-entry-overdue-pCraig Jennings2025-11-131-0/+1
| | | | | | | | | Added check to ensure last-interval is greater than 0 before performing division. Impact: Prevents division-by-zero error when last-interval is 0 (new items or after failures), which would crash the drill session. Fixes severity B bug in todo.org
* Fix missing return value in org-drill-get-tags-adviceCraig Jennings2025-11-131-2/+5
| | | | | | | | | | | | | | | 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
* Security: Replace unsafe read() calls with safer alternativesCraig Jennings2025-11-131-12/+37
| | | | | | | | | | | | | | | | | | | Replaced unsafe use of read() function on user-controlled property values to prevent arbitrary code execution vulnerability. Changes: - Lines 1353, 1406: Changed read() to string-to-number() for DRILL_CARD_WEIGHT - Line 2838: Changed read() to string-to-number() for DRILL_LAST_INTERVAL - Line 1068: Created org-drill--safe-read-learn-data() helper function that: * Uses read-from-string instead of read * Validates input is a list with at least 3 numeric elements * Returns nil on invalid/malicious input with error handling * Falls back to safe defaults if LEARN_DATA is corrupted Impact: Prevents arbitrary code execution if attacker controls org-mode properties through shared files or malicious imports. Fixes severity A security bug in todo.org
* Fix typo in cram-mode slot documentationCraig Jennings2025-11-131-1/+1
| | | | | | | | Changed :documementation to :documentation in EIEIO class slot definition. This fixes EIEIO's ability to recognize slot documentation for introspection and help systems. Fixes severity A bug in todo.org
* test: Add boundary, error, and edge case testsCraig Jennings2025-11-135-0/+1082
| | | | | | | | Added 66 comprehensive tests covering: - Entry detection with extreme values and Unicode - SM2 algorithm with boundary conditions - Workflow error handling with malformed data - Card types with complex content structures
* test: Complete Phase 2 card type testsCraig Jennings2025-11-133-0/+271
| | | | | | | | | - Add unit tests for show1cloze card type (6 tests) - Add unit tests for multicloze variants (12 tests) - Add integration test for card type system (5 tests) Phase 2 complete: All major card types tested Total: 114 tests (98 unit + 16 integration), all passing
* test: Add Phase 2 card type testsCraig Jennings2025-11-133-0/+478
| | | | | | | | - Add unit tests for simple card type (11 tests) - Add unit tests for twosided card type (11 tests) - Add unit tests for hide1cloze card type (4 tests) Total: 91 tests (80 unit + 11 integration), all passing
* test: Add Phase 1 foundation tests for critical functionsCraig Jennings2025-11-136-1/+1071
| | | | | | | | | | | - Add unit tests for org-drill-entry-p (14 tests) - Add unit tests for org-drill-part-of-drill-entry-p (14 tests) - Add unit tests for SM2 scheduling algorithm (23 tests) - Add integration test for basic drill workflow (11 tests) - Update Makefile to support test-*.el naming pattern - Rename org-drill-test.el to test-org-drill.el for consistency Total: 65 tests, all passing
* refactor: Improve test infrastructure and fix all compiler warningsCraig Jennings2025-11-136-115/+940
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modernizes the test infrastructure and eliminates all compilation warnings to prepare for comprehensive test coverage. Test Infrastructure Improvements: - Reorganize tests from test/ to tests/ directory (standard convention) - Modernize Makefile with patterns from chime.el - Add convenient test targets (test-file, test-name) - Support unit and integration test separation - Better help documentation with examples - Auto-detect Cask installation location - Add comprehensive test-strategy.org document - 6-week implementation plan - Critical function prioritization - Integration test scenarios - Coverage goals (80% target) Compiler Warning Fixes (org-drill.el): - Replace obsolete org-mode functions: - org-show-subtree → org-fold-show-subtree - org-show-entry → org-fold-show-entry - org-get-tags-at → org-get-tags - org-remove-latex-fragment-image-overlays → org-clear-latex-preview - org-toggle-latex-fragment → org-latex-preview - org-bracket-link-regexp → org-link-bracket-re - Fix ~31 unescaped single quotes in docstrings (use \=') - Remove unused lexical variables (cb, drawer-name, session, orig-fun) - Remove obsolete outline-view-change-hook binding - Wrap org 8.x compatibility shim in with-no-warnings - Fix long docstring at line 1085 Test Status: - All 3 existing tests passing - Zero compilation warnings (was ~40 warnings) - Ready for Phase 1 implementation (foundation tests)
* feat: Add display management with customizable settingsCraig Jennings2025-11-121-0/+90
| | | | | | | | | | | | | | | | | | Add built-in display management for drill sessions with user-configurable settings. No external dependencies required. New features: - Customizable font size in points (org-drill-text-size-during-session) - Optional variable-pitch mode (org-drill-use-variable-pitch) - Optional modeline hiding (org-drill-hide-modeline-during-session) - Automatic drawer hiding with new org-drill-hide-drawers function - Session lifecycle hooks (org-drill-before-session-hook, org-drill-after-session-hook) Display settings are automatically saved and restored when sessions end, including on quit, error, or normal completion via unwind-protect. All settings use proper package naming (org-drill-*) with no external dependencies. Works out of the box for all users.
* org-drill: Implement custom drawer hiding functionCraig Jennings2025-11-122-12/+28
| | | | | | | | | Replace `org-cycle-hide-drawers` with a new `org-drill-hide-drawers` function for more reliable drawer hiding in org-drill. This change enhances the drill display by ensuring all drawers, including the PROPERTIES drawer, are consistently hidden during presentations. The custom function iterates through entries and hides the designated regions, improving the user experience during interactive sessions.
* Update docker imagesPhillip Lord2021-04-284-6/+16
|
* Update CI.Phillip Lord2021-04-281-1/+1
|
* Fix autoloadsPhillip Lord2021-04-271-0/+3
|
* Merge branch 'branweb/org-mode-version' into 'master'Phillip Lord2020-04-121-1/+1
|\ | | | | | | | | | | Bump org-mode version to 9.3 See merge request phillord/org-drill!10
| * Bump org-mode version to 9.3Brandon Webster2020-04-051-1/+1
| | | | | | | | | | | | Issue reference: https://gitlab.com/phillord/org-drill/-/issues/19 Caused by https://gitlab.com/phillord/org-drill/-/commit/82b50e378db69e96fb3d916785a2f03fddf85637, which introduced a function created here: https://code.orgmode.org/bzg/org-mode/commit/6d9022df22f86e8b0ea00dfb9179128136edc49a?style=split. Fn is available in org 9.3. Don't know much about packaging for melpa but I figure 82b50e37 should have bumped the org version from 9.2.X at least.
* | Merge branch 'branweb/fix-cram-mode' into 'master'Phillip Lord2020-04-125-20/+87
|\ \ | | | | | | | | | | | | | | | Allow Creating New Session in Cram Mode See merge request phillord/org-drill!9
| * | add cram-mode testBrandon Webster2020-04-122-0/+63
| | |
| * | add helper fn to check cards without killing emacsBrandon Webster2020-04-121-7/+14
| | |
| * | update gitignore to exclude all org files in robots dir ending in -copyBrandon Webster2020-04-121-8/+2
| | |
| * | Allow Creating New Session in Cram ModeBrandon Webster2020-04-051-5/+8
| |/ | | | | | | | | | | | | | | | | | | | | A current session does not exist when `org-drill-cram` is called, so it's current behavior of toggling the `crame-mode` property doesn't seem to do anything. This change allows it to inform `org-drill` to create a new session in "cram mode." I'm not sure if this is the proper way to impliment this relative to the rest of the codebase, which I'm still a little unfamiliar with. But I thought this pr would still be useful, if only to create discussion.
* / Fix use of cl.elPhillip Lord2020-04-081-1/+1
|/ | | | | | * org-drill.el (org-drill-order-overdue-entries): Use cl-first Closes #23
* Release v2.7.02.7.0Phillip Lord2020-02-161-1/+1
|
* Remove interactive from org-drill-entry-fPhillip Lord2020-02-161-1/+0
|
* Merge branch 'master' into 'master'Phillip Lord2020-02-161-1/+1
|\ | | | | | | | | | | Fix typo "Eaqch" to "Each" See merge request phillord/org-drill!8
| * Fix typo "Eaqch" to "Each"James Miller2020-01-181-1/+1
|/
* Merge branch 'fix/latex-overlays' into 'master'Phillip Lord2019-12-191-2/+8
|\ | | | | | | | | | | Show LaTex overlays after clearing them See merge request phillord/org-drill!7
| * Merge branch 'master' into 'fix/latex-overlays'Phillip Lord2019-12-191-1/+1
| |\ | |/ |/| | | | | # Conflicts: # org-drill.el
* | Merge branch 'fix/show-latex-fragments' into 'master'Phillip Lord2019-12-191-1/+1
|\ \ | | | | | | | | | | | | | | | fix argument passed to now obsoleted org-toggle-latex-fragment See merge request phillord/org-drill!6
| * | fix argument passed to now obsoleted org-toggle-latex-fragmentDarrell Overbay2019-08-071-1/+1
|/ / | | | | | | | | | | The interpretation of the argument to org-toggle-latex-fragment changed when it was aliased to org-latex-preview. Regardless, '(16) should work for either version
| * Show latex overlays in simple card's answerMark Skilbeck2019-10-181-0/+7
| |
| * Do not remove overlays after finishing cardMark Skilbeck2019-10-181-2/+1
| |
| * Show LaTex overlays after clearing themMark Skilbeck2019-10-161-1/+1
|/
* Fix org-get-tags compatabilityPhillip Lord2019-07-271-1/+3
| | | | | | The <9.2 compatability advice was working incorrectly by calling `org-get-tags` which prior to 9.2 returned only local tags. This now calls `org-get-tags-at` which seems to work.
* Remove obsolete org-drill-optimal-factor-matrixPhillip Lord2019-07-271-17/+0
|