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/exitter | 2 +- emacs/.emacs.d/lisp/hmm.el | 2 +- emacs/.emacs.d/lisp/my/infobox.el | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/lisp/exitter b/emacs/.emacs.d/lisp/exitter index 84e024f..9af8216 160000 --- a/emacs/.emacs.d/lisp/exitter +++ b/emacs/.emacs.d/lisp/exitter @@ -1 +1 @@ -Subproject commit 84e024f1ae7944da1de79f71fee290cd73df11c8 +Subproject commit 9af8216d544169f5385b32c73c8cd29c5cef9d2b diff --git a/emacs/.emacs.d/lisp/hmm.el b/emacs/.emacs.d/lisp/hmm.el index a0660da..3187230 160000 --- a/emacs/.emacs.d/lisp/hmm.el +++ b/emacs/.emacs.d/lisp/hmm.el @@ -1 +1 @@ -Subproject commit a0660da71f9aef8909973e9fd44b5eb34db0386b +Subproject commit 318723000cad21c0134eefd33e310b953ddbbe7f 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