Smarter autocomplete for custom EXIF functions in Dired
This commit is contained in:
parent
a1bf75be00
commit
da2b061e4b
1 changed files with 9 additions and 2 deletions
11
init.el
11
init.el
|
@ -911,7 +911,10 @@
|
||||||
|
|
||||||
(defun dl/view-exif-data (file)
|
(defun dl/view-exif-data (file)
|
||||||
"View EXIF data of FILE."
|
"View EXIF data of FILE."
|
||||||
(interactive "fFile: ")
|
(interactive (let ((fname (thing-at-point 'existing-filename)))
|
||||||
|
(list
|
||||||
|
(read-string (format "File (%s): " (file-name-nondirectory fname))
|
||||||
|
nil nil fname))))
|
||||||
(let ((buf-name (concat "*EXIF " file "*")))
|
(let ((buf-name (concat "*EXIF " file "*")))
|
||||||
;; If the buffer already exists, kill it.
|
;; If the buffer already exists, kill it.
|
||||||
(when (get-buffer buf-name)
|
(when (get-buffer buf-name)
|
||||||
|
@ -930,7 +933,11 @@
|
||||||
|
|
||||||
(defun dl/set-exif-data (file tag-name tag-value)
|
(defun dl/set-exif-data (file tag-name tag-value)
|
||||||
"In FILE, set EXIF tag TAG-NAME to value TAG-VALUE."
|
"In FILE, set EXIF tag TAG-NAME to value TAG-VALUE."
|
||||||
(interactive "fFile: \nsTag: \nsValue: ")
|
(interactive (list (let ((fname (thing-at-point 'existing-filename)))
|
||||||
|
(read-string (format "File (%s): " (file-name-nondirectory fname))
|
||||||
|
nil nil fname))
|
||||||
|
(read-string "Tag (Title): " nil nil "Title")
|
||||||
|
(read-string "Value: ")))
|
||||||
(let ((options '("-%t=%v" "-overwrite_original" "%f"))
|
(let ((options '("-%t=%v" "-overwrite_original" "%f"))
|
||||||
(spec (list
|
(spec (list
|
||||||
(cons ?f (expand-file-name file))
|
(cons ?f (expand-file-name file))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue