]> git.eshelyaron.com Git - emacs.git/commitdiff
image-dired: Improve marking behavior
authorStefan Kangas <stefan@marxist.se>
Wed, 3 Nov 2021 06:14:21 +0000 (07:14 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 3 Nov 2021 07:02:56 +0000 (08:02 +0100)
* lisp/image-dired.el (image-dired-thumb-mark): Use DarkOrange as
background to better match the 'dired-marked' face.
(image-dired-show-all-from-dir): Disable all marks when entering a
full directory.
(image-dired-unmark-all-marks): Add mode tag.
(image-dired-thumbnail-mode-map): Bind 'image-dired-unmark-all-marks'
to "U".

etc/NEWS
lisp/image-dired.el

index 211d943a1492105f9d255158612a8a0d40e6d5d2..11ff0ef7a833fe786b13b56bc28d9abca97deb4f 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -244,8 +244,8 @@ external "exiftool" command to be available.  The user options
 
 ---
 *** New command for the thumbnail buffer.
-The new command 'image-dired-unmark-all-marks' has been added with a
-binding in the menu.
+The new command 'image-dired-unmark-all-marks' has been added.  It is
+bound to "U" in the thumbnail buffer.
 
 ---
 *** Support Thumbnail Managing Standard v0.9.0 (Dec 2020).
index 1e1c8f6c4c986136596cf69b0a437c1d72ea4db8..f5792096e1901d6c2135140f2620b8a6d4719300 100644 (file)
@@ -465,10 +465,10 @@ images."
   :version "28.1")
 
 (defface image-dired-thumb-mark
-  '((t (:background "orange")))
+  '((t (:background "DarkOrange")))
   "Background-color for marked images in thumbnail buffer."
   :group 'image-dired
-  :version "28.1")
+  :version "29.1")
 
 (defcustom image-dired-line-up-method 'dynamic
   "Default method for line-up of thumbnails in thumbnail buffer.
@@ -1129,7 +1129,8 @@ never ask for confirmation."
                       "Directory contains more than %d image files.  Proceed?"
                       image-dired-show-all-from-dir-max-files))))
            (image-dired-display-thumbs)
-           (pop-to-buffer image-dired-thumbnail-buffer))
+           (pop-to-buffer image-dired-thumbnail-buffer)
+           (image-dired-unmark-all-marks))
           (t (message "Image-Dired canceled")))))
 
 ;;;###autoload
@@ -1539,9 +1540,9 @@ Should be called from commands in `image-dired-thumbnail-mode'."
       (dired-mark 1))))
 
 (defun image-dired-unmark-all-marks ()
-  "Remove all marks from all files.
-Do this in the Dired buffer and update this thumbnail buffer."
-  (interactive)
+  "Remove all marks from all files in associated Dired buffer.
+Also update the marks in the thumbnail buffer."
+  (interactive nil image-dired-thumbnail-mode)
   (with-current-buffer (image-dired-associated-dired-buffer)
     (dired-unmark-all-marks))
   (image-dired-thumb-update-marks))
@@ -1614,6 +1615,7 @@ You probably want to use this together with
     (define-key map [delete] 'image-dired-flag-thumb-original-file)
     (define-key map "m" 'image-dired-mark-thumb-original-file)
     (define-key map "u" 'image-dired-unmark-thumb-original-file)
+    (define-key map "U" 'image-dired-unmark-all-marks)
     (define-key map "." 'image-dired-track-original-file)
     (define-key map [tab] 'image-dired-jump-original-dired-buffer)