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.bugs Subject: bug#67687: Feature request: automatic tags management Date: Mon, 01 Jan 2024 14:07:20 +0200 Message-ID: <83ttnx1clj.fsf@gnu.org> References: <2f86b882-9ec1-f63f-d90b-5f8f7ae114f2@gutov.dev> <58D84A29-9A63-45BA-AD8B-B476CDC931A1@gmail.com> <812729c8-726f-d60e-2603-2d8e588929fd@gutov.dev> <835y0sgg12.fsf@gnu.org> <979cf9e0-4d08-4c39-b5c8-11b0bb8801b4@gutov.dev> <83v88e3moc.fsf@gnu.org> <835y0e2ui8.fsf@gnu.org> <95132856-65b0-4812-a124-52e0da674330@gutov.dev> <8334vi2mwo.fsf@gnu.org> <801f2f8a-a39b-493f-a24f-0613a3c7ca57@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8328"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67687@debbugs.gnu.org, eskinjp@gmail.com, michael.albinus@gmx.de, stefankangas@gmail.com To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 01 13:08:19 2024 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 1rKH5f-0001x1-Np for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jan 2024 13:08:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKH5O-0006Bo-C2; Mon, 01 Jan 2024 07:08:02 -0500 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 1rKH5M-0006BE-MI for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 07:08:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKH5M-0001aE-Cj for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 07:08:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rKH5N-0003Jv-PW for bug-gnu-emacs@gnu.org; Mon, 01 Jan 2024 07:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jan 2024 12:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67687 X-GNU-PR-Package: emacs Original-Received: via spool by 67687-submit@debbugs.gnu.org id=B67687.170411085412727 (code B ref 67687); Mon, 01 Jan 2024 12:08:01 +0000 Original-Received: (at 67687) by debbugs.gnu.org; 1 Jan 2024 12:07:34 +0000 Original-Received: from localhost ([127.0.0.1]:47429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKH4w-0003JD-4Z for submit@debbugs.gnu.org; Mon, 01 Jan 2024 07:07:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rKH4u-0003Iy-1I for 67687@debbugs.gnu.org; Mon, 01 Jan 2024 07:07:32 -0500 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 1rKH4m-0001Z5-Eq; Mon, 01 Jan 2024 07:07:24 -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=9IGURZAjpRk0sEVxZHJ0FmsLkmdsafSnlTHjq0tT+Kc=; b=SL2Oa5ggTgcM VQVQVa+ngvYztVpXfxW5g33XD6g7+UW3DwNw/isFiRxBfyANcwPpvmuHQxUwzbI9Fo84uew2xtXJy 5mAfauInk4FUZ96YiAjYI2t5xVwQwpD+9uuM8RfODg5Yijqit8dMdpaKY6aTwH0D1AIhPuUxSoVKO dc3ySM3Pz+KFsps1gKYzb/A6BqkJjzVSFtzLeChMxEfkAHLYWTCWsAFDFMm3nVBLzeYlQq2u2S3Ys k3df38Pu9JTWzD1cWPy7yYPIRbwqNoirqwCnwJft+DTRxcOl3leXkoGRHkZTj5FNvKbrbZ8lFm5c1 2dzE9iQMHlQFsisl/MWqag==; In-Reply-To: <801f2f8a-a39b-493f-a24f-0613a3c7ca57@gutov.dev> (message from Dmitry Gutov on Mon, 1 Jan 2024 03:23:36 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277173 Archived-At: > Date: Mon, 1 Jan 2024 03:23:36 +0200 > Cc: stefankangas@gmail.com, eskinjp@gmail.com, 67687@debbugs.gnu.org, > michael.albinus@gmx.de > From: Dmitry Gutov > > >> a) We won't add new files to the index, because we (apparently) can't > >> simply use the project's list of files -- there is no guarantee that it > >> matches the fileset that the original author of the TAGS file had in mind. > > > > The user has etags-regen-ignores to control that. > > etags-regen-ignores wouldn't normally include filters that already are > in project's ignores. But of course the user might choose to add them. > > >> b) There is no way to pick up the --regex options used for generating > >> the original TAGS, or any other options we don't know about. > > > > There are defcustoms to control both of those. > > If all of these options are set to the expected values, what's stopping > the user from calling 'M-x tags-reset-tags-tables' and having > etags-regen-mode create the table on its own? The extra 10 seconds of > waiting? > > Also note that if you have an existing TAGS file in the root of the > project, with default configuration etags-regen-mode will pick it up to > visit and refresh it where necessary (when there are changed or missing > files). > > >> Either way, we get a poorly-defined behavior with edge cases that are > >> likely to surprise the user at different points of time. So we might > >> indeed grow such a capability, but it'll probably stay off by default. > > > > I agree that sometimes it could be against the user's expectations. > > But I also think that other times it is according to user's > > expectations. Which tells me that this is a separate issue that needs > > a separate knob; we shouldn't deterministically deduce what users want > > in this respect from the fact that he/she loaded an existing tags > > table. Moreover, it is quite possible that even when the mode is > > turned on, users might want sometimes to load tags tables manually. > > I don't mind adding additional knobs. I guess for now it will be enough to document that invoking visit-tags-table disables the mode for that project. AFAICT this is not currently documented anywhere in the patch.