about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLin Jian2026-03-28 21:57:53 +0000
committerArun Isaac2026-03-28 22:10:02 +0000
commit23e9b7b407440037b23b1f7ad5f2010e41898621 (patch)
treede27d1c2ea2b010b20c55d30682f0fd0c2df6439
parent17454ddf81eab50b948a565be812761a587e424e (diff)
downloadexiftool.el-23e9b7b407440037b23b1f7ad5f2010e41898621.tar.gz
exiftool.el-23e9b7b407440037b23b1f7ad5f2010e41898621.tar.lz
exiftool.el-23e9b7b407440037b23b1f7ad5f2010e41898621.zip
Defer calling `exiftool-run'. HEAD master
Previously, `exiftool-run' was called after (require 'exiftool), which
caused compilation errors when compiling packages depending on
exiftool.el in a sandboxed environment.

This patch fixes that compilation error by deferring the call of
`exiftool-run' to the first call of `exiftool-command'.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
-rw-r--r--exiftool.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/exiftool.el b/exiftool.el
index 7ba3d27..1b63f8e 100644
--- a/exiftool.el
+++ b/exiftool.el
@@ -2,12 +2,13 @@
 
 ;; Elisp wrapper around ExifTool
 ;; Copyright (C) 2017, 2019 by Arun I
+;; Copyright (C) 2026 by Lin Jian
 ;;
 ;; Author: Arun I <arunisaac@systemreboot.net>
 ;; Version: 0.3.2
 ;; Keywords: data
 ;; Homepage: https://git.systemreboot.net/exiftool.el
-;; Package-Requires: ((emacs "25"))
+;; Package-Requires: ((emacs "27.1"))
 
 ;; This file is part of exiftool.el.
 
@@ -40,6 +41,7 @@
 
 (require 'cl-lib)
 (require 'subr-x)
+(require 'thunk)
 (require 'tq)
 
 (defvar exiftool-executable "exiftool"
@@ -70,7 +72,7 @@ process."
 ;; Declare exiftool-command to pacify byte compiler
 (declare-function exiftool-command "exiftool.el" (&rest args))
 
-(let ((tq (tq-create (exiftool-run))))
+(thunk-let ((tq (tq-create (exiftool-run))))
   (defun exiftool-command (&rest args)
     "Execute a command in the currently running exiftool process.