unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>
Cc: 57674@debbugs.gnu.org
Subject: bug#57674: 29.0.50; `backtrace-goto-source' function broken.
Date: Thu, 08 Sep 2022 15:06:41 +0200	[thread overview]
Message-ID: <87bkrq2exq.fsf@gnus.org> (raw)
In-Reply-To: <87illyvyvi.fsf@gmail.com> (Michelangelo Rodriguez's message of "Thu, 08 Sep 2022 14:23:13 +0200")

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.





  reply	other threads:[~2022-09-08 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 12:23 bug#57674: 29.0.50; `backtrace-goto-source' function broken Michelangelo Rodriguez
2022-09-08 13:06 ` Lars Ingebrigtsen [this message]
2022-09-08 13:08   ` Lars Ingebrigtsen
2022-09-09 17:29     ` Lars Ingebrigtsen
     [not found]       ` <874jxgl232.fsf@gmail.com>
2022-09-09 20:41         ` Lars Ingebrigtsen
2022-09-09 22:31           ` Michelangelo Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkrq2exq.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=57674@debbugs.gnu.org \
    --cc=michelangelo.rodriguez@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).