From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Missing entries for Perl in etags-regen-file-extensions -- okay for emacs-30? Date: Fri, 20 Sep 2024 22:35:11 +0300 Message-ID: <690fff1d-b8f2-4e6e-b105-21ca97a0a92e@gutov.dev> References: <87y13mznw9.fsf@zephyr.silentflame.com> <86h6aa7gw1.fsf@gnu.org> <87ploya1hc.fsf@zephyr.silentflame.com> <867cb67888.fsf@gnu.org> <10dd3554-4249-41d1-864d-30cab687da6a@gutov.dev> <86o74i5edp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="584"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: spwhitton@spwhitton.name, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 20 21:35:50 2024 Return-path: Envelope-to: ged-emacs-devel@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 1srjPx-000AVU-SQ for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Sep 2024 21:35:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srjPa-0000E6-Kn; Fri, 20 Sep 2024 15:35:26 -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 1srjPX-0000Du-Q3 for emacs-devel@gnu.org; Fri, 20 Sep 2024 15:35:24 -0400 Original-Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1srjPU-0005cD-08; Fri, 20 Sep 2024 15:35:22 -0400 Original-Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 421F611401D6; Fri, 20 Sep 2024 15:35:15 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Fri, 20 Sep 2024 15:35:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1726860915; x=1726947315; bh=7c1M2KuWEuseLwYu5y0I7LyoJaDnpo/2tZT0f2SIsj0=; b= VQ/dVI5UZg4Fg7wWlD/EIrD2t/0b51NSnul/epTpLSFaO0Q3SwnqtMg3bWvpC+HY mmJZ5HeORbtne3/rewj5r8L165upGtN0iVvCM/o+2i4mc+iAfCPPp04h9WbdKBsW wzqmg6mtZ7CnWCESF/kXX1lzhi/OvcuOSPqIdHkW/mOiE7yfGk+/6W5Mg4vNxXLh AxGuXo6CB1pC0Qwkyvr5UvpopLtleLVYqcXLGooLmKgP4jBuzaWCqbt9Q3VcglW7 1smdFRkJBcf6vH12jQuAb7kMxdV1bgih1mdgae25Y/4iwi7zqJ11LwrnamnMLdas 2MznxnTVAWJIRb2w0MKuUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1726860915; x= 1726947315; bh=7c1M2KuWEuseLwYu5y0I7LyoJaDnpo/2tZT0f2SIsj0=; b=Z +pihJNAATjyhnNHvgjEcqThXsgGrOjAwtkU52BgrZ/vP8hoOXZU478OhnHO6TNoq bD6odO9p2dYvRH1n1VyPto7R/X4k0VIFkUjqyEfOS7Zj2RFXIY0c+INRIytu3tc5 cRZvlMz3hAHJESbqeqI6ET0g2Fei40RtcWERPRcWgPbfaj/ORPDYIuDCdEjAi8Ng 8dBY1GWLDTVrTTzdZtqYxJL15qqdY72PwpfRVd3SaoPPAfKzrh9UaKe+06uMR+8i PAGz57ga+tDxoTGrRjcn0TpFIyVSMlnC822T/977qfGQpXXxdaRjilpTrLusxv+h k2PaE0BXt0BJDinB0HznA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelfedgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd guvghvqeenucggtffrrghtthgvrhhnpeffieefvdelueektdfgleeigedugfevkeefjeev jeffteffueeuueeghfevieduvdenucffohhmrghinhepghhnuhdrohhrghenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhu thhovhdruggvvhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepvghmrggtshdquggvvhgvlhesgh hnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Sep 2024 15:35:13 -0400 (EDT) Content-Language: en-US In-Reply-To: <86o74i5edp.fsf@gnu.org> Received-SPF: pass client-ip=103.168.172.153; envelope-from=dmitry@gutov.dev; helo=fhigh2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323862 Archived-At: 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 >> >>>>> 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.