From 28f6c9dd8e7601e75db5825a218aae7db72b3105 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 3 Jan 2025 19:55:22 +0200 Subject: Remove read-string-from-buffer. --- gnosis.el | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/gnosis.el b/gnosis.el index 1791246..132119c 100644 --- a/gnosis.el +++ b/gnosis.el @@ -645,35 +645,13 @@ If FALSE t, use gnosis-face-false face" "\n") (gnosis-insert-separator)) -(defun gnosis-display-extra (id) - "Display extra information & extra-image for note ID." - (let ((extras (or (gnosis-get 'extra-notes 'extras `(= id ,id)) ""))) - (goto-char (point-max)) - (gnosis-display-image id 'extra-image) - (insert "\n" (gnosis-center-string - (propertize extras 'face 'gnosis-face-extra)) - "\n") - (gnosis-apply-syntax-overlay))) - -;;;###autoload -(defun gnosis-read-string-from-buffer (prompt string) - "Switch to a new buffer to edit STRING in a recursive edit. -The user finishes editing with \\\\[gnosis-string-edit-done], or aborts with \\\\[gnosis-string-edit-abort]). - -PROMPT will be inserted at the start of the buffer, but won't be -included in the resulting string. If nil, no prompt will be -inserted in the buffer. - -Also see `gnosis-string-edit'." - (gnosis-string-edit prompt string - (lambda (edited) - (setq string (substring-no-properties edited)) - (exit-recursive-edit)) - :abort-callback (lambda () - (exit-recursive-edit) - (error "Aborted edit"))) - (recursive-edit) - string) +(defun gnosis-display-parathema (parathema) + "Display PARATHEMA." + (goto-char (point-max)) + (and parathema (gnosis-center-string parathema)) + ;; (and parathema (insert "\n\n" (propertize parathema 'face 'gnosis-face-parathema))) + (gnosis-apply-syntax-overlay) + (gnosis-center-current-line)) (defun gnosis-display-next-review (id success) "Display next interval of note ID for SUCCESS." -- cgit v1.2.3