[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57674: 29.0.50; `backtrace-goto-source' function broken.
From: |
Lars Ingebrigtsen |
Subject: |
bug#57674: 29.0.50; `backtrace-goto-source' function broken. |
Date: |
Thu, 08 Sep 2022 15:06:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com> writes:
> M-x debug-on-entry <RET> backtrace-goto-source <RET>
> M-x backtrace-goto-source <RET>
> Select a frame.
> Press "s"
> press "c" in the new backtrace.
> It should appears Source code location not known in the echo area.
I can reproduce this problem (but adding the debug-on-entry to
backtrace-goto-source just makes things more confusing).
The problem seems to be that
(nth (backtrace-get-index) backtrace-frames)
returns a frame without a :source-available entry here:
(defun backtrace-goto-source ()
"If its location is known, jump to the source code for the frame at point."
(interactive)
(let* ((index (or (backtrace-get-index) (user-error "Not in a stack frame")))
(frame (nth index backtrace-frames))
(source-available (plist-get (backtrace-frame-flags frame)
:source-available)))
(unless (and source-available
(run-hook-with-args-until-success
'backtrace-goto-source-functions))
(user-error "Source code location not known"))))
I'm pretty unfamiliar with backtrace.el, but I can't see that slot being
added anywhere there? edebug does add it, but isn't involved in any way
here. So it looks like something has gotten lost over the years?
However, `RET' on a symbol finds the sounds just fine, which is probably
why nobody has noticed this problem. I.e., nobody's using the `s'
command in *Backtrace* buffers.