GNU bug report logs - #51152
29.0.50; Fix deletion of marked thumbnails

Previous Next

Package: emacs;

Reported by: Peter Münster <pm <at> a16n.net>

Date: Tue, 12 Oct 2021 07:54:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51152 in the body.
You can then email your comments to 51152 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51152; Package emacs. (Tue, 12 Oct 2021 07:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Münster <pm <at> a16n.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 12 Oct 2021 07:54:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: 29.0.50; Fix deletion of marked thumbnails
Date: Tue, 12 Oct 2021 09:53:12 +0200
[Message part 1 (text/plain, inline)]
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,
-- 
           Peter
[0001-Fix-deletion-of-marked-thumbnails.patch (text/x-patch, inline)]
From be6d927abe3502748d32f08df8547f79bb0ba819 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Peter=20M=C3=BCnster?= <pm <at> a16n.net>
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.
---
 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
--- 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
-        (when (dired-goto-file file-name)
-          (image-dired-dired-file-marked-p))))))
+        (save-excursion
+          (when (dired-goto-file file-name)
+            (image-dired-dired-file-marked-p)))))))
 
 (defun image-dired-delete-marked ()
   "Delete current or marked thumbnails and associated images."
   (interactive)
-  (with-current-buffer (image-dired-associated-dired-buffer)
-    (dired-do-delete))
   (image-dired--with-marked
    (image-dired-delete-char)
    (backward-char))
-  (image-dired--line-up-with-method))
+  (image-dired--line-up-with-method)
+  (with-current-buffer (image-dired-associated-dired-buffer)
+    (dired-do-delete)))
 
 (defun image-dired-thumb-update-marks ()
   "Update the marks in the thumbnail buffer."
-- 
2.31.1

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51152; Package emacs. (Tue, 12 Oct 2021 12:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 51152 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Peter Münster <pm <at> a16n.net>
Cc: 51152 <at> debbugs.gnu.org
Subject: Re: bug#51152: 29.0.50; Fix deletion of marked thumbnails
Date: Tue, 12 Oct 2021 14:32:10 +0200
Peter Münster <pm <at> a16n.net> writes:

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

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 51152 <at> debbugs.gnu.org and Peter Münster <pm <at> a16n.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 12 Oct 2021 12:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51152; Package emacs. (Tue, 12 Oct 2021 14:53:02 GMT) Full text and rfc822 format available.

Message #13 received at 51152 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51152 <at> debbugs.gnu.org
Subject: Re: bug#51152: 29.0.50; Fix deletion of marked thumbnails
Date: Tue, 12 Oct 2021 16:51:59 +0200
[Message part 1 (text/plain, inline)]
On Tue, Oct 12 2021, Lars Ingebrigtsen wrote:

> Thanks; applied to Emacs 28.

Could you apply it to master too please?

Thanks,
-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51152; Package emacs. (Tue, 12 Oct 2021 15:17:02 GMT) Full text and rfc822 format available.

Message #16 received at 51152 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Peter Münster <pm <at> a16n.net>
Cc: 51152 <at> debbugs.gnu.org
Subject: Re: bug#51152: 29.0.50; Fix deletion of marked thumbnails
Date: Tue, 12 Oct 2021 17:16:22 +0200
Peter Münster <pm <at> a16n.net> writes:

>> Thanks; applied to Emacs 28.
>
> Could you apply it to master too please?

All changes to emacs-28 will get merged to master (usually after a
couple of days).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51152; Package emacs. (Tue, 12 Oct 2021 18:49:01 GMT) Full text and rfc822 format available.

Message #19 received at 51152 <at> debbugs.gnu.org (full text, mbox):

From: Peter Münster <pm <at> a16n.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51152 <at> debbugs.gnu.org
Subject: Re: bug#51152: 29.0.50; Fix deletion of marked thumbnails
Date: Tue, 12 Oct 2021 20:48:13 +0200
[Message part 1 (text/plain, inline)]
On Tue, Oct 12 2021, Lars Ingebrigtsen wrote:

> Peter Münster <pm <at> a16n.net> writes:
>
>>> Thanks; applied to Emacs 28.
>>
>> Could you apply it to master too please?
>
> All changes to emacs-28 will get merged to master (usually after a
> couple of days).

Ok, thanks. I use git://git.sv.gnu.org/emacs.git. Is this repository
updated? I don't find the commit in emacs-28...

-- 
           Peter
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Nov 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.