all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
@ 2024-09-20  9:15 Sean Whitton
  2024-09-20 10:34 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Whitton @ 2024-09-20  9:15 UTC (permalink / raw)
  To: emacs-devel

Hello,

Can I install this simple change on the release branch, please?

-- >8 --
---
 lisp/progmodes/etags-regen.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
index 21ea9bfb8b3..e97b0cd7574 100644
--- a/lisp/progmodes/etags-regen.el
+++ b/lisp/progmodes/etags-regen.el
@@ -119,7 +119,7 @@ etags-regen-regexp-alist
 ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
 (defcustom etags-regen-file-extensions
   '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp"
-    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
+    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "pl" "pm"
     "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
   "Code file extensions for `etags-regen-mode'.
-- 
Sean Whitton



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-09-20 10:34 UTC (permalink / raw)
  To: Sean Whitton, Dmitry Gutov; +Cc: emacs-devel

> From: Sean Whitton <spwhitton@spwhitton.name>
> Date: Fri, 20 Sep 2024 10:15:50 +0100
> 
> Hello,
> 
> Can I install this simple change on the release branch, please?
> 
> -- >8 --
> ---
>  lisp/progmodes/etags-regen.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
> index 21ea9bfb8b3..e97b0cd7574 100644
> --- a/lisp/progmodes/etags-regen.el
> +++ b/lisp/progmodes/etags-regen.el
> @@ -119,7 +119,7 @@ etags-regen-regexp-alist
>  ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
>  (defcustom etags-regen-file-extensions
>    '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp"
> -    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
> +    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "pl" "pm"
>      "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
>    "Code file extensions for `etags-regen-mode'.

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?

Dmitry, why do we need an explicit list instead of asking 'etags'
which extensions it supports?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 10:34 ` Eli Zaretskii
@ 2024-09-20 13:39   ` Sean Whitton
  2024-09-20 13:41     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Whitton @ 2024-09-20 13:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Dmitry Gutov, emacs-devel

Hello,

On Fri 20 Sep 2024 at 01:34pm +03, Eli Zaretskii wrote:

>> From: Sean Whitton <spwhitton@spwhitton.name>
>> Date: Fri, 20 Sep 2024 10:15:50 +0100
>>
>> Hello,
>>
>> Can I install this simple change on the release branch, please?
>>
>> -- >8 --
>> ---
>>  lisp/progmodes/etags-regen.el | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
>> index 21ea9bfb8b3..e97b0cd7574 100644
>> --- a/lisp/progmodes/etags-regen.el
>> +++ b/lisp/progmodes/etags-regen.el
>> @@ -119,7 +119,7 @@ etags-regen-regexp-alist
>>  ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
>>  (defcustom etags-regen-file-extensions
>>    '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp"
>> -    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
>> +    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "pl" "pm"
>>      "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
>>    "Code file extensions for `etags-regen-mode'.
>
> 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?

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.

-- 
Sean Whitton



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 13:39   ` Sean Whitton
@ 2024-09-20 13:41     ` Eli Zaretskii
  2024-09-20 18:20       ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-09-20 13:41 UTC (permalink / raw)
  To: Sean Whitton; +Cc: dmitry, emacs-devel

> From: Sean Whitton <spwhitton@spwhitton.name>
> Cc: Dmitry Gutov <dmitry@gutov.dev>,  emacs-devel@gnu.org
> Date: Fri, 20 Sep 2024 14:39:11 +0100
> 
> Hello,
> 
> On Fri 20 Sep 2024 at 01:34pm +03, Eli Zaretskii wrote:
> 
> >> From: Sean Whitton <spwhitton@spwhitton.name>
> >> Date: Fri, 20 Sep 2024 10:15:50 +0100
> >>
> >> Hello,
> >>
> >> Can I install this simple change on the release branch, please?
> >>
> >> -- >8 --
> >> ---
> >>  lisp/progmodes/etags-regen.el | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
> >> index 21ea9bfb8b3..e97b0cd7574 100644
> >> --- a/lisp/progmodes/etags-regen.el
> >> +++ b/lisp/progmodes/etags-regen.el
> >> @@ -119,7 +119,7 @@ etags-regen-regexp-alist
> >>  ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
> >>  (defcustom etags-regen-file-extensions
> >>    '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp"
> >> -    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
> >> +    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "pl" "pm"
> >>      "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
> >>    "Code file extensions for `etags-regen-mode'.
> >
> > 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?
> 
> 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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 13:41     ` Eli Zaretskii
@ 2024-09-20 18:20       ` Dmitry Gutov
  2024-09-20 19:11         ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2024-09-20 18:20 UTC (permalink / raw)
  To: Eli Zaretskii, Sean Whitton; +Cc: emacs-devel

Hi!

On 20/09/2024 16:41, Eli Zaretskii wrote:
>>>> diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
>>>> index 21ea9bfb8b3..e97b0cd7574 100644
>>>> --- a/lisp/progmodes/etags-regen.el
>>>> +++ b/lisp/progmodes/etags-regen.el
>>>> @@ -119,7 +119,7 @@ etags-regen-regexp-alist
>>>>   ;;http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html
>>>>   (defcustom etags-regen-file-extensions
>>>>     '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp"
>>>> -    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl"
>>>> +    "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "pl" "pm"
>>>>       "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada")
>>>>     "Code file extensions for `etags-regen-mode'.
>>> 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.

As long as the additions are not misdetected often - false positives 
based on obscure languages might be a nuisance.

>> 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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 18:20       ` Dmitry Gutov
@ 2024-09-20 19:11         ` Eli Zaretskii
  2024-09-20 19:35           ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2024-09-20 19:11 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: spwhitton, emacs-devel

> 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.

> 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.

> >> 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.  Or maybe we should
add an option to etags to disable the fallback to Fortran.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 19:11         ` Eli Zaretskii
@ 2024-09-20 19:35           ` Dmitry Gutov
  2024-09-20 19:59             ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2024-09-20 19:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: spwhitton, emacs-devel

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30?
  2024-09-20 19:35           ` Dmitry Gutov
@ 2024-09-20 19:59             ` Dmitry Gutov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2024-09-20 19:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: spwhitton, emacs-devel

On 20/09/2024 22:35, Dmitry Gutov wrote:
>>> 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.

Maybe do that on master, though.

Scanning for tags in files that aren't considered code like .html or 
.texi, etc might create a lot more navigation locations, not all of them 
wanted in 'C-u M-.' completion.

I'm not actually sure it will be a problem, but it seems like a major 
enough change to allow for user feedback first.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-20 19:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-09-20 19:59             ` Dmitry Gutov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.