From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs 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 Message-ID: <87y1ix7myw.fsf@gmail.com> References: <87mszebgwy.fsf@gmail.com> <878rays89s.fsf@gmail.com> <83y1iykn0q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33080"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: 64939@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 30 11:57:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qQ3Ai-0008Nv-GZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jul 2023 11:57:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQ2z1-0006KK-Vc; Sun, 30 Jul 2023 05:45:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQ2z0-0006Jw-AL for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 05:45:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQ2z0-0004Mo-2G for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 05:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQ2yz-0004Cm-NK for bug-gnu-emacs@gnu.org; Sun, 30 Jul 2023 05:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jul 2023 09:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64939 X-GNU-PR-Package: emacs Original-Received: via spool by 64939-submit@debbugs.gnu.org id=B64939.169071027416114 (code B ref 64939); Sun, 30 Jul 2023 09:45:01 +0000 Original-Received: (at 64939) by debbugs.gnu.org; 30 Jul 2023 09:44:34 +0000 Original-Received: from localhost ([127.0.0.1]:49402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ2yY-0004Bq-FF for submit@debbugs.gnu.org; Sun, 30 Jul 2023 05:44:34 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:46584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQ2yX-0004Be-8U for 64939@debbugs.gnu.org; Sun, 30 Jul 2023 05:44:33 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fc0aecf15bso40251435e9.1 for <64939@debbugs.gnu.org>; Sun, 30 Jul 2023 02:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690710267; x=1691315067; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=UrkFYVzPfKKjsVE0p1K+vAC1X7j+RAV1/NkY4GUFcXU=; b=lTd1rarXQd6+S/yNcIJnAF2Cvl7et4G8VZNTmNpRF4uYKBNPanyo390pfxNzJWib0G 8+LkgNEGrrP63ew8ZOtMKE0m/VKP9XZIyI6p9l8pBxI1M2eic8j23dTeE2NjKi03FL/S 28N1RaQYVyP/+J7xnKBnFWeiJQbAgYR5Rjnf6Hpigs7vCciLNJW7+AGsiCseQwDJgP52 IlRN16pI0Vmgmau7tKPRusbIWD5wAMrv3B2mSSWW4btaODCv6bvJVRUTRAPHx9BpiCfl DDtchTvPxlI5bbzEO2gs0644IyLakqhU/OVQZfRhUvHbEZEGvGjwlpDe13uW4l3ZqAjW QMxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690710267; x=1691315067; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=UrkFYVzPfKKjsVE0p1K+vAC1X7j+RAV1/NkY4GUFcXU=; b=Gw0lfd916rRoqvf3oS4GGLvFQeRFypBe9kKWNFa3RphEyofIZffSQ7pBKZUbFsM/kY igxa6Xs2jIdn1zXh0rOwnkNF5L2ua/+uj+338FZdDsyQMCa2fm0N5L5CoJlzILqb60Mv LzsiRdRlgNBdSvoTjUWTQHUThVB8tE9czEQPqd0Q+UsR/IPITkrTsa0t7I7vnTfwz5Ap AtIxlJxAeYlrOSEYumG1reSNs3PtRY+Tf4ABSXMGa2lJJgOqbCcft9P3LRsEzK10pzFU RXT81BFVlxpR6tF0sDC6OD/dyFW2zwi73X7CJbsg6SPssaOWPpSMq6vmERNhM0mhud0C dyyw== X-Gm-Message-State: ABy/qLb/MkBvzrKqXyrtaFTVYa9jeODDlrlXcQSN3amfyQhWRgFl20ur 9dNxp8lrRGybKS+v5niyWFIqNA9633Y= X-Google-Smtp-Source: APBJJlER23WDcvJdwNqpAGgMWDyllMHup5a69REy6NxuqK9ld5LhhFIQPRiA8C1vyFYzx7MeMjWcJw== X-Received: by 2002:a1c:f711:0:b0:3fa:96ad:5d2e with SMTP id v17-20020a1cf711000000b003fa96ad5d2emr6031824wmh.19.1690710266937; Sun, 30 Jul 2023 02:44:26 -0700 (PDT) Original-Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id k14-20020adfe3ce000000b00317643a93f4sm9573468wrm.96.2023.07.30.02.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 02:44:26 -0700 (PDT) In-reply-to: <83y1iykn0q.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266360 Archived-At: Eli Zaretskii writes: >> From: Wilhelm Kirschbaum >> 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.