From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: E Sabof Newsgroups: gmane.emacs.bugs Subject: bug#14548: 24.3.1; [PATCH] image-dired-dired-toggle-marked-thumbs conflicts with other modes using overlays Date: Thu, 13 Jun 2013 15:39:49 +0100 Message-ID: References: <1qr4g8lb29.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bf1617633dfe904df0a1ad4 X-Trace: ger.gmane.org 1371134917 19121 80.91.229.3 (13 Jun 2013 14:48:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Jun 2013 14:48:37 +0000 (UTC) Cc: 14548@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 13 16:48:37 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Un8pJ-0000Q1-4K for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2013 16:48:37 +0200 Original-Received: from localhost ([::1]:40255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8pI-0005dI-Ol for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jun 2013 10:48:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8hA-0002C9-Uz for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:40:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Un8h3-0006Fo-VT for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:40:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Un8h3-0006EX-GH for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:40:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Un8h2-000802-BA for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2013 10:40:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: E Sabof Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jun 2013 14:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14548 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 14548-submit@debbugs.gnu.org id=B14548.137113439730710 (code B ref 14548); Thu, 13 Jun 2013 14:40:03 +0000 Original-Received: (at 14548) by debbugs.gnu.org; 13 Jun 2013 14:39:57 +0000 Original-Received: from localhost ([127.0.0.1]:41528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8gu-0007zD-O2 for submit@debbugs.gnu.org; Thu, 13 Jun 2013 10:39:57 -0400 Original-Received: from mail-qe0-f47.google.com ([209.85.128.47]:45068) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Un8gs-0007yX-Nk for 14548@debbugs.gnu.org; Thu, 13 Jun 2013 10:39:55 -0400 Original-Received: by mail-qe0-f47.google.com with SMTP id 1so6572695qec.34 for <14548@debbugs.gnu.org>; Thu, 13 Jun 2013 07:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FDR6mShHILp4XTkYslgxG32rGNN3I8rpXP/k1jlzNZQ=; b=QkpYvQIg14iCvTKaTtUP8yRbfA6HBs3STpWDAG/23z/dNTfZ11Ile308gTlkQCOghh L+il4Eu+Npvq3695VL4aThA/uy6o6RTqIVvYP6QONUfJiyHpG2PJz1wcVhasTnt3f5qi RXyYxQwgwGupLeMmnyBjNlsUJhl3ZIg6nkKIkQMHtL6cscr+VmBoq529MKxanQEcxzvN IFI2dUgPyuv7DV0gEY82eHjSwTtbUABIZB1txKAOuYU66lStrIcvzWnmgZg60msSpBVC A9AruG/6Pv4Uwo2ICnjHdwpsvGHOeXYqmHTgKtn9O2J1YbK/IIf0MuZDrjM9GKrdikmX fv4w== X-Received: by 10.224.79.209 with SMTP id q17mr3305918qak.88.1371134389115; Thu, 13 Jun 2013 07:39:49 -0700 (PDT) Original-Received: by 10.49.96.226 with HTTP; Thu, 13 Jun 2013 07:39:49 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75050 Archived-At: --047d7bf1617633dfe904df0a1ad4 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jun 13, 2013 at 3:18 PM, Stefan Monnier wrote: > >> ! (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) > > BTW, now that I actually look at the code, I twonder why it doesn't use > remove-overlays. > > > Stefan > It's a toggler. It will remove the overlay if present, or create one. And remove-overlays always returns nil. Evgeni --047d7bf1617633dfe904df0a1ad4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Jun 13, 2013 at 3:18 PM, Stefan Monnier <= monnier@iro.umontreal.ca> wrote:
>> ! =A0 =A0 =A0 =A0(let* ((cur-ov= s (overlays-in (point) (1+ (point))))
>> ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 (thumb-ov (car (cl-remove-if-not
>> ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (lam= bda (ov) (overlay-get ov 'thumb-file))
>> ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cur-= ovs))))
>> ! =A0 =A0 =A0 =A0 =A0(if thumb-ov
>> ! =A0 =A0 =A0 =A0 =A0 =A0 =A0(delete-overlay thumb-ov)

BTW, now that I actually look at the code, I twonder why it doesn'= ;t use
remove-overlays.


=A0 =A0 =A0 =A0 Stefan
=A0
It= 's a toggler. It will remove the overlay if present, or create one. And= remove-overlays always returns nil.
Evgeni
--047d7bf1617633dfe904df0a1ad4--