From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#46992: xref-after-update-hook Date: Mon, 08 Mar 2021 19:48:48 +0200 Organization: LINKOV.NET Message-ID: <875z21wn7j.fsf@mail.linkov.net> References: <87r1kqhkzu.fsf@mail.linkov.net> <87eegqk83n.fsf@mail.linkov.net> <7ace7ff1-98e6-e5f0-5bf9-3cd28f4a7154@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3715"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46992@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 08 19:19:55 2021 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 1lJKTz-0000u5-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 19:19:55 +0100 Original-Received: from localhost ([::1]:52754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJKTy-0001IL-4Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 13:19:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJK14-00015X-JY for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 12:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33178) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJK14-0005Zj-9r for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 12:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJK14-0002QM-6q for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 12:50:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r1kqhkzu.fsf@mail.linkov.net> Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Mar 2021 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46992-submit@debbugs.gnu.org id=B46992.16152257689266 (code B ref 46992); Mon, 08 Mar 2021 17:50:02 +0000 Original-Received: (at 46992) by debbugs.gnu.org; 8 Mar 2021 17:49:28 +0000 Original-Received: from localhost ([127.0.0.1]:44722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJK0W-0002PN-Hy for submit@debbugs.gnu.org; Mon, 08 Mar 2021 12:49:28 -0500 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:51171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJK0T-0002P4-Rw; Mon, 08 Mar 2021 12:49:26 -0500 Original-Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8A3DD24000D; Mon, 8 Mar 2021 17:49:18 +0000 (UTC) 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:201856 Archived-At: tags 46992 fixed close 46992 28.0.50 thanks >> This is the first thing that I tried, but the problem is that >> it's called before the xref buffer is filled with results >> where I need to put overlays on output lines. >> Also the hook needs to be called after reverting xref buffer. > > I figured if all you are doing is some setup and turning on a minor mode, > it should be enough to only do once. A minor mode would generally track all > subsequent modifications to the buffer with after-change-functions or the > like (we don't bind (inhibit-modification-hooks t) while rendering the > output, although it looks like we might, for a small extra speed boost). We can't overburden minor modes with such complexity that is not used most of the time. > But if that doesn't work for some reason, or doesn't cover all your goals, > please feel free to install the patch. Ok, pushed to master, and closed.