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: are there hooks for text becoming visible or hidden in a given window? Date: Fri, 25 Feb 2022 09:04:37 +0200 Message-ID: <83r17rqvei.fsf@gnu.org> References: <06e7c939da37479902e9a935fbaf487a@basiscraft.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23830"; 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 Feb 25 08:06:07 2022 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 1nNUg2-0005x3-M4 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Feb 2022 08:06:06 +0100 Original-Received: from localhost ([::1]:50562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNUg1-0002KP-1V for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Feb 2022 02:06:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNUeN-0002KG-13 for help-gnu-emacs@gnu.org; Fri, 25 Feb 2022 02:04:23 -0500 Original-Received: from [2001:470:142:3::e] (port=58794 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNUeM-0001Nh-O4 for help-gnu-emacs@gnu.org; Fri, 25 Feb 2022 02:04:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Kl6Y23JyZuZij2gS6aqgWwKmnPR27nYSGjtKCGD0bcw=; b=WYJR5+plrKsr cbTN755XrdC9k/G/2J3PadwnoGdvjuy+MX35UVD43+cJQNXenbaJqFSs6HF2tDW6vi/SbCVRNJrwh GCFNqQMzS+Qpen7UmeihyKnJNPnY+Mwv/3gaFHY6DjcQJsT9BQsn1RzrHoX/IgRm9XOvlOxRLwy7J p89HnulQjGJddmxhnsDuToMpaETbVmR3E8uG8uWyL7FEDqhFNXUmaPXLnK0YysLWFkcYFOmNlt30w tWMxwBtl44uhlkG+ZqP38XNq6vMRY1WoRA+NHaRVspOoOvuKkztGWDVfAqnxS2ZjU3zkvbgg2HeOq TOFqx7f87sdQegkJqe/+jw==; Original-Received: from [87.69.77.57] (port=4821 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 1nNUeM-0002AT-6l for help-gnu-emacs@gnu.org; Fri, 25 Feb 2022 02:04:22 -0500 In-Reply-To: <06e7c939da37479902e9a935fbaf487a@basiscraft.com> (message from Thomas Lord on Thu, 24 Feb 2022 14:25:39 -0800) 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" Xref: news.gmane.io gmane.emacs.help:136185 Archived-At: > Date: Thu, 24 Feb 2022 14:25:39 -0800 > From: Thomas Lord > > Is there a way to mark a region of text in a buffer, so that when that > text becomes visible in any window, or when it stops being visible, a > hook is called and provided the location of the text in the buffer, and > the window in which its visibility has changed? Please clarify what you mean by "visible" in this context. I mean not a couple of examples, but an exhaustive, complete definition. > Watching scroll events would only cover part of the problem Which part it won't cover, in your opinion? > and I'm worried about the interactive performance of having to > frequently search the range of visible text for text with a certain > property or within a certain overlay. Why do you think this could be expensive? A typical window doesn't show too much text.