GNU bug report logs - #59813
29.0.60; function-history: M-. fails to jump to defun if straight.el straight-cache-autoloads is enabled

Previous Next

Package: emacs;

Reported by: Naofumi Yasufuku <naofumi <at> yasufuku.dev>

Date: Sun, 4 Dec 2022 09:45:02 UTC

Severity: normal

Tags: confirmed

Found in versions 29.0.60, 30.0.50

Full log


Message #18 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Naofumi Yasufuku <naofumi <at> yasufuku.dev>
Cc: 59813 <at> debbugs.gnu.org
Subject: Re: bug#59813: 29.0.60; function-history: M-. fails to jump to defun
 if straight.el straight-cache-autoloads is enabled
Date: Tue, 13 Dec 2022 13:30:06 -0800
tags 59813 + confirm
found 59813 30.0.50
thanks

Naofumi Yasufuku <naofumi <at> yasufuku.dev> writes:

> ----------------------------------------
> 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

Thanks for the clear recipe.

I can reproduce this on master, but not every time.  Sometimes it works
even after one `eval-buffer'.  For some reason, it seems to work more
often when I remove the third line with `message'?

Something definitely seems wrong with the autoloading and/or xref here.




This bug report was last modified 1 year and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.