From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Peter =?UTF-8?Q?M=C3=BCnster?= Newsgroups: gmane.emacs.bugs Subject: bug#51152: 29.0.50; Fix deletion of marked thumbnails Date: Tue, 12 Oct 2021 09:53:12 +0200 Message-ID: <87tuhm1xxz.fsf@a16n.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: 51152@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 09:59:47 2021 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 1maChP-00013Q-HP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 09:59:47 +0200 Original-Received: from localhost ([::1]:34620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maChN-0006Bh-Fc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 03:59:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maCbq-0006fi-HH for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maCbp-0005b1-Uj for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maCbp-0004IE-Tv for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Peter =?UTF-8?Q?M=C3=BCnster?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 07:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51152 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bugs Original-Received: via spool by submit@debbugs.gnu.org id=B.163402520416452 (code B ref -1); Tue, 12 Oct 2021 07:54:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2021 07:53:24 +0000 Original-Received: from localhost ([127.0.0.1]:33366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maCbE-0004HH-D6 for submit@debbugs.gnu.org; Tue, 12 Oct 2021 03:53:24 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maCbC-0004H9-9O for submit@debbugs.gnu.org; Tue, 12 Oct 2021 03:53:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maCbB-00063Y-U6 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:53:21 -0400 Original-Received: from server.a16n.net ([178.33.238.77]:38230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maCb8-00053F-65 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 03:53:21 -0400 Original-Received: from ws.localdomain (arennes-657-1-259-169.w2-14.abo.wanadoo.fr [2.14.213.169]) by server.a16n.net (Postfix) with ESMTPSA id 9947F43E0562 for ; Tue, 12 Oct 2021 09:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n; t=1634025193; bh=3yqBroQcrZjltsj7PvP4J83XrfntxSLRyEnbtTiik7Q=; h=From:To:Subject:Date; b=htJuHotb8b6iN7cbTIBqVMkHNtO9LAEUHX9+pGVGHWReG1Dj4vBybJaDA6/u+Gwe5 NwrXotYPblxp3DS9xwkXbpPJwRwj6k3sVcnmJb/9ohDJ62c58GsLPNaXfGi60Cb8U+ MC4xPntepVOiNLVE0CVaEVMHYOFm7Ccw+b5AFB+3jn6/Q8ty1ALCB54+hI/GZ5UHvj PTDyJ3ERs71548DTLRBCem5Vhnrg2PIyWpa5/G7keEuQZI2jVvqq6ByOiV9ouJ0lAw jP+MfKnq28oGkVseLvM4lKil93rZEGTGncCilv2bjlhfyiWpulmZARpxkLRU2lJmHY xbSnqjPReD7Yw== Original-Received: by ws.localdomain (Postfix, from userid 1000) id E9C3F20522; Tue, 12 Oct 2021 09:53:12 +0200 (CEST) Received-SPF: pass client-ip=178.33.238.77; envelope-from=pm@a16n.net; helo=server.a16n.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:216993 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello, Since there is no movement tracking involved, the original commit bf64342a8ffd8777df10051037ca13ec4f6857a5 was not needed. In contrast, it introduced another problem: after deletion of the original files, image-dired--with-marked doesn't see the marks any more. Please find attached a new patch. Kind regards, =2D-=20 Peter --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-deletion-of-marked-thumbnails.patch Content-Transfer-Encoding: quoted-printable From=20be6d927abe3502748d32f08df8547f79bb0ba819 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Peter=3D20M=3DC3=3DBCnster?=3D Date: Tue, 12 Oct 2021 09:50:16 +0200 Subject: [PATCH] Fix deletion of marked thumbnails * lisp/image-dired.el (image-dired-thumb-file-marked-p): Don't move point in associated dired buffer. (image-dired-delete-marked): Revert "Fix deletion of associated image" because it was wrong and introduced another problem, see bug#xxx. =2D-- lisp/image-dired.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index ec3f988bfb..921215c603 100644 =2D-- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -2323,18 +2323,19 @@ image-dired-thumb-file-marked-p (dired-buf (image-dired-associated-dired-buffer))) (when (and dired-buf file-name) (with-current-buffer dired-buf =2D (when (dired-goto-file file-name) =2D (image-dired-dired-file-marked-p)))))) + (save-excursion + (when (dired-goto-file file-name) + (image-dired-dired-file-marked-p))))))) =20 (defun image-dired-delete-marked () "Delete current or marked thumbnails and associated images." (interactive) =2D (with-current-buffer (image-dired-associated-dired-buffer) =2D (dired-do-delete)) (image-dired--with-marked (image-dired-delete-char) (backward-char)) =2D (image-dired--line-up-with-method)) + (image-dired--line-up-with-method) + (with-current-buffer (image-dired-associated-dired-buffer) + (dired-do-delete))) =20 (defun image-dired-thumb-update-marks () "Update the marks in the thumbnail buffer." =2D-=20 2.31.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYWU+6AwccG1AYTE2bi5u ZXQACgkQOo4rb0Oxy2hzJwCgx7qT7grX2D7te84Ad8T1FpOSIi0AnRz2AxLq6tcL UCcFyiEbb5uMOsqk =EcmK -----END PGP SIGNATURE----- --==-=-=--