From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13648: 24.3.50; remove-overlays bugs Date: Tue, 25 Aug 2020 09:55:43 -0400 Message-ID: References: <8738x8b1pa.fsf@rosalinde.fritz.box> <87sgcb9cg8.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1147"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stephen Berman , 13648@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 15:56:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAZQn-00007l-U0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 15:56:09 +0200 Original-Received: from localhost ([::1]:53586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAZQm-0001dM-VN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 09:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAZQf-0001bU-TX for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:56:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAZQf-0000NX-KM for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAZQf-0002ov-Jp for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 09:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13648 X-GNU-PR-Package: emacs Original-Received: via spool by 13648-submit@debbugs.gnu.org id=B13648.159836375410833 (code B ref 13648); Tue, 25 Aug 2020 13:56:01 +0000 Original-Received: (at 13648) by debbugs.gnu.org; 25 Aug 2020 13:55:54 +0000 Original-Received: from localhost ([127.0.0.1]:35491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZQY-0002of-Bj for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:55:54 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39131) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZQW-0002oV-9D for 13648@debbugs.gnu.org; Tue, 25 Aug 2020 09:55:52 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 828A41002C8; Tue, 25 Aug 2020 09:55:46 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AAD84100059; Tue, 25 Aug 2020 09:55:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598363744; bh=5qAFF7jk8h5O7+tIomGdTUbj6ikyp+ScDc1EWQNHHAQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ee8gXNBVKGyfuMJDHnIj1UkeTA1tkxTtkxRr4uKLVxY93I4lwR2eW6h2XMcdT9DY1 9a9avxKhx6P4q30FKeMpFP6c4yVyUfA5OkcT5oAWhk7dbSXz24ZEb2NiRQQX/vzqR1 cq2w4EjfsB0RQwv1RcFmJ5TSAcZpKh6M7r7tQbjsmRp+hREi0XbJGVW5HowPAE4XAN tVYyxoHmnPUBRbSh54t+Sqf9IOgjrGHM9gGTHqzTKfncoTFXIhNhEkYhPDTrAuKrkD G9fB3CyU2bShxocf+IH+8NRgj1Dh0X3IWAR2zeXgBrTDOMeZ/XOKtWhXz1WfoVp1mo qlacEbCoFvGWA== Original-Received: from alfajor (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7DF3F1202C2; Tue, 25 Aug 2020 09:55:44 -0400 (EDT) In-Reply-To: <87sgcb9cg8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Aug 2020 13:44:55 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186291 Archived-At: >> 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. > The case here is (remove-overlay beg end 'foo), which will remove all > overlays that don't have foo (as well as the ones that have foo, but > it's set to nil)? I think the case you describe is indeed never useful, but it *is* implemented, AFAIK. The more useful interpretation I think would be for (remove-overlay beg end 'foo) to remove all overlays that have a non-nil value of `foo`. But I haven't implemented it because (despite my impression that it would be more useful) I haven't actually found any need for it. > diff --git a/lisp/subr.el b/lisp/subr.el > index a58a873a33..bd50c52552 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -3073,7 +3073,10 @@ copy-overlay > (defun remove-overlays (&optional beg end name val) > "Clear BEG and END of overlays whose property NAME has value VAL. As Eli points out, I wasn't very inspired when I wrote this first line. We should at very least replace "BEG and END" with "BEG...END" or something like that. > +BEG and END default respectively to the beginning and end of buffer. > +Values are compared with `eq'. > +If either NAME or VAL are specified, both should be specified." LGTM, Stefan