[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill cfe271d824 062/251: Fixed: org-drill-strip-all-d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill cfe271d824 062/251: Fixed: org-drill-strip-all-data now works again (was using obsolete arguments |
Date: |
Mon, 17 Jan 2022 18:59:01 -0500 (EST) |
branch: elpa/org-drill
commit cfe271d8246524396d196d99e1869535c292e810
Author: eeeickythump <devnull@localhost>
Commit: eeeickythump <devnull@localhost>
Fixed: org-drill-strip-all-data now works again (was using obsolete
arguments
to org-schedule).
Try to cope with LaTeX fragments that contain square brackets.
---
org-drill.el | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index f4821a6a7a..9eeb8970dc 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -1520,10 +1520,12 @@ visual overlay, or with the string TEXT if it is
supplied."
(save-excursion
(while (re-search-forward org-drill-cloze-regexp nil t)
;; Don't hide org links, partly because they might contain inline
- ;; images which we want to keep visible
+ ;; images which we want to keep visible.
+ ;; And don't hide LaTeX math fragments.
(unless (save-match-data
- (org-pos-in-regexp (match-beginning 0)
- org-bracket-link-regexp 1))
+ (or (org-pos-in-regexp (match-beginning 0)
+ org-bracket-link-regexp 1)
+ (org-inside-LaTeX-fragment-p)))
(org-drill-hide-matched-cloze-text)))))
@@ -1791,7 +1793,8 @@ items if FORCE-SHOW-FIRST or FORCE-SHOW-LAST is non-nil)."
(let ((in-regexp? (save-match-data
(org-pos-in-regexp (match-beginning 0)
org-bracket-link-regexp 1))))
- (unless in-regexp?
+ (unless (or in-regexp?
+ (org-inside-LaTeX-fragment-p))
(incf match-count)))))
(if (minusp number-to-hide)
(setq number-to-hide (+ match-count number-to-hide)))
@@ -1818,8 +1821,9 @@ items if FORCE-SHOW-FIRST or FORCE-SHOW-LAST is non-nil)."
(setq cnt 0)
(while (re-search-forward org-drill-cloze-regexp item-end t)
(unless (save-match-data
- (org-pos-in-regexp (match-beginning 0)
- org-bracket-link-regexp 1))
+ (or (org-pos-in-regexp (match-beginning 0)
+ org-bracket-link-regexp 1)
+ (org-inside-LaTeX-fragment-p)))
(incf cnt)
(if (memq cnt match-nums)
(org-drill-hide-matched-cloze-text)))))))
@@ -1859,7 +1863,8 @@ the second to last, etc."
(let ((in-regexp? (save-match-data
(org-pos-in-regexp (match-beginning 0)
org-bracket-link-regexp 1))))
- (unless in-regexp?
+ (unless (or in-regexp?
+ (org-inside-LaTeX-fragment-p))
(incf match-count)))))
(if (minusp to-hide)
(setq to-hide (+ 1 to-hide match-count)))
@@ -1873,8 +1878,12 @@ the second to last, etc."
(setq cnt 0)
(while (re-search-forward org-drill-cloze-regexp item-end t)
(unless (save-match-data
- (org-pos-in-regexp (match-beginning 0)
- org-bracket-link-regexp 1))
+ ;; Don't consider this a cloze region if it is part of an
+ ;; org link, or if it occurs inside a LaTeX math
+ ;; fragment
+ (or (org-pos-in-regexp (match-beginning 0)
+ org-bracket-link-regexp 1)
+ (org-inside-LaTeX-fragment-p)))
(incf cnt)
(if (= cnt to-hide)
(org-drill-hide-matched-cloze-text)))))))
@@ -2650,7 +2659,7 @@ failure. This command can be used to 'reset' repetitions
for an item."
(defun org-drill-strip-entry-data ()
(dolist (prop org-drill-scheduling-properties)
(org-delete-property prop))
- (org-schedule t))
+ (org-schedule '(4)))
(defun org-drill-strip-all-data (&optional scope)
@@ -2668,7 +2677,7 @@ values as `org-drill-scope'."
;; `org-delete-property-globally', which is faster.
(dolist (prop org-drill-scheduling-properties)
(org-delete-property-globally prop))
- (org-map-drill-entries (lambda () (org-schedule t)) scope))
+ (org-map-drill-entries (lambda () (org-schedule '(4))) scope))
(t
(org-map-drill-entries 'org-drill-strip-entry-data scope)))
(message "Done.")))
- [nongnu] elpa/org-drill 93545edb91 063/251: Added tag 2.3.8 for changeset a8cade42f59c, (continued)
- [nongnu] elpa/org-drill 93545edb91 063/251: Added tag 2.3.8 for changeset a8cade42f59c, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8b6e230886 065/251: Added ability to define arbitrary left and right cloze delimiters (strings),, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b17bf579bd 039/251: - New card types: show2cloze, hide1_firstmore, show1_firstless, show1_lastmore. See docs for details., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9487fd21f8 002/251: Added special card type for spanish verbs, to demonstrate custom card types., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 5040d0e6d2 014/251: Added tag 1.4 for changeset 2e4735840112, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill e698616493 026/251: - More robust handling of the situation where we resume a drill session but, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill e7ffd8e6eb 040/251: Renamed documentation file and fixed a few typos., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 063e8035a8 071/251: - Ignore cloze markings if they occur inside Org source blocks, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 663a1ee3f3 079/251: Clarified that org-drill is licensed under GPL v3., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8a9192cc2f 080/251: Persistence of the optimal factor matrix across application sessions is now, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill cfe271d824 062/251: Fixed: org-drill-strip-all-data now works again (was using obsolete arguments,
ELPA Syncer <=
- [nongnu] elpa/org-drill 09f7bc5c9b 083/251: Backout changeset 5d9b61ea5a181eb282e4069c17cbdf00e4325726, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill f9a217faa1 052/251: Wrapped all calls to 'org-display-inline-images' in 'ignore-errors', to prevent, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d0405e9311 060/251: Fixed bug with scheduling failed cards, caused by changes to 'org-schedule' in, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill e43199b988 056/251: Changed permissions on some files., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 4114c541a7 082/251: You can now customise the keys for the 'quit', 'edit', 'tags', 'help' and, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8c374c0998 091/251: Merged in Fuco/org-drill/fix-input (pull request #3), ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c62093fad3 095/251: Added tag 2.5 for changeset 97921372f286, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 201e6991df 100/251: Added tag 2.6 for changeset f96493b0ba4a, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 66d74724d7 090/251: Turn off input method while reading events, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 6fc2bfe8c3 103/251: SM2 algorithm should now actually work., ELPA Syncer, 2022/01/17