unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not match env with flags
@ 2023-07-29 20:08 Wilhelm Kirschbaum
  2023-07-29 21:38 ` Wilhelm Kirschbaum
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Wilhelm Kirschbaum @ 2023-07-29 20:08 UTC (permalink / raw)
  To: 64939


A file without an extension will load ruby-mode if the first line 
is:

    #!/usr/bin/env ruby

but not when the first line is:

    #!/usr/bin/env -S ruby -e 'puts 123'

Is there any reason why the latter should not be matched by the 
default
`auto-mode-interpreter-regexp' value in 'files.el'?


A more useful example I stumbled on today while working on a 
language
server after adding:

`(add-to-list 'interpreter-mode-alist '("elixir" 
. elixir-ts-mode))'


    #!/usr/bin/env -S elixir --erl "-kernel standard_io_encoding 
    latin1"

    Node.start(:"next-ls-#{System.system_time()}", :shortnames)
    ....



Wilhelm





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

end of thread, other threads:[~2024-02-28 17:57 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-29 20:08 bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not match env with flags Wilhelm Kirschbaum
2023-07-29 21:38 ` Wilhelm Kirschbaum
2023-07-30  5:04   ` Eli Zaretskii
2023-07-30  9:38     ` Wilhelm Kirschbaum
2023-07-30 10:04       ` Eli Zaretskii
2023-07-31  7:11         ` Wilhelm Kirschbaum
2023-07-31 17:38       ` Juri Linkov
2023-08-01  6:20         ` Wilhelm Kirschbaum
2023-07-30  4:53 ` Eli Zaretskii
2023-07-30  8:28   ` Wilhelm Kirschbaum
2023-07-30 10:03     ` Eli Zaretskii
2023-07-30 10:27       ` Wilhelm Kirschbaum
2024-01-31 19:52 ` bug#64939: Malcolm Cook
2024-02-01 18:52 ` bug#64939: Malcolm Cook
2024-02-10  8:27   ` bug#64939: Eli Zaretskii
2024-02-10 10:23     ` bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not match env with flags Kévin Le Gouguec
2024-02-10 17:08       ` Kévin Le Gouguec
2024-02-10 17:23         ` Malcolm Cook
2024-02-17  8:33           ` Eli Zaretskii
2024-02-28 17:57             ` Wilhelm Kirschbaum

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