bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50920: 28.0.50; patch for image-dired.el (master or emacs-28?)


From: Peter Münster
Subject: bug#50920: 28.0.50; patch for image-dired.el (master or emacs-28?)
Date: Thu, 30 Sep 2021 22:07:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi,

I've created the attached patch already 2 weeks ago, unfortunately it
doesn't apply any more to the master branch. Could you please integrate
it into the emacs-28 branch? Or do you prefer, that I create a new patch
for master?

Kind regards,
-- 
           Peter
From b613bb7ae39cfaf0a0078ae731d550f98d8d08cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Peter=20M=C3=BCnster?= <pm@a16n.net>
Date: Thu, 16 Sep 2021 08:49:43 +0200
Subject: [PATCH] New command for unmarking all images

* lisp/image-dired.el (image-dired-unmark-all-marks): Remove marks from
Dired buffer and update the view of the thumbnails.
---
 etc/NEWS            | 5 ++++-
 lisp/image-dired.el | 9 +++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index f22801cfbe..85d332306b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2523,7 +2523,10 @@ If non-nil (the default), use 'image-dired-thumb-mark' 
to say what
 images are marked.
 
 ---
-*** New command 'image-dired-delete-marked'.
+*** New commands for the thumbnail buffer.
+The new commands 'image-dired-delete-marked' and
+'image-dired-unmark-all-marks' have been added with bindings in the
+menu.
 
 ** Flymake mode
 
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index b92a9371ec..0b4263ca17 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -1433,6 +1433,14 @@ image-dired-toggle-mark-thumb-original-file
   (interactive)
   (image-dired-modify-mark-on-thumb-original-file 'toggle))
 
+(defun image-dired-unmark-all-marks ()
+  "Remove all marks from all files.
+Do this in the Dired buffer and update this thumbnail buffer."
+  (interactive)
+  (with-current-buffer (image-dired-associated-dired-buffer)
+    (dired-unmark-all-marks))
+  (image-dired-thumb-update-marks))
+
 (defun image-dired-jump-original-dired-buffer ()
   "Jump to the dired buffer associated with the current image file.
 You probably want to use this together with
@@ -1536,6 +1544,7 @@ image-dired-thumbnail-mode-map
         ["Quit" quit-window]
         ["Delete thumbnail from buffer" image-dired-delete-char]
         ["Delete marked images" image-dired-delete-marked]
+        ["Unmark all marks" image-dired-unmark-all-marks]
         ["Remove tag from current or marked thumbnails"
          image-dired-tag-thumbnail-remove]
         ["Tag current or marked thumbnails" image-dired-tag-thumbnail]
-- 
2.31.1

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]