unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Why do emacs backtraces lack line numbers?
Date: Tue, 20 Dec 2022 21:34:25 +0200	[thread overview]
Message-ID: <83k02lc1j2.fsf@gnu.org> (raw)
In-Reply-To: <CAJnXXohPU9VTCPO4-4Jm7a-kfsaOCheacnFZrQcmCABRz1paow@mail.gmail.com> (message from John Yates on Tue, 20 Dec 2022 11:50:46 -0500)

> From: John Yates <john@yates-sheets.org>
> Date: Tue, 20 Dec 2022 11:50:46 -0500
> 
> I am doing my first significant bit of coding in elisp.
> 
> Relative to other environments that I have used, something
> that I miss sorely is line numbers in backtraces.
> 
> What explains their absence?

The line information needs to be recorded somewhere, before it can be
presented.  In compiled programs, for example, the compiler records
the line-number information in the debug info it generates.

None of this is present in Lisp, and moreover, until Emacs 29 the byte
compiler didn't even have a good idea of which line number it is
processing at any given time.

So I guess the simple answer is: because Emacs doesn't know.



      parent reply	other threads:[~2022-12-20 19:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 16:50 Why do emacs backtraces lack line numbers? John Yates
2022-12-20 18:56 ` Emanuel Berg
2022-12-20 19:34 ` Eli Zaretskii [this message]

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=83k02lc1j2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).