From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Automatic (e)tags generation and incremental updates Date: Tue, 12 Jan 2021 19:32:18 +0200 Message-ID: <3c688f2e-a32c-63b8-235b-8ef92e87fe83@yandex.ru> 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> <875z45dbm7.fsf@tromey.com> <1e9c9572-52ee-339b-78a2-731b9eb5f3de@yandex.ru> <871resd93f.fsf@tromey.com> <83mtxffrou.fsf@gnu.org> <106abdbb-ce7a-4911-0831-149da3dccfb3@yandex.ru> <83o8hudwgo.fsf@gnu.org> <8335z6dql2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26312"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: philipk@posteo.net, tom@tromey.com, emacs-devel@gnu.org, john@yates-sheets.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 12 18:42:10 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 1kzNgI-0006jD-8C for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 18:42:10 +0100 Original-Received: from localhost ([::1]:59706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzNgH-0001eZ-5e for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 12:42:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzNWx-0007Pu-2v for emacs-devel@gnu.org; Tue, 12 Jan 2021 12:32:31 -0500 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:35777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzNWv-0002Xy-6h; Tue, 12 Jan 2021 12:32:30 -0500 Original-Received: by mail-wr1-x435.google.com with SMTP id r3so3392531wrt.2; Tue, 12 Jan 2021 09:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=fOxseQ2OwPYoQeXhSg+VpWE2jb/mmeXotQ9LnwMnF1o=; b=hAzAJXcNKX9vMpgYHehYnoAeB2sYP5fN3FlNj8drsT1Mbeb8xL1cX6szDuvXQOyUI5 1ae93V8GVVVykK21WmOjeqdF5Pl5BygrGc5jSotbm8ryOLaxhdFljHvFZygcQ/yl8HT6 XOQP/Cj5+6CX6Da4pgNi/R4g7Gc3vgi6MmJjSz8pgtqZw60Y7e1QccG+R7rFe2XqOVcy CNa9adKwIuWnfyzPgtXFzD0Ml0QuFs1oD1QMpdVXjG6QvsyBEhepi0lHSkGpfZzyeNmX gWTeMxJJDKq2gB/41Ja7eS0/B+KZQA11LbeFRD0sPCpapbWDv7nmkq+kM0OxmmrToGiU wsag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fOxseQ2OwPYoQeXhSg+VpWE2jb/mmeXotQ9LnwMnF1o=; b=c0h4EO/Lrq5YBlMlbjG+mgbrDBRXO2t+DQVgxnG/WrKJGty6cvrg6pRBl6VoUMZjJ1 dXUZnAkIY1jW/fddJB4DMQs8CEbDjE6DsmhmjOdBO55xqW9OynT8nRRhCQSD0VjbvLSG /bcsTSpdqdLFzXAIL/lyioURG+lnbaHIBdTUajisaIORSBp8fVM885BOaKX+Di0dcQzp 5wZW0C7Z9JpSj1dwzbkBQ2F+TVgLoY0LmewwjgRnMEVPqhirbwm4ntQYTSBurzSvPb09 9K6u+BxUwo3Z7vKb/c4f/uXTZhDueMqxLW23fg7EMhOtiIQP8Ocps0KABzucHsZ7ZlmW RuZA== X-Gm-Message-State: AOAM530F6Td9rBR1Qie+VwKKwmHZyVyWTIfSVIaRIWPfWTTDP1lll5eB QkEQbUknKnOrc1D8JAUX1m6XCbPVKakbHQ== X-Google-Smtp-Source: ABdhPJxl0DTxQK38F84G+C38pyrqAMjvImh2SmUwr3lvniO+a6vvK5L+YjqgqrPV8XTaAucVcH8lRg== X-Received: by 2002:a05:6000:1043:: with SMTP id c3mr5363780wrx.34.1610472747183; Tue, 12 Jan 2021 09:32:27 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r1sm6131043wrl.95.2021.01.12.09.32.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jan 2021 09:32:26 -0800 (PST) In-Reply-To: <8335z6dql2.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=raaahh@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:263009 Archived-At: On 12.01.2021 19:15, Eli Zaretskii wrote: >> Cc: tom@tromey.com, john@yates-sheets.org, philipk@posteo.net, >> emacs-devel@gnu.org >> From: Dmitry Gutov >> Date: Tue, 12 Jan 2021 18:48:24 +0200 >> >> (insert-file-contents "...") takes 0.15 in this example, which would >> make it possible to use if etags implemented the same logic that we do >> in Elisp currently > > Which logic is that? what does it do? It removes the existing entry for the file from the index, and scans the file again (with etags) to add the updated entry for it at the end. >>> Anyway, TAGS and etags.el were designed to be very tolerant to >>> changes, so you shouldn't need to update very often. >> >> I want it to update reliably; maybe not too often (depending on a >> project), but if a user switches to a different Git branch, they should >> be confident that they'll see the changes reflected in the index soon. >> Even (and especially) if those are big changes. > > What about regenerating etags only if M-. etc. fail to find an > identifier? There are downsides. You will have to press M-. twice sometimes with that approach. Completion will routinely fail to show some tags that should be present. Also, if the rescan takes a while, I'm not sure you'd want to do that on every 'M-.' failure. But this could be an optional mode of operation. >> Right now only the update-on-save feature is in there, but I have to >> tell you, having a newly written function in the index right away >> (without having to invoke any commands or switch to the terminal) is >> pretty nice. > > Of course, but then the user will need to be prepared to pay the > price. TANSTAAFL. I think the current state of the feature has already reduced a few prices. And we should be able to go further.