aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-help.el3
-rw-r--r--emacs/.emacs.d/lisp/my/infobox.el11
2 files changed, 13 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/ycp-help.el b/emacs/.emacs.d/init/ycp-help.el
index 5cbbed0..98fa58c 100644
--- a/emacs/.emacs.d/init/ycp-help.el
+++ b/emacs/.emacs.d/init/ycp-help.el
@@ -44,7 +44,8 @@
)
(my-package info
- ;; TODO consider using `Info-additional-directory-list' instead
+ ;; Can't `Info-additional-directory-list' - won't be used in
+ ;; `info-display-manual' somehow
(add-to-list 'Info-directory-list (locate-user-emacs-file "info")))
(my-keybind global-map
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