diff options
author | Thanos Apollo <[email protected]> | 2024-04-26 12:22:47 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-04-26 12:23:21 +0300 |
commit | 7fa320defe53bf4a98c7a8e59af1152514d30709 (patch) | |
tree | df43a48682c99dad511cd0377f4b4fbfec4abc3f /gnosis.el | |
parent | 1d5bc2fca56b158726626e3e414f4fcf993fc52a (diff) |
[fix] Display images properly
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -162,6 +162,9 @@ Seperate the question/stem from options." :type 'string :group 'gnosis) +(defvar gnosis-due-notes (length (gnosis-review-get-due-notes)) + "Total due notes.") + ;;; Faces (defgroup gnosis-faces nil @@ -381,11 +384,11 @@ Refer to `gnosis-db-schema-extras' for informations on images stored." (let* ((img (gnosis-get image 'extras `(= id ,id))) (path-to-image (expand-file-name (or img "") (file-name-as-directory gnosis-images-dir))) (image (create-image path-to-image 'png nil :width gnosis-image-width :height gnosis-image-height))) - (cond ((and img (file-exists-p path-to-image)) + (cond ((or (not img) (string-empty-p img)) + (insert "\n\n")) + ((and img (file-exists-p path-to-image)) (insert "\n\n") - (insert-image image)) - ((or (not img) (string-empty-p img)) - (insert "\n\n"))))) + (insert-image image))))) (defun gnosis-display-extra (id) "Display extra information & extra-image for note ID." |