From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: <87il9tbd7i.fsf@ledu-giraud.fr> References: <87ttteq2ku.fsf@ledu-giraud.fr> <83il9uvnj3.fsf@gnu.org> <87pm42psv9.fsf@ledu-giraud.fr> <834jlevd7o.fsf@gnu.org> <87r0oied8u.fsf@ledu-giraud.fr> <83y1iqt56g.fsf@gnu.org> <87msz5evo8.fsf@ledu-giraud.fr> <87zg35c00j.fsf@ledu-giraud.fr> <83y1ipst6a.fsf@gnu.org> <87v8dtbq8n.fsf@ledu-giraud.fr> <83bkflskei.fsf@gnu.org> <87r0ohbowd.fsf@ledu-giraud.fr> <834jldse3d.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19578"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65052@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 05 19:40:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qSLGF-0004sV-J6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 19:40:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSLG3-0001ZW-0i; Sat, 05 Aug 2023 13:40:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSLG0-0001Z5-9n for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 13:40:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSLFy-0000ML-Df for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 13:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSLFy-0007lb-Av for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2023 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65052 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65052-submit@debbugs.gnu.org id=B65052.169125719329829 (code B ref 65052); Sat, 05 Aug 2023 17:40:02 +0000 Original-Received: (at 65052) by debbugs.gnu.org; 5 Aug 2023 17:39:53 +0000 Original-Received: from localhost ([127.0.0.1]:58083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSLFo-0007l3-OH for submit@debbugs.gnu.org; Sat, 05 Aug 2023 13:39:53 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:46908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSLFl-0007kr-Bc for 65052@debbugs.gnu.org; Sat, 05 Aug 2023 13:39:51 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=/m5ndLF4 B8FIwFm/EC1Ki4KO+CRddPLVe3dBtRf6iJQ=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=VnqFa6F3cpoYmuBnUtcSgbe485vo6o by6Kw4/9cIlPLjeKwjpluI18hLh2GqRclpswGG35KMd376OOethOqVCw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=/m5ndLF4B8FIwFm/ EC1Ki4KO+CRddPLVe3dBtRf6iJQ=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=je4otLPGWKca94AvtNsq7Rlw8iM7s2RZiqQ/WB utH8YOfVs9jXioen/wqiusTZ4pXdxkOI/FwDjPk7q36YEG5px9StMsJts0jLeTPYOmj160 rfpHUMx6iyfssUoLNLYoKl46Ln+cayHQJ1JeUp7BnlSieoWZzq7Z6oOPTaal+k9IRUmOb5 IrQH9TOO0qSChTKguKO6LopADzttm5o7LmnQ9QWsWyUezN7FdPsxAxs0SXw7ry18W3hFa1 6ZvyqCQifFiFel/+GW6SNAQm0NOu0HX9qX2yTIxPR6ZkMHSHo6Zg8V1LLIRXc0CeW/GNv5 0u4dpoTTJ38DjFb+B6X+c2/Q== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id f6af8656 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 5 Aug 2023 19:39:46 +0200 (CEST) In-Reply-To: <834jldse3d.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 Aug 2023 18:28:38 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266808 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Manuel Giraud >> 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Scroll-up-and-down-in-image-dired.patch >From 4983e589f1e841c6a49a93d166970a18d4359a88 Mon Sep 17 00:00:00 2001 From: Manuel Giraud 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)) + ;;; Header line @@ -980,6 +998,8 @@ image-dired-thumbnail-mode-map " " #'image-dired-end-of-buffer " " #'image-dired-move-beginning-of-line " " #'image-dired-move-end-of-line + " " #'image-dired-scroll-up + " " #'image-dired-scroll-down :menu '("Image-Dired" -- 2.40.0 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=--