From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Generation of tags for the current project on the fly Date: Wed, 17 Jan 2018 00:56:01 +0300 Message-ID: <4a91acc7-78f9-600f-2fa4-1bed70b107e2@yandex.ru> References: <4559858d-eb32-d071-fdad-e51430700260@yandex.ru> <83shbb30z1.fsf@gnu.org> <8360863o6a.fsf@gnu.org> <27a58fb2-d2ee-e5fc-158d-ec41be401987@yandex.ru> <83y3l0za1f.fsf@gnu.org> <259c557d-e3a3-c01b-9ba3-30df09d247ea@yandex.ru> <83inc3znpu.fsf@gnu.org> <98f4f0c3-6815-bf86-fa23-1a330c60b9f3@yandex.ru> <83d129y9oq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1516139662 19357 195.159.176.226 (16 Jan 2018 21:54:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 Jan 2018 21:54:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 16 22:54:18 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebZBO-0004N0-Lt for ged-emacs-devel@m.gmane.org; Tue, 16 Jan 2018 22:54:14 +0100 Original-Received: from localhost ([::1]:39500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebZDO-0001Ew-4B for ged-emacs-devel@m.gmane.org; Tue, 16 Jan 2018 16:56:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebZDG-0001Dw-Rt for emacs-devel@gnu.org; Tue, 16 Jan 2018 16:56:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebZDD-0002LO-Qu for emacs-devel@gnu.org; Tue, 16 Jan 2018 16:56:10 -0500 Original-Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:42420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebZDD-0002K3-Ho; Tue, 16 Jan 2018 16:56:07 -0500 Original-Received: by mail-lf0-x233.google.com with SMTP id q17so9112423lfa.9; Tue, 16 Jan 2018 13:56:07 -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=2C7hH7NF1hs5qVT+n3KOI0T7y6iL+KGwEpx/T36ZxcI=; b=J+e88A0fM7pWSnNV8JXT8kc6E3Q+qgKTefI5Jr+NIyrFWrR+3D19b1ZrKXRuRnjq03 MvJoo584D3rQW4dGL0O8VqtemV/mrmOf5DXlt/z93u2AK796VcQTlzryTX1LrGjutcdO cTeRaNSjP7TvTskEUbMkbEh8BMyf2PUDcA0T8sh1zxU3QMelwrsFLwIAQBkZ72I2mrlO Hz84AkghI1rtF+P68uc887h+IoWbPXELLSEyPb3WRP6b+BTQomgN2iMAJB6IMZrOl0b9 SzWomUSDgO0XJwSeG9C/WvcKuR7TAQfLI7bRsFPNZqdmoFGjtSM9ICw158wkXNs0fi0U UGSw== 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=2C7hH7NF1hs5qVT+n3KOI0T7y6iL+KGwEpx/T36ZxcI=; b=ZXG8VsooPdJJel7kzdmmzbg5yoUwnK3PiaHB7jD1oMk1NGUA0Nkjy6x6UFl22YV79h HJSZrPEdW+UbVKg1RId/8FsBw+cxXMWgtIezpsUcu2nfcfrBidTPXtpBZoCXIqEC315l almdJaj/l3BBYFm3haJ7qmll7fGXdtsuFYJW6gxghIk41TjrFWbPg1SQ8qL7pVAh61Ui ZA+w9OLZwIP2EZvmX753PbZGG9YOehkF7O2lkSp8ydT22pub0VifHOdjGngqZJ8wadhn xodCA+NTd7n1AQtPgAgl0yqXZWscvejcIBX4SM+6zqGvQy7rOfhX+CfTuM9h67RB5LgG PQ6Q== X-Gm-Message-State: AKwxyteziuusY6vRPS3Me4p/qVJDoAxRPQOANr9xEAR0INhv4KFG7bqH rj3l5SSyXaDRiVcHcJreuQTs7k3R X-Google-Smtp-Source: ACJfBovcj1IFPfWoFISsJg7g7D2yZxsNa55nDiylfOtbdvwy1hV32NkNYpDyPJGUFEgUq1vjM81g2g== X-Received: by 10.46.68.133 with SMTP id b5mr7083836ljf.62.1516139765643; Tue, 16 Jan 2018 13:56:05 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id r22sm568245ljd.78.2018.01.16.13.56.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 13:56:04 -0800 (PST) In-Reply-To: <83d129y9oq.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222033 Archived-At: On 1/16/18 20:50, Eli Zaretskii wrote: > Incremental tagging needs to leave the record about what was tagged > somewhere, right? The information is inside the TAGS file, isn't it? Even though it's in a flat list, unsorted, spread throughout the file. I was thinking that maybe we can add this feature simply using some clever engineering, without changing the format of the file. And I think it should be fairly easy (in terms of the algorithm, at least) to implement incremental update for one-to-few files: you scan through the file, remove the corresponding entries, and then scan the files (ones that still exist) and add those entries at the end. Might be slower to incrementally update when passed (almost) the same list of files, like 'make tags' does. It has higher complexity on paper (looking for/matching file names), but maybe it would still yield a measurable improvement over a full reindex. > Since there's no such feature in etags now, this > sounds like a project for which I won't have time any time soon. Any > volunteers? Not volunteering yet. Could be something I might have time for a few months from now, depending on whether we have a solid plan and you'll want to provide some hand-holding. >> I more or less imagine how I'd implement such a feature using Lisp and >> 'etags --append', but that would do nothing to help when the tags are >> generated by make. > > It will also not help if Emacs is restarted, right? Right, but it will do a full scan after the restart. Spending a longer amount of time just once per project per restart is more or less fine, I think. Especially after an explicit prompt (I've added one now, you can see it on the branch).