GNU bug report logs -
#14548
24.3.1; [PATCH] image-dired-dired-toggle-marked-thumbs conflicts with other modes using overlays
Previous Next
Reported by: E Sabof <esabof <at> gmail.com>
Date: Mon, 3 Jun 2013 13:31:01 UTC
Severity: normal
Tags: patch
Found in version 24.3.1
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Bellow is the patch for the trunk version, without cl-remove-if-not
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index bbb41d4..2e169ed 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -657,16 +657,24 @@ previous -ARG, if ARG<0) files."
(string-match-p (image-file-name-regexp) image-file))
(setq thumb-file (image-dired-get-thumbnail-image image-file))
;; If image is not already added, then add it.
- (let ((cur-ov (overlays-in (point) (1+ (point)))))
- (if cur-ov
- (delete-overlay (car cur-ov))
- (put-image thumb-file image-pos)
- (setq overlay
- (cl-loop for o in (overlays-in (point) (1+ (point)))
- when (overlay-get o 'put-image) collect o into ov
- finally return (car ov)))
- (overlay-put overlay 'image-file image-file)
- (overlay-put overlay 'thumb-file thumb-file)))))
+ (let (( cur-ovs (overlays-in (point) (1+ (point))))
+ thumb-ov)
+ (while (and cur-ovs
+ (if (overlay-get (car cur-ovs) 'thumb-file)
+ (progn
+ (setq thumb-ov (car cur-ovs))
+ nil)
+ (pop cur-ovs))))
+ (if thumb-ov
+ (delete-overlay thumb-ov)
+ (progn
+ (put-image thumb-file image-pos)
+ (setq overlay
+ (cl-loop for o in (overlays-in (point) (1+ (point)))
+ when (overlay-get o 'put-image) collect o
into ov
+ finally return (car ov)))
+ (overlay-put overlay 'image-file image-file)
+ (overlay-put overlay 'thumb-file thumb-file))))))
arg ; Show or hide image on ARG next files.
'show-progress) ; Update dired display after each image is updated.
(add-hook 'dired-after-readin-hook
[Message part 2 (text/html, inline)]
This bug report was last modified 11 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.