From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: How to solve overlay conflict between invisible and display? Date: Fri, 19 Jul 2024 09:02:25 +0200 Message-ID: <87jzhh3lvi.fsf@gnu.org> References: <87o76wl9ha.fsf@gnu.org> <86ed7sgqs3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 19 09:44:27 2024 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 1sUiHz-000ADz-1D for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 19 Jul 2024 09:44:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUiHP-0000ra-VN; Fri, 19 Jul 2024 03:43:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUiHI-0000Sx-Eu for help-gnu-emacs@gnu.org; Fri, 19 Jul 2024 03:43:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUiHE-0006do-Qa for help-gnu-emacs@gnu.org; Fri, 19 Jul 2024 03:43:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Q9vBJ/1PBpPJi0FBn1UB5deUR2i80gdajipcbveWjXA=; b=f2alMyWQdn58GRVpCu6+ 8RvKMscVCVMB8NLalIcOcVuHhty7yP3AiAA+uqXUtxzc51PnqObOHceRgi8/DU32+TC6I00BfDQ4H 9o3FFSuwkolPLNdlUbtwo3XxLm/CKRJh+PibkVONQIHSLXTpOl2k08UQ0+Pz9x0PCPKCWApFg9qdw 5vDas46VSiF9L2XKHS2ibkhy9k+DtSVQZucI+QkpihANPIFtVKCLWPt2agQWjFE8zhDVlMqYBz8/O wjf5EJdhZqM8zOjHUqTv1+h5t+oYDK2RHpTHqK7wr3kWk63F+VU3BBPASaeHbpVZ+CybvHGUGWV3a EjIywtV6eINc8w==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrhedtgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe dukeevteeuvdetteejveetieejhedtteefffdvkeeikeevffdttefgveeilefhhfenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnod hmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedv leekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: <86ed7sgqs3.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Jul 2024 15:13:32 +0300") X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147274 Archived-At: Eli Zaretskii writes: > What do you mean by "nested"? If the invisible property starts > _before_ the display property, the invisible property "wins". This > variant of your text program: > > (defun th/overlay-invisible-and-display-test () > (interactive) > (save-excursion > (goto-char 1) > (while (re-search-forward "foo" nil t) > (let ((o1 (make-overlay (match-beginning 0) (match-end 0))) > (o2 (make-overlay (1+ (match-beginning 0)) (1- (match-end 0))))) > (overlay-put o1 'invisible t) > (overlay-put o2 'display "=C2=A7"))))) > > when run from *scratch*, completely removes "foo" from display, > showing only the quotes, which means the invisible property "won". Ok, I see. I assumed that when both overlays start xor end at the same position, that would still count as "one is nested in the other". >> In my scenario, I would like that the outer invisible overlay also >> hides the nested display overlays. > > Then make the invisible property start before display. I guess the invisible property overlay could start one char earlier (covering the newline before) and additionally add a before-string property with that newline. I'll try that. Thanks a lot, Tassilo