diff options
author | Yuchen Pei <id@ypei.org> | 2025-01-22 09:50:49 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2025-01-22 09:50:49 +1100 |
commit | 589d5daea2910facb5cde4a23f139a9db76dbcfb (patch) | |
tree | 35bd05afeab7241b919f6e8077bd655230b4abb7 /emacs/.emacs.d/lisp/my | |
parent | b2a862b56835a63245e4872a82e4da455f2523dc (diff) |
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r-- | emacs/.emacs.d/lisp/my/infobox.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/infobox.el b/emacs/.emacs.d/lisp/my/infobox.el index 036cee8..5698042 100644 --- a/emacs/.emacs.d/lisp/my/infobox.el +++ b/emacs/.emacs.d/lisp/my/infobox.el @@ -63,6 +63,17 @@ something like (with-help-window "*infobox*" (with-current-buffer standard-output (let ((n-rows 0)) + ;; TODO: use a more standard function than + ;; `my-make-filename-from-url' + (when-let* ((thumb-url (alist-get "Thumbnail" info nil nil 'equal)) + (file-name (file-name-concat + "/tmp" + (my-make-filename-from-url thumb-url)))) + (url-copy-file (message thumb-url) file-name t) + (insert-image (create-image file-name nil nil + :max-width (window-width nil t))) + (insert "\n") + (setq n-rows (1+ n-rows))) (seq-do (lambda (pair) (when pair |