From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Automatic (e)tags generation and incremental updates Date: Sat, 09 Jan 2021 14:49:36 -0700 Message-ID: <875z45dbm7.fsf@tromey.com> References: <779a6328-9ca5-202a-25a2-b270c66fe6dd@yandex.ru> <8fc5e96c-ebb8-c668-9b2a-c7c4ee54c0b9@yandex.ru> <83r1mwltob.fsf@gnu.org> <0bee9ab4-46bc-b6fd-97b6-e26cc80f1610@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="11965"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: Eli Zaretskii , tom@tromey.com, philipk@posteo.net, john@yates-sheets.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 09 22:51:41 2021 Return-path: Envelope-to: ged-emacs-devel@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 1kyM97-0002zZ-3N for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 22:51:41 +0100 Original-Received: from localhost ([::1]:52274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyM95-0001Ly-W7 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 16:51:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyM7M-0000JX-5Y for emacs-devel@gnu.org; Sat, 09 Jan 2021 16:49:52 -0500 Original-Received: from gateway24.websitewelcome.com ([192.185.51.162]:39707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyM7J-0000OX-P8 for emacs-devel@gnu.org; Sat, 09 Jan 2021 16:49:51 -0500 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 884432935 for ; Sat, 9 Jan 2021 15:49:37 -0600 (CST) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id yM77kIBf4HPnUyM77k42gj; Sat, 09 Jan 2021 15:49:37 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ezW7J0bFmcvpdlomRfi4zSoq7YxOww318nBDCActhDk=; b=UmxvAfzjND8PRqBUkhQ+qXBWt6 zJgGEw2hiBVgM3r5ExmnPjClbhOoSqGlIW7g49gr4Qz8OyNmWMPMcpE9yNJOljrq6ZfXDoJz8y0EC TxuxZsTP1CePhGihw1B1boOff; Original-Received: from 97-122-81-39.hlrn.qwest.net ([97.122.81.39]:33670 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kyM77-003P55-5u; Sat, 09 Jan 2021 14:49:37 -0700 X-Attribution: Tom In-Reply-To: <0bee9ab4-46bc-b6fd-97b6-e26cc80f1610@yandex.ru> (Dmitry Gutov's message of "Thu, 7 Jan 2021 17:56:57 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.81.39 X-Source-L: No X-Exim-ID: 1kyM77-003P55-5u X-Source-Sender: 97-122-81-39.hlrn.qwest.net (localhost.localdomain) [97.122.81.39]:33670 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Received-SPF: permerror client-ip=192.185.51.162; envelope-from=tom@tromey.com; helo=gateway24.websitewelcome.com X-Spam_score_int: 37 X-Spam_score: 3.7 X-Spam_bar: +++ X-Spam_report: (3.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_BL_SPAMCOP_NET=1.347, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779, URIBL_CSS_A=0.1 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262823 Archived-At: Thank you for CCing me on this. Dmitry> - Call some xref command like 'M-.'. See message "Generating new tags Dmitry> table..." (it's saved in /tmp/...), then see navigation happen. On "xdg"-ish systems, it would make sense to use the XDG cache directory here. Dmitry> - Pressing C-M-i instead should also trigger tags table generation. Dmitry> - When you switch between projects, the previously generated tags Dmitry> tables are discarded. It's not too hard to improve, but that would Dmitry> involve some choices/tradeoffs. What are the tradeoffs? I tend to think that conceptually each buffer should point to its corresponding tags table. Then some separate logic could be used to decide when to kill some tag file buffer. Dmitry> - When files are deleted, or otherwise changed outside of Emacs Dmitry> (perhaps with 'git checkout'), nothing is updated. I have a few new Dmitry> ideas, haven't started on them yet. Workaround: toggle Dmitry> etags-regen-mode off and on, which will result in full rescan when you Dmitry> use 'M-.'. It seems to me that the default ought to be to update the tags table on M-. One nice way to do this would be to run etags in the background, so that the work of updating would be done in parallel with the user typing, since presumably you'd want to ensure that etags has finished before jumping to the result (or fulfilling a completion request). Tom