all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64939@debbugs.gnu.org
Subject: bug#64939: 30.0.50; The default auto-mode-interpreter-regexp does not match env with flags
Date: Sun, 30 Jul 2023 11:38:06 +0200	[thread overview]
Message-ID: <87y1ix7myw.fsf@gmail.com> (raw)
In-Reply-To: <83y1iykn0q.fsf@gnu.org>


Eli Zaretskii <eliz@gnu.org> writes:

>> From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
>> Date: Sat, 29 Jul 2023 23:38:07 +0200
>> 
>> This is a very naive solution to the above, but I am probably
>> missing some knowledge here and will break for anyone setting 
>> the
>> var to something custom.
>
> Feel free to make this change locally, but I don't see how this 
> can be
> general enough for us to install it as the default value.
>

The problem is that even with a local change, the match group 2 is 
hard
coded. 

> For starters, 'env' can be invoked with several options, not 
> just with
> one.  Also, some 'env' options accept arguments, and how do we 
> know if
> the word that follows "env -OPTION" is the command to check 
> against
> interpreter-mode-alist or an argument of an option?
>

Understand, it is a bit complex perhaps. 

> IOW, I don't think this is a problem for a regexp-based 
> solution.  If
> we want to support such complex shebang lines (btw, does the 
> Posix or
> GNU/Linux shell support them?), we should analyze the text after 
> "env"
> to find the candidate interpreter.  Not sure whether even that 
> will
> provide a robust solution.
>

I can perhaps have a look if there is something concrete about how 
this
can be interpreted. 

> Btw, can't you satisfy your needs via file-local variables?

Not without convincing the project maintainers to add Emacs 
specific
lines to the code, which I don't really think is appropriate in 
some
cases.

It is not a common occurrence to run into this issue, but thought 
is
strange to not work as expected.  If I am the only one, then happy 
to
close this and just keep a local patch.





  reply	other threads:[~2023-07-30  9:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

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

  git send-email \
    --in-reply-to=87y1ix7myw.fsf@gmail.com \
    --to=wkirschbaum@gmail.com \
    --cc=64939@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 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.