Subject: Re: bug#65052: 30.0.50; [PATCH] Scroll-{up, down} does not update tracking info in image-dired

From: Eli Zaretskii <[email-masked]>
Date: Sat, 05 Aug 2023 08:43:35 +0300

> From: Manuel Giraud <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 04 Aug 2023 22:58:25 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> [...]
> 
> > OK, but then this part:
> >
> >> +  ;; "one line" dance to update tracking and header
> >> +  (image-dired-next-line)
> >> +  (image-dired-previous-line))
> >
> > looks like a kludge.  Can't we have a cleaner code for updating the
> > header data?  If image-dired-previous/next-line can update the data,
> > why cannot the scroll commands do the same without calling the
> > line-movement commands?
> 
> You're right.  Here is a cleaner version inspired by
> `image-dired--movement-command-line'.

Hmm... okay, but I wonder why not call image-dired-track-original-file
and image-dired--update-header-line directly from each of these new
commands, after scroll-up/down, instead of implementing this as a
macro (which calls another macro).  That would have been much simpler
and easier to follow.  Or is there something I'm missing here?

Thanks.