From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59813: 29.0.60; function-history: M-. fails to jump to defun if straight.el straight-cache-autoloads is enabled Date: Wed, 14 Dec 2022 05:26:18 +0200 Message-ID: <83h6xyoecl.fsf@gnu.org> References: <86fsdvmrkf.fsf@yasufuku.dev> <86r0x312ez.fsf@yasufuku.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59813@debbugs.gnu.org, stefankangas@gmail.com To: Naofumi Yasufuku Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 14 04:27:23 2022 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 1p5IQV-0004jz-1X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Dec 2022 04:27:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5IQB-0002R0-Ua; Tue, 13 Dec 2022 22:27:03 -0500 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 1p5IQA-0002Qr-Kx for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 22:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5IQA-0007zw-D8 for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 22:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5IQ9-00012l-Rg for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 22:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Dec 2022 03:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59813 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo Original-Received: via spool by 59813-submit@debbugs.gnu.org id=B59813.16709883824000 (code B ref 59813); Wed, 14 Dec 2022 03:27:01 +0000 Original-Received: (at 59813) by debbugs.gnu.org; 14 Dec 2022 03:26:22 +0000 Original-Received: from localhost ([127.0.0.1]:36303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5IPV-00012S-Pf for submit@debbugs.gnu.org; Tue, 13 Dec 2022 22:26:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5IPT-00012M-Nu for 59813@debbugs.gnu.org; Tue, 13 Dec 2022 22:26:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5IPO-0007q9-7R; Tue, 13 Dec 2022 22:26:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/+t2DgjIQynunfn6quds4BBorAfVIDuVcwGZJY6etJg=; b=hm/Eg6WnKArH TLSeUa6F9/U/4mICObk5Oc5XnNjX0zbaSjPR5NilB8izO7/pssjth9fuA1Diu1Bxf/Svw533MliDd WPIhbahlEl8xZuWDtIRVC0xfN0t74q/fTSqgV4S4e+T+oQlnlubqUZ32UnYoYhDCZwIVs+EUcdm/j iYC9Qjn+8M6MPOOKcjRv0qJV47sgvWfxmm7DHaxWk/L6C1M8HszbHRE6mKVRQYWWi7RvYfZPG8Trk ZARtHYWPMlET5FQNjahBvNOc79FiYeVzUr1//qeUUq8074k5YzdNSpHtT54LAX9PgS8inffgmlrIj I3C/tbeWvr6c3wQW9THQQw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5IPN-0005a3-Ge; Tue, 13 Dec 2022 22:26:13 -0500 In-Reply-To: <86r0x312ez.fsf@yasufuku.dev> (message from Naofumi Yasufuku on Wed, 14 Dec 2022 05:20:20 +0900) 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:250913 Archived-At: > Cc: 59813@debbugs.gnu.org > From: Naofumi Yasufuku > Date: Wed, 14 Dec 2022 05:20:20 +0900 > > 1. Create the following file > > ~/.emacs.d/site-lisp/loadhist--foo.el > > #+begin_src emacs-lisp > (defun loadhist--foo-inc (x) (1+ x)) > (provide 'loadhist--foo) > #+end_src > > ---------------------------------------- > 2. emacs -Q > > ---------------------------------------- > 3. Insert the following to *scratch* > > #+begin_src emacs-lisp > (setq load-path (cons (locate-user-emacs-file "site-lisp") load-path)) > (autoload 'loadhist--foo-inc "loadhist--foo") > (message "(loadhist--foo-inc 1): %s" (loadhist--foo-inc 1)) > #+end_src > > ---------------------------------------- > 4. In *scratch*, M-x eval-buffer > > ---------------------------------------- > 5. M-. on `loadhist--foo-inc' > => > xref--not-found-error: No definitions found for: loadhist--foo-inc > > ---------------------------------------- > 6. In *scratch*, M-x eval-buffer again > > ---------------------------------------- > 5. M-. on `loadhist--foo-inc' > => > Jumps to defun in ~/.emacs.d/site-lisp/loadhist--foo.el I'm not sure I understand the issue, and I'm not familiar with straight.el, but if the above somehow prevents the function from being loaded, it is expected that M-. will fail. Its ELisp backend works only for loaded functions. If you want it to work for functions that aren't loaded, you need to manually switch the backend to etags. So if the above scenario worked with Emacs 28, I suggest to check whether the function was being loaded with Emacs 28.