unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: spwhitton@spwhitton.name, emacs-devel@gnu.org
Subject: Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
Date: Fri, 20 Sep 2024 22:35:11 +0300	[thread overview]
Message-ID: <690fff1d-b8f2-4e6e-b105-21ca97a0a92e@gutov.dev> (raw)
In-Reply-To: <86o74i5edp.fsf@gnu.org>

On 20/09/2024 22:11, Eli Zaretskii wrote:
>> Date: Fri, 20 Sep 2024 21:20:59 +0300
>> Cc: emacs-devel@gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>>>>> We already have "pl" in the list.  Adding "pm" is okay, but then why
>>>>> only it? why not add all the extensions that 'etags' supports?
>>
>> Adding "pm" sounds good.
>>
>> "All supported extensions" (or most) might be a good idea as well.
> 
> So I think we should add all of them on emacs-30.

I have no objections, if you're sure about misdetecion. Though note that 
the current logic only supports specifying extensions. So no 
Makefile/Rakefile/etc.

>> As long as the additions are not misdetected often - false positives
>> based on obscure languages might be a nuisance.
> 
> Agreed.  But it sounds like the only such case is .m, which could be
> Mercury, not just ObjC.

Even for .m we ultimately delegate to etags' internal detector, since 
etags-regen-mode just chooses which files to send to it.

If ObjC has priority, and the parser has some internal heuristics as 
well that would help it choose, it'll be fine.

.m could also be Matlab/Octave, though.

>>>> Okay thanks, I'll add "pm" so we don't have just one Perl extension, and
>>>> hopefully we can figure out a better solution for master.
>>> My question about adding more extensions was for emacs-30.
>>>
>>> Let's wait for Dmitry to chime in, and take it from there.
>>
>> The reason why is that etags parses files with unknown extensions as
>> Fortran sources, and there is currently no opt-out. See this thread:
>>
>> https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
>>
>> The same issue stops us from benefiting from etags' hashbang detection.
> 
> Right.  These require to explicitly specify --language on the etags
> command line.  So maybe etags-regen could learn to apply special
> command-line options to files matching a regexp.

I'm not sure which options or regexps it can add to the invocation. The 
problem is that the list would need to be exhaustive.

> Or maybe we should
> add an option to etags to disable the fallback to Fortran.

If someone were to implement that, it might solve two problems as once.



  reply	other threads:[~2024-09-20 19:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20  9:15 Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30? Sean Whitton
2024-09-20 10:34 ` Eli Zaretskii
2024-09-20 13:39   ` Sean Whitton
2024-09-20 13:41     ` Eli Zaretskii
2024-09-20 18:20       ` Dmitry Gutov
2024-09-20 19:11         ` Eli Zaretskii
2024-09-20 19:35           ` Dmitry Gutov [this message]
2024-09-20 19:59             ` Dmitry Gutov
2024-09-21  7:03               ` Eli Zaretskii
2024-09-21 13:48                 ` Dmitry Gutov
2024-09-21 15:14                   ` Eli Zaretskii
2024-09-22  1:09                     ` Dmitry Gutov
2024-09-22  5:19                       ` Eli Zaretskii
2024-09-23 16:57                         ` Dmitry Gutov
2024-09-23 18:14                           ` Eli Zaretskii
2024-09-23 18:24                             ` Dmitry Gutov
2024-09-23 18:35                               ` Dmitry Gutov
2024-09-23 17:07                       ` Corwin Brust
2024-09-23 18:19                         ` Eli Zaretskii
2024-09-23 18:28                           ` Dmitry Gutov
2024-09-23 18:38                             ` Eli Zaretskii
2024-09-23 18:39                             ` Corwin Brust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=690fff1d-b8f2-4e6e-b105-21ca97a0a92e@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=spwhitton@spwhitton.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).