From b2a862b56835a63245e4872a82e4da455f2523dc Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 21 Jan 2025 09:44:48 +1100 Subject: [emacs] small fixes to emms and fediorg/exitter emms: reset score delta to 1 if last command is not emms-playlist-mode-play-smart fediorg: show thumbnails only when they are legit image files --- emacs/.emacs.d/lisp/my/fediorg.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'emacs/.emacs.d/lisp/my/fediorg.el') diff --git a/emacs/.emacs.d/lisp/my/fediorg.el b/emacs/.emacs.d/lisp/my/fediorg.el index 123545b..e2f21b8 100644 --- a/emacs/.emacs.d/lisp/my/fediorg.el +++ b/emacs/.emacs.d/lisp/my/fediorg.el @@ -215,8 +215,8 @@ Including ancestors and descendants, if any." (with-temp-buffer (insert (fediorg-make-org-link .url .type)) - (if .description - (insert ": " .description)) + (when .description + (insert ": " .description)) (when .preview_url (let ((thumb-file-name (file-name-concat @@ -226,7 +226,8 @@ Including ancestors and descendants, if any." (ignore-error 'file-already-exists (url-copy-file .preview_url thumb-file-name)) (insert "\n") - (insert-image (create-image thumb-file-name)) + (when-let ((image (create-image thumb-file-name))) + (insert-image image)) )) (buffer-string)))) attachments -- cgit v1.2.3