From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#2807: Subject: 23.0.90; etags can't access .el.gz files Date: Thu, 12 Oct 2023 10:28:26 -0400 Message-ID: References: <49c2c28b-291c-4436-8443-77bf6949751c@gmail.com> <28afd2a3-1adc-42cf-ac2f-9bded2d0c22c@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20419"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pot@gnu.org, MON KEY , 2807@debbugs.gnu.org, prouleau001@gmail.com, 44494@debbugs.gnu.org, dgutov@yandex.ru, Lars Ingebrigtsen , Eli Zaretskii To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 12 16:29:04 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 1qqwgS-00052V-MU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Oct 2023 16:29:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqwg6-0007Qr-0D; Thu, 12 Oct 2023 10:28:42 -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 1qqwg4-0007QF-CM for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 10:28:40 -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 1qqwg4-0003rC-12 for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 10:28:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqwgQ-0004Qp-EC for bug-gnu-emacs@gnu.org; Thu, 12 Oct 2023 10:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Oct 2023 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 2807-submit@debbugs.gnu.org id=B2807.169712094117022 (code B ref 2807); Thu, 12 Oct 2023 14:29:02 +0000 Original-Received: (at 2807) by debbugs.gnu.org; 12 Oct 2023 14:29:01 +0000 Original-Received: from localhost ([127.0.0.1]:43983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqwgO-0004QT-L3 for submit@debbugs.gnu.org; Thu, 12 Oct 2023 10:29:00 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:5945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqwgL-0004QA-8H; Thu, 12 Oct 2023 10:28:59 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7271D805ED; Thu, 12 Oct 2023 10:28:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1697120908; bh=7oiolp+EaGzn7UAk7Y5K+KSGUX8p+5os9w0sgDtyg9M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HkOFpiUMQC/CsOxbT7qHybwFXOm6YtrG7/ei+T6EKPtlbaYJOGX1bM9LGuN79pQr6 3vLj/uOoHG0t+aufFxh1CHy0oNoK4jEpR80L9kOSET/bADHYy7pgm1eL3qJNql4FF6 jSOSX+VeO20Biuet4nLs/5DdyKaOwi8xfOg2ANRWcg7W16mXRMpUYP9zHozjRaxOBu WHsX8cjU6H6kE1FBKRvzGK/rO8/RhoRv9szEqYuIbN52OZjonv6fAKVyUggaIU8PjC DierlpNgjlf9o/Kw/DHotAInK7WbzMY+rXLfva1vjAZKcKgwFHYM3yTl7SxyolM9kQ mN+lx/WQ87Yqw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2ECDD8044E; Thu, 12 Oct 2023 10:28:28 -0400 (EDT) Original-Received: from pastel (69-165-150-80.dsl.teksavvy.com [69.165.150.80]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D90291202A1; Thu, 12 Oct 2023 10:28:27 -0400 (EDT) In-Reply-To: <28afd2a3-1adc-42cf-ac2f-9bded2d0c22c@gmail.com> (Mauro Aranda's message of "Thu, 12 Oct 2023 09:46:52 -0300") 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:272302 Archived-At: > +(defun etags--ensure-file (file) > + "Ensure FILE can be visited. > + > +FILE should be an expanded file name. > +This function tries to locate FILE, possibly adding it a suffix > +present in `tags-compression-info-list'. If the file can't be found, > +signals an error. > +Else, returns the filename that can be visited for sure." > + (let ((f (locate-file file nil tags-compression-info-list))) > + (unless f > + (signal 'file-missing (list "Cannot locate file in TAGS" file))) > + f)) The patch looks pretty good, but other parts of the code use check `auto-compression-mode` before using `tags-compression-info-list`, so we should probably do the same here. As other comments mention in the file, this arrangement is suboptimal because the search for compressed filenames should probably be moved to jka-compr's code (e.g. using `jka-compr-compression-info-list` rather than `tags-compression-info-list`). Historical side note: jka-compr used to have the ability to do what we want here "transparently" (it changed things like `find-file-noselect` to look for compressed versions of the file, among other things). IIRC it was removed when it got integrated into Emacs (don't know why but I assumed it was too hackish/ugly/costly/brittle). We should arguably re-add this feature, tho maybe not transparent, i.e. let packages who need that request that feature explicitly (like here). Stefan