unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 65052@debbugs.gnu.org
Subject: bug#65052: 30.0.50; [PATCH] Scroll-{up, down} does not update tracking info in image-dired
Date: Sat, 05 Aug 2023 19:39:45 +0200	[thread overview]
Message-ID: <87il9tbd7i.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <834jldse3d.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Aug 2023 18:28:38 +0300")

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

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: 65052@debbugs.gnu.org
>> Date: Sat, 05 Aug 2023 15:27:14 +0200
>> 
>> >> Maybe I should do that into another bug report?
>> >
>> > It's up to you.
>> 
>> Ok then I'd prefer having this macros cleanage into another bug report.
>> Do you think you could apply the last one to master and close this bug
>> report?  I'll start from here.  Thanks.
>
> Which is "the last one" that you want me to install?

Sorry.  This is the one attached with this mail.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Scroll-up-and-down-in-image-dired.patch --]
[-- Type: text/x-patch, Size: 1895 bytes --]

From 4983e589f1e841c6a49a93d166970a18d4359a88 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Thu, 9 Mar 2023 14:35:31 +0100
Subject: [PATCH] Scroll up and down in image-dired

* lisp/image/image-dired.el (image-dired-scroll):
Function to manage scroll in image-dired.
(image-dired-scroll-up, image-dired-scroll-down): Scroll up and down
command in image-dired.
(image-dired-thumbnail-mode-map): Use them.
---
 lisp/image/image-dired.el | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 33beb5b3e49..4e213587e7a 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -770,6 +770,24 @@ image-dired-move-end-of-line
   (interactive nil image-dired-thumbnail-mode)
   (image-dired--movement-command (pos-eol) 'reverse))
 
+(defun image-dired-scroll (&optional down)
+  "Scroll in the thumbnail buffer."
+  (let ((goal-column (current-column)))
+    (if down (scroll-down) (scroll-up))
+    (move-to-column goal-column)
+    (image-dired--movement-ensure-point-pos down)
+    (when image-dired-track-movement
+      (image-dired-track-original-file))
+    (image-dired--update-header-line)))
+
+(defun image-dired-scroll-up ()
+  (interactive nil image-dired-thumbnail-mode)
+  (image-dired-scroll))
+
+(defun image-dired-scroll-down ()
+  (interactive nil image-dired-thumbnail-mode)
+  (image-dired-scroll 'down))
+
 \f
 ;;; Header line
 
@@ -980,6 +998,8 @@ image-dired-thumbnail-mode-map
   "<remap> <end-of-buffer>"          #'image-dired-end-of-buffer
   "<remap> <move-beginning-of-line>" #'image-dired-move-beginning-of-line
   "<remap> <move-end-of-line>"       #'image-dired-move-end-of-line
+  "<remap> <scroll-up-command>"      #'image-dired-scroll-up
+  "<remap> <scroll-down-command>"    #'image-dired-scroll-down
 
   :menu
   '("Image-Dired"
-- 
2.40.0


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

-- 
Manuel Giraud

  reply	other threads:[~2023-08-05 17:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 14:55 bug#65052: 30.0.50; [PATCH] Scroll-{up, down} does not update tracking info in image-dired Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-04 15:24 ` Eli Zaretskii
2023-08-04 18:25   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-04 19:07     ` Eli Zaretskii
2023-08-04 20:58       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05  5:43         ` Eli Zaretskii
2023-08-05  8:32           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05  9:27             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05 10:02               ` Eli Zaretskii
2023-08-05 12:58                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05 13:12                   ` Eli Zaretskii
2023-08-05 13:27                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05 15:28                       ` Eli Zaretskii
2023-08-05 17:39                         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-08-10  9:11                           ` Eli Zaretskii
2023-08-12  8:56                             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12  8:59                               ` Eli Zaretskii
2023-08-05  9:29             ` Eli Zaretskii

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=87il9tbd7i.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65052@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    /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).