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: Sat, 20 Feb 2021 23:05:11 +0200 Message-ID: <7fafcc23-e96a-7ad1-a7c7-ba4abbd73278@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> <731c1b21-b3e9-89fe-3751-9c2a528adfba@yandex.ru> <838s7k4ft8.fsf@gnu.org> <5de633e5-05c3-d965-e6b1-b8bb91a8f11a@yandex.ru> <834ki82hbh.fsf@gnu.org> <67d2bd44-032d-f014-338f-387a07503d9c@yandex.ru> <83im6n19it.fsf@gnu.org> <25073978-eb02-4f40-4104-9d18df87def0@yandex.ru> <83y2fixyiz.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="19757"; 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 Sat Feb 20 22:06:26 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 1lDZSM-00053C-FB for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 22:06:26 +0100 Original-Received: from localhost ([::1]:49646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDZSL-0000q9-HZ for ged-emacs-devel@m.gmane-mx.org; Sat, 20 Feb 2021 16:06:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDZRG-0000Lv-SP for emacs-devel@gnu.org; Sat, 20 Feb 2021 16:05:18 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:38608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDZRE-00025W-Ow; Sat, 20 Feb 2021 16:05:18 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id m25so1397563wmi.3; Sat, 20 Feb 2021 13:05:16 -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=Hi50NHlYmy3R4Q/NWdj5FFhLOwN1G6EXetWyi9xEW5M=; b=sbRUdbk0JFAYSmsWf97inUWJ9T7z9XseaA841iuFE6KdqZAf+XP1K95gstrX6YySD1 lQS+HS7vaCYjRu2B3eNRnIag5BPMBgnBuFuJ/aCq6BtEaCzhspSyo20DZf8azu54xzfQ PD4XrBnCeBdqLiDE+WjdrPg00ZI0wO/rnJ1zsWjLn2dCO+ZvvsfHMyLh3Z5xXktHiqa7 abG4EsrKcV6xkYLqeK66m4hsRGWQBYfGJYYx8xz8DtwhKyDKkHjOk071etkcPJfm9d1G yrNNmQwRhHLuXeiIcUiENTOTbK1iRkIEo5nHvIYFYnAiWTfpdqyAjaQoaI5j3RVIlnNf Uj/w== 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=Hi50NHlYmy3R4Q/NWdj5FFhLOwN1G6EXetWyi9xEW5M=; b=LOkUX1lY8RvLn8pfAkd3yluWZUZZFhZyrjrpuuMlkRqLgZisfYB8cHNmCa/TN/N4+1 m5b+j1F84K/jTjLGzfeR8Yirw7DFTXrAREw1ef/npm10J5M0BBC3y25XN4gho2sNh43k 810oKAbfhfQKHe06GvZ/ebNzsvr3jcR+DX6TTLrWmWFmy74ZZVZPTVms+JNHbcPyvJci eOAqFIyfO6M2kyxSqv33ZSjWU8ZRwSXcIwbfDdQsQz7aWevCTrzcYxi+zv+wjVFnX/pX 1/2kEdgFaJV9jdDf2SlmXla3OT2TXz8uM5a2c5qpokuD5Dz+O4lOp2LVXPbjtdw/Ily5 lEVQ== X-Gm-Message-State: AOAM5312ecHo+E6ZUwF+boO6GTtOWj+yz9CGrGMaqgbT3bXA/FNo/I7t hXBtopUIHfI+SPoU9TKwI561lMF2hvs= X-Google-Smtp-Source: ABdhPJxcAdoxOzL+tSGzNJ+wpMYcuj8o2HfsuF8mW2wrfxcNQM2aPtw3vn6louuhViMG7tkr9eYcCQ== X-Received: by 2002:a1c:4d05:: with SMTP id o5mr4094748wmh.10.1613855114856; Sat, 20 Feb 2021 13:05:14 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id v18sm16952171wrf.75.2021.02.20.13.05.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Feb 2021 13:05:14 -0800 (PST) In-Reply-To: <83y2fixyiz.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32a.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:265355 Archived-At: On 20.02.2021 22:41, Eli Zaretskii wrote: >> Cc: philipk@posteo.net, tom@tromey.com, john@yates-sheets.org, >> emacs-devel@gnu.org >> From: Dmitry Gutov >> Date: Sat, 20 Feb 2021 22:27:50 +0200 >> >>> But below you propose a compatibility layer anyway, for the regular >>> expressions, right? So the danger of less testing and more bugs still >>> exists under that proposal, AFAIU. And the compatibility code for >>> using "-L -" vs just "-" is very simple, so why not put it under the >>> same condition as what you plan for the regexp compatibility? >> >> That would work quite differently: etags wouldn't have to launch an >> external executable and somehow guess whether it supports some flags. It >> will just add for support some new (common) ones. > > I don't understand: how would you know which variant to use unless you > probe the program to see which kind of etags/ctags it is? You said > the syntax of the --regexp option is different between these two > programs, so you must use the right syntax that fits the program being > invoked. Right? If etags adds these new flags, I won't have to. I'll just say that etags-regen depends on Emacs 27.2+. Maybe add an etags version check upon mode activation as well. >> There is still some risk, of course, but that would stem from possible >> differences in the implementation of said options between etags and ctags. > > "Possible" differences? But we know what the differences are, so we > know that they exist, not just as a possibility, right? I meant the new options, so those would be bugs in their implementations (in etags or ctags). >>> The equivalent of --langmap is "-l LANG", I think. (We could also >>> teach etags to support --langmap directly, patches welcome.) >> >> If such patch materializes, any chance we could put it into emacs-27 as >> well? > > It depends on how complex it will be, and whether and to what extent > will it affect the existing code. > >> Then I could use some pointers: for example, which stdlib and/or utility >> functions you would expect one would use to add this feature. Just the >> names could suffice. > > I didn't think about this too much, but strtok sounds like a good > start. All right, thank you.