unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Peter Münster" <pm@a16n.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 50920@debbugs.gnu.org
Subject: bug#50920: 28.0.50; patch for image-dired.el (master or emacs-28?)
Date: Fri, 01 Oct 2021 08:29:52 +0200	[thread overview]
Message-ID: <87lf3dz28v.fsf@a16n.net> (raw)
In-Reply-To: <87tui16d4c.fsf@a16n.net>


[-- Attachment #1.1: Type: text/plain, Size: 141 bytes --]

On Fri, Oct 01 2021, Eli Zaretskii wrote:

> Please prepare a patch for master.

Please find it here attached.

-- 
           Peter

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-New-command-for-unmarking-all-images.patch --]
[-- Type: text/x-patch, Size: 2146 bytes --]

From 45a823990bc8e1917b4cfa107b9e8697a094b067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Peter=20M=C3=BCnster?= <pm@a16n.net>
Date: Fri, 1 Oct 2021 08:28:53 +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            | 7 +++++++
 lisp/image-dired.el | 9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index d0e41baaeb..9e9c90c7e5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -36,6 +36,13 @@ applies, and please also update docstrings as needed.
 \f
 * Changes in Specialized Modes and Packages in Emacs 29.1
 
+** image-dired
+
+---
+*** New command for the thumbnail buffer.
+The new command 'image-dired-unmark-all-marks' has been added with a
+binding in the menu.
+
 \f
 * New Modes and Packages in Emacs 29.1
 
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index 3ca47300a9..ec3f988bfb 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

  reply	other threads:[~2021-10-01  6:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 20:07 bug#50920: 28.0.50; patch for image-dired.el (master or emacs-28?) Peter Münster
2021-10-01  5:42 ` Eli Zaretskii
2021-10-01  6:29   ` Peter Münster [this message]
2021-10-01 12:49     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf3dz28v.fsf@a16n.net \
    --to=pm@a16n.net \
    --cc=50920@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).