unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57651: [PATCH] image-dired tweaks
@ 2022-09-07 17:24 Morgan Smith
  2022-09-08  0:30 ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Morgan Smith @ 2022-09-07 17:24 UTC (permalink / raw)
  To: 57651

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

Hello!

Explanation in the commit message.  Rotation still works that same if
nothing is marked.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-image-dired-tweaks.patch --]
[-- Type: text/x-patch, Size: 2054 bytes --]

From dd4b02bafd9590c4f5747aa2e3d16deceea07807 Mon Sep 17 00:00:00 2001
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Wed, 7 Sep 2022 13:17:12 -0400
Subject: [PATCH] image-dired tweaks

lisp/image/image-dired:
(image-dired--do-mark-command): Make movement behavior consistent
regardless of the value of `image-dired-marking-shows-next'

(image-dired-rotate-original-left, image-dired-rotate-original-right):
Rotate marked files if any
---
 lisp/image/image-dired.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 88f4ceaffb..e799f2e748 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -767,7 +767,7 @@ according to `image-dired-marking-shows-next'."
      ,(when maybe-next
         '(if image-dired-marking-shows-next
              (image-dired-display-next-thumbnail-original)
-           (image-dired-next-line)))))
+           (image-dired-forward-image)))))
 
 (defun image-dired-mark-thumb-original-file ()
   "Mark original image file in associated Dired buffer."
@@ -1126,7 +1126,8 @@ and a confirmation is needed before the original image files is
 overwritten.  This confirmation can be turned off using
 `image-dired-rotate-original-ask-before-overwrite'."
   (interactive nil image-dired-thumbnail-mode)
-  (image-dired-rotate-original "270"))
+  (image-dired--with-marked
+   (image-dired-rotate-original "270")))
 
 (defun image-dired-rotate-original-right ()
   "Rotate original image right (clockwise) 90 degrees.
@@ -1135,7 +1136,8 @@ and a confirmation is needed before the original image files is
 overwritten.  This confirmation can be turned off using
 `image-dired-rotate-original-ask-before-overwrite'."
   (interactive nil image-dired-thumbnail-mode)
-  (image-dired-rotate-original "90"))
+  (image-dired--with-marked
+   (image-dired-rotate-original "90")))
 
 (defun image-dired-display-next-thumbnail-original (&optional arg)
   "Move to the next image in the thumbnail buffer and display it.
-- 
2.37.2


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


Thanks,

Morgan

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-08  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 17:24 bug#57651: [PATCH] image-dired tweaks Morgan Smith
2022-09-08  0:30 ` Stefan Kangas

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).