bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not ma


From: Wilhelm Kirschbaum
Subject: bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not match env with flags
Date: Sat, 29 Jul 2023 22:08:19 +0200
User-agent: mu4e 1.9.3; emacs 30.0.50


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]