From 5257d3b3f70a9d3580fd0ce81b73d9427ff45143 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 14 Jun 2017 00:18:24 +0530 Subject: Use regexp to extract tag and value. * exiftool.el (exiftool-read): Use `string-match' with regexp to extract tag and value. Previous this change, `exiftool-read' failed to correctly handle tags whose value contained a ":". --- exiftool.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exiftool.el b/exiftool.el index 77d829d..e477ed9 100644 --- a/exiftool.el +++ b/exiftool.el @@ -86,10 +86,10 @@ value. If no TAGS are specified, read all tags from FILE. \(fn FILE TAG...)" (mapcar (lambda (line) - (cl-destructuring-bind - (tag value) (split-string line ": ") - (let ((value (if (equal value "-") "" value))) - (cons tag value)))) + (string-match "\\([^:]*\\): \\(.*\\)" line) + (let ((tag (match-string 1 line)) + (value (match-string 2 line))) + (cons tag (if (equal value "-") "" value)))) (split-string (apply 'exiftool-command "-s" "-s" "-f" -- cgit v1.2.3