aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2025-01-19 12:14:35 +1100
committerYuchen Pei <id@ypei.org>2025-01-19 12:14:35 +1100
commit35150f24f799b96db71d596cebb650cacdda44b7 (patch)
treefb138ccdc566d5101aff5dfd3addbbf75c28f4a5 /emacs/.emacs.d/lisp/my
parent2b66368da17324fc707853e983ad6f267e563f73 (diff)
[emacs] Add xdg-open button to infobox of exiftool
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/infobox.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/infobox.el b/emacs/.emacs.d/lisp/my/infobox.el
index 2c33ae9..036cee8 100644
--- a/emacs/.emacs.d/lisp/my/infobox.el
+++ b/emacs/.emacs.d/lisp/my/infobox.el
@@ -97,6 +97,13 @@ something like
(infobox-render-string
(with-temp-buffer
(call-process "exiftool" nil t nil filename)
+ (goto-char (point-min))
+ (flush-lines "ExifTool Version")
+ (end-of-line)
+ (insert " -- " (buttonize
+ "xdg-open"
+ (lambda (_)
+ (call-process "xdg-open" nil 0 nil filename))))
(buffer-string))
`(infobox-exiftool ,filename)
(called-interactively-p 'interactive)