diff options
author | Eli Zaretskii <eliz@gnu.org> | 2024-05-08 16:13:27 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-05-08 16:13:27 +0300 |
commit | 3d65d4306b98efba59ffabe86d8c99e6f37cd8d2 (patch) | |
tree | 52524ae5b425c50f0746a48704a7bd3ac85c0318 /lisp/image/image-dired.el | |
parent | b392169e541a29178d7ae20f329d48b3d2bd78cf (diff) | |
download | emacs-3d65d4306b98efba59ffabe86d8c99e6f37cd8d2.tar.gz emacs-3d65d4306b98efba59ffabe86d8c99e6f37cd8d2.tar.bz2 emacs-3d65d4306b98efba59ffabe86d8c99e6f37cd8d2.zip |
Avoid errors in 'image-dired-tag-thumbnail'
* lisp/image/image-dired.el (image-dired-tag-thumbnail)
(image-dired-tag-thumbnail-remove): Move here from
image-dired-tags.el. (Bug#70821)
Diffstat (limited to 'lisp/image/image-dired.el')
-rw-r--r-- | lisp/image/image-dired.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 26d5811f159..00dc8e31d29 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -1714,6 +1714,28 @@ Dired." (cons (list tag file) (cdr image-dired-tag-file-list)))) (setq image-dired-tag-file-list (list (list tag file)))))) +(defun image-dired-tag-thumbnail-remove () + "Remove tag from current or marked thumbnails." + (interactive nil image-dired-thumbnail-mode) + (let ((tag (completing-read "Tag to remove: " image-dired-tag-history + nil nil nil 'image-dired-tag-history))) + (image-dired--with-marked + (image-dired-remove-tag (image-dired-original-file-name) tag) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))))) + +(defun image-dired-tag-thumbnail () + "Tag current or marked thumbnails." + (interactive nil image-dired-thumbnail-mode) + (let ((tag (completing-read + "Tags to add (separate tags with a semicolon): " + image-dired-tag-history nil nil nil 'image-dired-tag-history))) + (image-dired--with-marked + (image-dired-write-tags + (list (cons (image-dired-original-file-name) tag))) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))))) + (defvar image-dired-slideshow-count 0 "Keeping track on number of images in slideshow.") (make-obsolete-variable 'image-dired-slideshow-count "no longer used." "29.1") |