From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13648: 24.3.50; remove-overlays bugs Date: Thu, 07 Feb 2013 11:42:46 -0500 Message-ID: References: <8738x8b1pa.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360255427 5750 80.91.229.3 (7 Feb 2013 16:43:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2013 16:43:47 +0000 (UTC) Cc: 13648@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 17:44:08 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 1U3UZx-0001sE-76 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 17:44:05 +0100 Original-Received: from localhost ([::1]:35471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UZe-00063G-2G for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 11:43:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UZZ-00061q-Tq for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:43:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3UZY-0000Cv-8J for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:43:41 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UZY-0000Cq-4s for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:43:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U3Uas-0002yW-9v for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Feb 2013 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13648-submit@debbugs.gnu.org id=B13648.136025545311374 (code B ref 13648); Thu, 07 Feb 2013 16:45:02 +0000 Original-Received: (at 13648) by debbugs.gnu.org; 7 Feb 2013 16:44:13 +0000 Original-Received: from localhost ([127.0.0.1]:42235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3Ua4-0002xN-8a for submit@debbugs.gnu.org; Thu, 07 Feb 2013 11:44:13 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58126) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3Ua2-0002xG-15 for 13648@debbugs.gnu.org; Thu, 07 Feb 2013 11:44:11 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r17GglL0008932; Thu, 7 Feb 2013 11:42:47 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id DD941B4030; Thu, 7 Feb 2013 11:42:46 -0500 (EST) In-Reply-To: <8738x8b1pa.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Thu, 07 Feb 2013 16:09:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4485=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4485> : streams <902226> : uri <1339299> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:70818 Archived-At: > The reason for the first problem is that remove-overlays tests the > overlay value with eq, which fails for all strings [...] No, it won't fail on all strings. You just need to pass it the same string you added to the overlay, rather than a copy of it. I.e. this is not a bug. > invocation of remove-overlays is legitimate), the logic of the code is > that the NAME and VAL arguments are either both nil or both non-nil, Indeed. > which conflicts with the semantics of the &optional keyword. Right. We should document it in the docstring. > This means that the last call of remove-overlays in the above sexp > would clear any after-string overlays, regardless of their value. Normally we don't distinguish "an property FOO of value nil" and "no property FOO". So I think what would make sense is to say that if VAL is nil, then we remove any overlay whose NAME property is non-nil (i.e. the exact inverse from what we currently do). This said, the reason why I have not implemented this case of NAME being specified while VAL is left unspecified is because I haven't come up with a need for it. So I'd be interested to hear the backstory of why/where you need it. Stefan