branch: elpa/gnosis commit 0053a282e79afeac6d5730f10203c0f01339d644 Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
Remove deprecated note helpers. --- gnosis.el | 90 --------------------------------------------------------------- 1 file changed, 90 deletions(-) diff --git a/gnosis.el b/gnosis.el index 4df3f9da24..8d809f85d1 100644 --- a/gnosis.el +++ b/gnosis.el @@ -736,96 +736,6 @@ LENGTH: length of id, default to a random number between 10-15." (gnosis-generate-id length) id))) - -;; Adding note(s) consists firstly of a hidden 'gnosis-add-note--TYPE' -;; function that does the computation & error checking to generate a -;; note from given input. Secondly, 'gnosis-add-note-TYPE' normal -;; function, which prompts for user input and passes it to the hidden -;; function. - -(defun gnosis-add-note--basic (id deck-id type keimenon hypothesis answer - parathema tags suspend links) - "Helper for basic type notes. - -Provide assertions for basic type notes. - -DECK-ID: ID for deck. -ID: Integer for note ID. -TYPE: String for type, must be \"basic\". -KEIMENON: Question to display -HYPOTHESIS: List of a single strings or nil, hypothesis serves as a hint. -ANSWER: List of a single item. -TAGS: List of strings. -PARATHEMA: Parathesis for thema. -SUSPEND: integer value, 1 or 0. -LINKS: list of strings." - (cl-assert (integerp deck-id) nil "Deck-id value must be an integer.") - (cl-assert (string= type "basic") nil "Type for cloze type must be \"basic\".") - (cl-assert (stringp keimenon) nil "Keimenon must be a string.") - (cl-assert (or (>= (length answer) (length hypothesis)) - (null hypothesis)) - nil - "Hypothesis value must be a list of one item or nil.") - (cl-assert (and (listp answer) - (= (length answer) 1)) - nil "Answer value must be a list.") - (cl-assert (and (listp tags) - (cl-every 'stringp tags)) - nil "Tags must be a list of strings..") - (cl-assert (or (= suspend 0) - (= suspend 1)) - nil "Suspend value must either 0 or 1") - (cl-assert (and (listp links) - (cl-every 'stringp links)) - nil "Links must be a list") - (if (equal id "NEW") - (gnosis-add-note-fields deck-id type keimenon (or hypothesis (list "")) - answer parathema tags suspend links) - (gnosis-update-note id keimenon hypothesis answer parathema tags links))) - -(cl-defun gnosis-add-note--double (&key deck question hint answer extra (images nil) tags (suspend 0)) - "Add Double type note. - -Essentially, a \"note\" that generates 2 basic notes. The second one -reverses question/answer. - -DECK: Deck name for note. -QUESTION: Quesiton to display for note. -ANSWER: Answer for QUESTION, which user will be prompted to type -HINT: Hint to display during review, before user-input. -EXTRA: Extra information to display after user-input/giving an answer. -IMAGES: Cons cell, where car is the image to display before user-input - and cdr is the image to display post review. -TAGS: Tags used to organize notes -SUSPEND: Binary value of 0 & 1, when 1 note will be ignored." - (gnosis-add-note-fields deck "basic" question hint answer extra tags suspend - (car images) (cdr images)) - (gnosis-add-note-fields deck "basic" answer hint question extra tags suspend - (car images) (cdr images))) - -(cl-defun gnosis-add-note--y-or-n (&key deck question hint answer extra (images nil) tags (suspend 0)) - "Add y-or-n type note. - -DECK: Deck name for note. - -QUESTION: Quesiton to display for note. - -ANSWER: Answer for QUESTION, either `121' (char value for yes) or `110' - (char value for no). - -HINT: Hint to display during review, before user-input. - -EXTRA: Extra information to display after user-input/giving an answer. - -IMAGES: Cons cell, where car is the image to display before user-input - and cdr is the image to display post review. - -TAGS: Tags used to organize notes - -SUSSPEND: Binary value of 0 & 1, when 1 note will be ignored." - (gnosis-add-note-fields deck "y-or-n" question hint answer extra tags suspend - (car images) (cdr images))) - (cl-defun gnosis-mc-cloze-extract-options (str &optional (char gnosis-mc-cloze-separator)) "Extract options for MC-CLOZE note type from STR.