bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53599: 29.0.50; image-dired-mouse-toggle-mark very slow


From: Peter Münster
Subject: bug#53599: 29.0.50; image-dired-mouse-toggle-mark very slow
Date: Thu, 15 Sep 2022 19:57:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

On Mon, Jan 31 2022, Peter Münster wrote:

> This works, but I don't know if it's not too hackish:

And here for the latest master:

diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 75dcdd8cbc..0218cd4038 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -1269,15 +1269,18 @@ image-dired-mouse-toggle-mark
 Track this in associated Dired buffer if
 `image-dired-track-movement' is non-nil."
   (interactive "e")
-  (if (use-region-p)
-      (let ((end (region-end)))
-        (save-excursion
-          (goto-char (region-beginning))
-          (while (<= (point) end)
-            (when (image-dired-image-at-point-p)
-              (image-dired-mouse-toggle-mark-1))
-            (forward-char))))
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (image-dired-mouse-toggle-mark-1))
+  (let ((idtum-orig (symbol-function 'image-dired-thumb-update-marks)))
+    (defun image-dired-thumb-update-marks ())
+    (if (use-region-p)
+        (let ((end (region-end)))
+          (save-excursion
+            (goto-char (region-beginning))
+            (while (<= (point) end)
+              (when (image-dired-image-at-point-p)
+                (image-dired-mouse-toggle-mark-1))
+              (forward-char))))
+      (mouse-set-point event)
+      (goto-char (posn-point (event-end event)))
+      (image-dired-mouse-toggle-mark-1))
+    (fset 'image-dired-thumb-update-marks idtum-orig))
   (image-dired-thumb-update-marks))

What do you think?

-- 
           Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]