From: Glenn Morris <rgm@gnu.org>
To: E Sabof <esabof@gmail.com>
Cc: 14548@debbugs.gnu.org
Subject: bug#14548: 24.3.1; [PATCH] image-dired-dired-toggle-marked-thumbs conflicts with other modes using overlays
Date: Tue, 11 Jun 2013 15:08:46 -0400 [thread overview]
Message-ID: <1qr4g8lb29.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CAEp6DyYwVpruJf9d9AW2tQEDzVXs3CAn652CwyViJnL9DRPybg@mail.gmail.com> (E. Sabof's message of "Mon, 3 Jun 2013 14:28:28 +0100")
E Sabof wrote:
> One such mode is stripe-buffer, which can be fonud here:
>
> https://github.com/sabof/stripe-buffer
>
> the definition below fixes the problem.
Things are much, much more likely to be applied if they come as diffs
with an explanation of what the change is going, rather than "here's a
new version of the function with no explanation".
IIUC, the issue is that image-dired-dired-toggle-marked-thumbs can
remove overlays from other packages, and you suggest a fix like the
following?
The idea seems fine, but as written it won't work without requiring
cl-lib at run-time.
*** lisp/image-dired.el 2013-02-17 00:45:53 +0000
--- lisp/image-dired.el 2013-06-11 19:00:18 +0000
***************
*** 657,665 ****
(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)))
--- 657,668 ----
(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-ovs (overlays-in (point) (1+ (point))))
! (thumb-ov (car (cl-remove-if-not
! (lambda (ov) (overlay-get ov 'thumb-file))
! cur-ovs))))
! (if thumb-ov
! (delete-overlay thumb-ov)
(put-image thumb-file image-pos)
(setq overlay
(cl-loop for o in (overlays-in (point) (1+ (point)))
next prev parent reply other threads:[~2013-06-11 19:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 13:28 bug#14548: 24.3.1; [PATCH] image-dired-dired-toggle-marked-thumbs conflicts with other modes using overlays E Sabof
2013-06-11 19:08 ` Glenn Morris [this message]
2013-06-11 21:56 ` Stefan Monnier
2013-06-11 22:12 ` Glenn Morris
2013-06-11 23:00 ` E Sabof
2013-06-12 12:01 ` E Sabof
2013-06-12 19:25 ` Stefan Monnier
2013-06-13 5:11 ` Glenn Morris
2013-06-13 14:18 ` Stefan Monnier
2013-06-13 14:39 ` E Sabof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1qr4g8lb29.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=14548@debbugs.gnu.org \
--cc=esabof@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).