diff options
author | Thanos Apollo <[email protected]> | 2024-06-28 04:31:59 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-06-28 04:31:59 +0300 |
commit | 2042ef66bebc8b80b24b49ba667f85ddda2ce861 (patch) | |
tree | bc74528f0cf87323fdb624ffab0bea5d5dafd7ad | |
parent | 6b637b10a68e2979fef6ef4a6e92ef9a5aca93c2 (diff) |
gnosis-display-question: Center string & apply syntax highlighting
-rw-r--r-- | gnosis.el | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -366,6 +366,17 @@ This will not be applied to sentences that start with double space." (delete-region end (match-end 0)) (delete-region (match-beginning 0) start)))))))) +(defun gnosis-display-question (id &optional fill-paragraph-p) + "Display main row for note ID. + +If FILL-PARAGRAPH-P, insert question using `fill-paragraph'." + (let ((question (gnosis-get 'main 'notes `(= id ,id)))) + (erase-buffer) + (if fill-paragraph-p + (fill-paragraph (insert "\n" (propertize question 'face 'gnosis-face-main)))) + (insert "\n" (gnosis-center-string (propertize question 'face 'gnosis-face-main))) + (gnosis-apply-syntax-overlay))) + (cl-defun gnosis-display-image (id &optional (image 'images)) "Display image for note ID. |