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: Adding support for xref jumping to headers/interfaces Date: Sun, 5 Mar 2023 14:06:11 +0200 Message-ID: References: <83bklin83z.fsf@gnu.org> <865ybmu2ha.fsf@stephe-leake.org> <39e25c9a-b4cc-a0ce-3f2a-1d2a1fc243d0@yandex.ru> <83pm9sfxfa.fsf@gnu.org> <861qm4tkih.fsf@stephe-leake.org> <71ea5e83-183f-2ae3-8146-6a31045a0309@yandex.ru> <834jqzafse.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="37283"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: stephen_leake@stephe-leake.org, john@yates-sheets.org, rms@gnu.org, fgunbin@fastmail.fm, casouri@gmail.com, sbaugh@janestreet.com, emacs-devel@gnu.org, azeng@janestreet.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 05 13:06:35 2023 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 1pYn8N-0009Sa-Fq for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Mar 2023 13:06:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYn86-0007Gz-T5; Sun, 05 Mar 2023 07:06:18 -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 1pYn85-0007GD-9m for emacs-devel@gnu.org; Sun, 05 Mar 2023 07:06:17 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYn83-0006zW-8o; Sun, 05 Mar 2023 07:06:16 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id p23-20020a05600c1d9700b003ead4835046so4667748wms.0; Sun, 05 Mar 2023 04:06:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678017973; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=msNU9+LCBZ7TSb8aVZdOMaWQ0dAibeHrg9500n+eBgc=; b=cAh2v8Ahf0UfUUFRQ13ARPFzHBXsUkQ1N3fHjNrn4NvNRTFmcG3VAO7emESwsBPkuv OdaWbg1yD8Ep21IaH9DzO79ujfknmifMXf5JA3R3MCTGZobe/1N0FakjI4ZDpxlbqwsv saf8Gdmi/fEXGjOVleRX0sZ53JbtXwp975DRrxVWVXBYEEV+SEu8ZEJOp/nmuSPnK094 pZ1UF++2NCc6MYLV8cJHDS4i329FZCGhJ/j+zYdOs53sj0hdUyp+jjCGAlGY2CYvAYH9 xKcusse2qdXn9nK4cO8DS7bYIpiJVblub3EmLo2cFec8N9d9xtlzQUwbeRnYNNz4Mfny oc4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678017973; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=msNU9+LCBZ7TSb8aVZdOMaWQ0dAibeHrg9500n+eBgc=; b=4ScmCl0FnLi1bp/AxdC2fNzAzNAP0uWPdiTvyScMwcLk7RSjxN7uZV0W4wnMLOAx5h sSHUVowU7U0FOv0lfaEquNmPHIhO1HahbQ7PZwq2PrbOnffkvpVR9bzP5OLlf3+VdULU xytFuC4/fjL6pFR/5J6rQ2cGaasAjdfDgVLx4x09esJ8jJkxc1XEIFurUmMcwe6FxbMf mK9LmZuU1B4aICSURh0vew7jVP5nwQu6idMvj3afOlLvnZaSQ9Y6wgHAVezhbG2MVPiw Ty2NpBp++Lk5LWpkyHFVNIwsOKSW5E7Fl0I9P8494RdTfHEldXTtQ/BsW8SxnbDn7yM8 V4Ww== X-Gm-Message-State: AO0yUKWe2jgXdA/GL5HJS+/bqpf8FcfK32aOxti9U4pK/PuzKkjLlA1l 5rW7sSDa5hkVLpWw7mxyO/LU9AQA4hs= X-Google-Smtp-Source: AK7set/MSPRHpP6PIq3jF1xtvmkGaO30vCFrmWYpPv2x6p/6+33EnAIWKCXSBrnF2+s4bOjw6bBmzg== X-Received: by 2002:a05:600c:1550:b0:3e9:c2f4:8ad4 with SMTP id f16-20020a05600c155000b003e9c2f48ad4mr6558903wmg.8.1678017973231; Sun, 05 Mar 2023 04:06:13 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o33-20020a05600c512100b003e209186c07sm12983892wms.19.2023.03.05.04.06.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Mar 2023 04:06:12 -0800 (PST) Content-Language: en-US In-Reply-To: <834jqzafse.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32f.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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303980 Archived-At: On 05/03/2023 08:11, Eli Zaretskii wrote: >> Date: Sun, 5 Mar 2023 00:24:01 +0200 >> Cc: Eli Zaretskii,rms@gnu.org,fgunbin@fastmail.fm, >> casouri@gmail.com,sbaugh@janestreet.com,emacs-devel@gnu.org, >> azeng@janestreet.com >> From: Dmitry Gutov >> >> Now, the next question is will we be able to provide some implementation >> of this method using one of the default backends? >> >> elisp -- probably not. >> >> Can we have one for 'etags'? Even if we just limit it to a pre-defined >> set of languages? > For C-like languages, we'd need to run "etags --declarations" on *.h > files for that, I think. And the resulting TAGS table will have stuff > other than just declarations, so we'd need some way of distinguishing > between them and the rest. > > Alternatively, perhaps it should be possible to add a special > command-line option (--declarations-only ?) to etags, to cause it to > output tags only for declarations. The etags xref backend usually works with pre-generated tags files. So a way to distinguish between them and the rest would be best. With the second approach, I suppose we'd have to have some new naming convention for tags files (like TAGS and TAGS.decl), and load two of them automatically. If the feature is useful enough to go to all this trouble, of course.