From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to remove a property from an overlay? Date: Fri, 30 Jul 2021 22:47:32 +0300 Message-ID: <831r7fr3cb.fsf@gnu.org> References: <87pmuzd56g.fsf@mbork.pl> <837dh7r62a.fsf@gnu.org> <87o8ajd3ad.fsf@mbork.pl> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3155"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 30 21:48:34 2021 Return-path: Envelope-to: geh-help-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 1m9YUj-0000bW-MQ for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 21:48:33 +0200 Original-Received: from localhost ([::1]:52748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9YUg-0008LR-AU for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 15:48:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9YU2-0008Kk-98 for help-gnu-emacs@gnu.org; Fri, 30 Jul 2021 15:47:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53352) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9YU2-00050M-1j for help-gnu-emacs@gnu.org; Fri, 30 Jul 2021 15:47:50 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1844 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9YU1-0005C3-Jv for help-gnu-emacs@gnu.org; Fri, 30 Jul 2021 15:47:49 -0400 In-Reply-To: <87o8ajd3ad.fsf@mbork.pl> (message from Marcin Borkowski on Fri, 30 Jul 2021 21:12:26 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:132198 Archived-At: > From: Marcin Borkowski > Cc: help-gnu-emacs@gnu.org > Date: Fri, 30 Jul 2021 21:12:26 +0200 > > >> (overlay-put ovl 'prop nil) > >> > >> which does not really remove it, only sets it to nil? > > > > What's the difference? > > When I say `(overlay-properties ovl)', I can see `prop' set to nil. > Before setting it, I couldn't. And why is that difference important? Overlay properties exist to search for them with the likes of next-single-char-property-change, and those don't distinguish between the two. But if you must remove the property, I think the only way is to make another overlay with all the properties except the one you want to remove.