all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan Smith <Morgan.J.Smith@outlook.com>
To: 57651@debbugs.gnu.org
Subject: bug#57651: [PATCH] image-dired tweaks
Date: Wed, 07 Sep 2022 13:24:50 -0400	[thread overview]
Message-ID: <DM5PR03MB316399D0F7503D0F8A2DF9CAC5419@DM5PR03MB3163.namprd03.prod.outlook.com> (raw)

[-- 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

             reply	other threads:[~2022-09-07 17:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 17:24 Morgan Smith [this message]
2022-09-08  0:30 ` bug#57651: [PATCH] image-dired tweaks Stefan Kangas

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

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

  git send-email \
    --in-reply-to=DM5PR03MB316399D0F7503D0F8A2DF9CAC5419@DM5PR03MB3163.namprd03.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=57651@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.