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: Mon, 23 Sep 2024 19:57:09 +0300 Message-ID: <781dac6e-5504-4b7d-903d-71fc5d09da0f@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> <690fff1d-b8f2-4e6e-b105-21ca97a0a92e@gutov.dev> <86ldzl5vzj.fsf@gnu.org> <3b153949-c990-49c9-9618-28850d3ee57c@gutov.dev> <86sett2g43.fsf@gnu.org> <86cykw2rkl.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="25308"; 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 Mon Sep 23 18:57:40 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 1ssmNY-0006Qo-Bc for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 18:57:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssmNF-0005RX-Ui; Mon, 23 Sep 2024 12:57:21 -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 1ssmNE-0005LR-CL for emacs-devel@gnu.org; Mon, 23 Sep 2024 12:57:20 -0400 Original-Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssmNB-0004ES-GK; Mon, 23 Sep 2024 12:57:20 -0400 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id F0A8A1380217; Mon, 23 Sep 2024 12:57:13 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 23 Sep 2024 12:57:13 -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=1727110633; x=1727197033; bh=Fww1y8kYUjeuNKgAri7ABu+U3V+3s3w6yOWyUCU9+DA=; b= fBcaFtzH/LFp/zWV5Mlm7QNGhu9F32KWF5u+KSQHqxtt3EzVHkfewGOz+75nsLMX 7B2Gi4qsCKiP/vQ35uUxcFvs/nx6kB7DRjbserD923EAlolyf5P5/fQE/boqvf30 KBWit/OMo/2RvpKIaRg3acxvcU8CRPVz6iXa5A3h1vyntU/dMv6rw1HLCUcOQp15 JSSwn26glrvg8kEVHwMFHCQDddhh687aExHdTcwmF0CeCZlZle5tN2s9bCbQw1Je lOXtrM/P7d4BfRP7SkGmAOOz+Q5aS/WQqXchnPTkTuZWTf3brjFHG2hvOiGa++gX lQv5G45eE93nWYVSfEC3yQ== 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=1727110633; x= 1727197033; bh=Fww1y8kYUjeuNKgAri7ABu+U3V+3s3w6yOWyUCU9+DA=; b=p Rn+KpmWUgbFBqOykKAzxbcuzK6Mi2PvRbK1BIXkX87YE0tIrhceM6Db9Erm5I3h2 8OwZWMSTkKZjFzYm2DmlV6S828yzq+gUhiKoNlHI016sUOR6ceqX5PUT0GJntaWR oZcjN60EquvPkZ1Ew6N3BlPTJvc/AxlYvZcRif0ZD0vxyTTDzbFKSYWM8aprpLnM GBUe21rlY5dSCIU7pw6whMs0yrOwpc9evbTTE/zrehDxCQGrOeeh04bbI33R0LAz S+FFYPTafsg9pY12GclaTg8uDsyUoNMEq+fKZ+581QCCj7mVIx64n3IP3sLi8/Wh X277hCOQKCvAB6Ypj7Ibg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelledguddtkecutefuodetggdotefrod 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; Mon, 23 Sep 2024 12:57:12 -0400 (EDT) Content-Language: en-US In-Reply-To: <86cykw2rkl.fsf@gnu.org> Received-SPF: pass client-ip=103.168.172.151; envelope-from=dmitry@gutov.dev; helo=fout-a8-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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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:323979 Archived-At: On 22/09/2024 08:19, Eli Zaretskii wrote: >> Date: Sun, 22 Sep 2024 04:09:22 +0300 >> Cc: spwhitton@spwhitton.name, emacs-devel@gnu.org >> From: Dmitry Gutov >> >> On 21/09/2024 18:14, Eli Zaretskii wrote: >> >>> If you have reservations about some of the extensions, let's exclude >>> them for now. I believe there are just a few of them, while the vast >>> majority should present no problem, right? I'm okay with leaving out >>> HTML and Texinfo. Are there more of those? TeX, perhaps? >> >> TeX yes. I'm also not sure about PostScript - but really because I still >> don't know how a function definition in that language looks, even after >> skimming through a manual. >> >> Speaking of other extensions, isn't ".a" usually a compiled library >> rather than ASM source code? Also curious about ".t" for Scheme and >> ".ml" for Lisp. > > Fine, let's exclude all of these. It still leaves quite a lot. Great! Here's the combined diff I plan to install: - More extensions. - case-fold-search bound to t, so extension matching is not case-sensitive. - string-match-p for etags-regen-ignores entries, minor speed bump. - *.a removed from the list, though it previously was in it (like discussed in this thread). - *.def and *.inc also not added because I see .def being used for "module definition files", and .inc files sometimes have C-like contents, and sometimes SGML (with ASM in just a few examples). In the mozilla/gecko-dev checkout I tested, that is, to see how the change would affect indexing. diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el index a8e67197070..11073c76ac6 100644 --- a/lisp/progmodes/etags-regen.el +++ b/lisp/progmodes/etags-regen.el @@ -118,9 +118,13 @@ etags-regen-regexp-alist ;; when it cannot determine the type of the file. ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html (defcustom etags-regen-file-extensions - '("rb" "js" "py" "pl" "pm" "el" "c" "cpp" "cc" "h" "hh" "hpp" - "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" - "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada") + '("ads" "adb" "ada" "asm" "ins" "s" "sa" "S" "src" + "c" "h" "c++" "cc" "cpp" "cxx" "h++" "hh" "hpp" "hxx" "m" "pdb" + "cs" "hs" "erl" "hrl" "fth" "tok" "f" "f90" "for" "go" + "java" "cl" "clisp" "el" "lisp" "lsp" "lua" "lm" "p" "pas" + "pl" "pm" "php" "php3" "php4" "pc" "prolog" "py" "rb" "ru" "rbw" + "rs" "oak" "rkt" "sch" "scheme" "scm" "sm" "ss" + "y" "y++" "ym" "yxx" "yy") "Code file extensions for `etags-regen-mode'. File extensions to generate the tags for." @@ -242,11 +246,12 @@ etags-regen--all-files (ir-start (1- (length root))) (ignores-regexps (mapcar #'etags-regen--ignore-regexp - etags-regen-ignores))) + etags-regen-ignores)) + (case-fold-search t)) (cl-delete-if (lambda (f) (or (not (string-match-p match-re f)) (string-match-p "/\\.#" f) ;Backup files. - (cl-some (lambda (ignore) (string-match ignore f ir-start)) + (cl-some (lambda (ignore) (string-match-p ignore f ir-start)) ignores-regexps))) files))) WDYT?