From 35150f24f799b96db71d596cebb650cacdda44b7 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sun, 19 Jan 2025 12:14:35 +1100 Subject: [emacs] Add xdg-open button to infobox of exiftool --- emacs/.emacs.d/lisp/my/infobox.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/.emacs.d/lisp/my') 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) -- cgit v1.2.3