From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.bugs Subject: bug#44494: etags.el xref-location-marker does not handle TAGS references to .el.gz files Date: Fri, 6 Nov 2020 22:31:02 -0500 Message-ID: References: <1cdac9f7-8340-83eb-f619-583e028e6e23@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000095f0c05b37bf6c2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40565"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44494@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 04:32:45 2020 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 1kbEy4-000APV-6N for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 04:32:44 +0100 Original-Received: from localhost ([::1]:45854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbEy3-0008HG-5O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 22:32:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbExO-0007vm-An for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 22:32:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbExN-0002XW-W2 for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 22:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbExN-00040b-TB for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 22:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Rouleau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2020 03:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44494 X-GNU-PR-Package: emacs Original-Received: via spool by 44494-submit@debbugs.gnu.org id=B44494.160471988215363 (code B ref 44494); Sat, 07 Nov 2020 03:32:01 +0000 Original-Received: (at 44494) by debbugs.gnu.org; 7 Nov 2020 03:31:22 +0000 Original-Received: from localhost ([127.0.0.1]:57764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbEwj-0003zj-FU for submit@debbugs.gnu.org; Fri, 06 Nov 2020 22:31:21 -0500 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:39856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbEwh-0003zV-KW for 44494@debbugs.gnu.org; Fri, 06 Nov 2020 22:31:20 -0500 Original-Received: by mail-wr1-f49.google.com with SMTP id y12so3246785wrp.6 for <44494@debbugs.gnu.org>; Fri, 06 Nov 2020 19:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NbKSjzAKj1rbqtZiHNh2Kh5yTNBy0shbI6akm3KwIRc=; b=a77FkbiKOZdOjCw/tg5AKb/CaKJhMCglbw7Gz/GcPp8ACCCs7PVwvF726IzjmeMKvI jgW9W+gt863k6SpdosTCMAM8ssMI0c4VOsOFJpqsO6R6TywdxkgyVXtJDyWzX3lpYVWx VQklPU8RONYO1x/YPlup2GIR5D2pCMzQMwRSndXyDtrbzjju9serY3zwlGJEj5cRtoiD bkyNIyNeWb5RLlWTG2/Y2083e9Araqq3mcK2nF8VDGX/L8besAK5Ypwc+uDh+f0Zrwj/ CZ7KeaZez0ts7wR8kthbvuuchSH+LDhaWUSYxg5csYcmoS+FWH/rFeVIBg+xTv61Wgvv mLQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NbKSjzAKj1rbqtZiHNh2Kh5yTNBy0shbI6akm3KwIRc=; b=CSjh5anmDaouGy5jMGYBUewBc/YWB2xpnPooc1Q6Rbri/3NhiO3r1R5LBpTBAYpRDB 0FZFhgJW+Pm3/Gtd0oRK2Wac4CJ0c2Q/eM53TXo3uwcjS2CvIK1JVZrtooQI8Xt5zUf/ S4EwJjEl/E7dxuq5JDvbaow/5fGvylx382XFXWXlqE3yrjtUVG/pZIadNieNb9hmPiS5 ILLmDYUaS7HXxhzRej9r9S7IiQD8tRpY001AXYrZpKyNJUZ6TFBca7VB1bX90hKRGvYk Y6fUga7zHOonJYOzE1NIEZqcFat9V8DgA1VZF0VmTMuT/uV39q8rUvcBlZ9GWMsR2Qb+ XwBA== X-Gm-Message-State: AOAM533skdQeJwQBFYuIbFzz45gLaqOc9zV2lUNGEQh7pybWrpQmgatp w5u46oASICROVWRYksHMhrqPUDT84QjzVdA4ESc= X-Google-Smtp-Source: ABdhPJxTLl1WCoOGRqiwXYsGS0mDGrY5QiMc0PZCH2B6SMVz6vKwpMN0bvWlE07FofOKAAcSfVNwC9PWqy67Bg7fTtU= X-Received: by 2002:a5d:4104:: with SMTP id l4mr4400701wrp.276.1604719873710; Fri, 06 Nov 2020 19:31:13 -0800 (PST) In-Reply-To: <1cdac9f7-8340-83eb-f619-583e028e6e23@yandex.ru> 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" Xref: news.gmane.io gmane.emacs.bugs:192809 Archived-At: --000000000000095f0c05b37bf6c2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 6, 2020 at 9:22 PM Dmitry Gutov wrote: > On 07.11.2020 01:22, Pierre Rouleau wrote: > > This problem was detected in emacs 26.3, but is also present in emacs > > 27.1, according to the code posted inside > > > https://github.com/emacs-mirror/emacs/blob/master/test/manual/etags/el-sr= c/emacs/lisp/progmodes/etags.el#L2139 > > Hi! > > Do you see the same problem with 'M-x find-tag'? > Short answer: yes Longer answer: you can try it on Emacs lib files. For example, I created a TAGS file that contains the following: define-globalized-minor-mode global-prettify-symbols-mode^?247,10355 (define-derived-mode prog-mode ^?251,10485 ^L /usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/progmodes/cc-bytecomp.el= ,1014 (defvar cc-bytecomp-unbound-variables ^?76,2968 (defvar cc-bytecomp-original-functions ^?77,3011 (defvar cc-bytecomp-original-properties ^?78,3055 (defvar cc-bytecomp-loaded-files ^?79,3100 (defvar cc-bytecomp-environment-set ^?86,3302 (defmacro cc-bytecomp-debug-msg ^?88,3344 (defun cc-bytecomp-compiling-or-loading ^?93,3432 (defsubst cc-bytecomp-is-compiling ^?134,4714 (defsubst cc-bytecomp-is-loading ^?138,4857 (defun cc-bytecomp-setup-environment ^?143,5065 (defun cc-bytecomp-restore-environment ^?191,6703 (defun cc-bytecomp-load ^?256,8749 (defmacro cc-require ^?293,10222 (defmacro cc-conditional-require ^?305,10617 (defmacro cc-conditional-require-after-load ^?318,11068 (defmacro cc-provide ^?333,11627 (defmacro cc-load ^?340,11887 (defmacro cc-require-when-compile ^?351,12266 (defmacro cc-external-require ^?362,12703 (defmacro cc-bytecomp-defvar ^?371,13055 (defmacro cc-bytecomp-defun ^?392,13857 (defmacro cc-bytecomp-put ^?419,14990 (defmacro cc-bytecomp-boundp ^?437,15739 (defmacro cc-bytecomp-fboundp ^?447,16140 ^L /usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/progmodes/make-mode.el,6= 494 (defgroup makefile ^?95,3661 (defface makefile-space^?101,3839 (defface makefile-targets^?107,4026 (defface makefile-shell^?114,4302 Then with the file /usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/progmodes/cc-cmds.el.gz in a buffer and cc-bytecomp not loaded trying both M-x xref-find-definitions cc-require and M-x find-tag cc-require I get: Rerun etags: =E2=80=98^(defmacro cc-require =E2=80=99 not found in /usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/progmodes/cc-bytecomp.el If I update the etags.el with my suggested code, M-x xref-find-definition works but find-tag still does not. Since find-tag is obsolete since emacs 25.1 I did not look into it. I did not look into the etags utility itself yet. This looks like a consistency problem. I would think that the etags utility should generate a reference for el.gz files listing the real file name. On the other hand having the fix in both places both in etags utility and in emacs etags.el would reduce probability of errors. --=20 /Pierre --000000000000095f0c05b37bf6c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 6, 2020 at 9:22 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
On 07.11.2020 01:22, Pierre Rouleau wro= te:
> This problem was detected in emacs 26.3, but is also present in emacs =
> 27.1, according to the code posted inside
> https://github.com/emacs-mirror/emacs/blob/master/test/manua= l/etags/el-src/emacs/lisp/progmodes/etags.el#L2139

Hi!

Do you see the same problem with 'M-x find-tag'?

Short answer:=C2=A0 yes

Longer a= nswer:=C2=A0 you can try it on Emacs lib files.=C2=A0

For example, I created a TAGS file that contains the following:

define-globalized-minor-m= ode global-prettify-symbols-mode^?247,10355
(define-derived-mode prog-mo= de ^?251,10485
^L
/usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/= progmodes/cc-bytecomp.el,1014
(defvar cc-bytecomp-unbound-variables ^?76= ,2968
(defvar cc-bytecomp-original-functions ^?77,3011
(defvar cc-byt= ecomp-original-properties ^?78,3055
(defvar cc-bytecomp-loaded-files ^?7= 9,3100
(defvar cc-bytecomp-environment-set ^?86,3302
(defmacro cc-byt= ecomp-debug-msg ^?88,3344
(defun cc-bytecomp-compiling-or-loading ^?93,3= 432
(defsubst cc-bytecomp-is-compiling ^?134,4714
(defsubst cc-byteco= mp-is-loading ^?138,4857
(defun cc-bytecomp-setup-environment ^?143,5065=
(defun cc-bytecomp-restore-environment ^?191,6703
(defun cc-bytecomp= -load ^?256,8749
(defmacro cc-require ^?293,10222
(defmacro cc-condit= ional-require ^?305,10617
(defmacro cc-conditional-require-after-load ^?= 318,11068
(defmacro cc-provide ^?333,11627
(defmacro cc-load ^?340,11= 887
(defmacro cc-require-when-compile ^?351,12266
(defmacro cc-extern= al-require ^?362,12703
(defmacro cc-bytecomp-defvar ^?371,13055
(defm= acro cc-bytecomp-defun ^?392,13857
(defmacro cc-bytecomp-put ^?419,14990=
(defmacro cc-bytecomp-boundp ^?437,15739
(defmacro cc-bytecomp-fboun= dp ^?447,16140
^L
/usr/local/Cellar/emacs/26.3/share/emacs/26.3/lisp/= progmodes/make-mode.el,6494
(defgroup makefile ^?95,3661
(defface mak= efile-space^?101,3839
(defface makefile-targets^?107,4026
(defface ma= kefile-shell^?114,4302

=
Then with the file /usr/local/Cellar/emacs/26.3/share/emacs/= 26.3/lisp/progmodes/cc-cmds.el.gz in a buffer and cc-bytecomp not loaded tr= ying both

M-x xref-find-definitions cc-require
=

and

M-x find-tag cc-requ= ire

I get:

Rerun= etags: =E2=80=98^(defmacro cc-require =E2=80=99 not found in /usr/local/Ce= llar/emacs/26.3/share/emacs/26.3/lisp/progmodes/cc-bytecomp.el
<= br clear=3D"all">
If I update the etags.el with my suggested code, M-x = xref-find-definition works but find-tag still does not.=C2=A0=C2=A0=C2=A0 <= br>
Since find-tag is obsolete since emacs 25.1 I did not look in= to it.


I did not look into the etag= s utility itself yet.=C2=A0 This looks like a consistency problem.=C2=A0
I would think that the etags utility should generate a referen= ce for el.gz files listing
the real file name.=C2=A0 On the = other hand having the fix in both places both in etags utility
a= nd in emacs etags.el would reduce probability of errors.

--
/Pi= erre
--000000000000095f0c05b37bf6c2--