Subject: Re: bug#1428: backtrace from edebug does not have links

From: Michael Heerdegen <[email-masked]>
Date: Tue, 14 Feb 2012 00:44:55 +0100

Dan Nicolaescu <[email-masked]> writes:

> In edebug when using d to show the backtrace, the *Backtrace* buffer
> does not have links to the functions that you get in the *Backtrace*
> buffer when using debug-on-error.  
> It would be nice if the links would work for the edebug case too.

Maybe nobody implements that because `edebug-backtrace' is planned to be
rewritten so that it gets better than "Better than nothing..." (see
docstring)?

However, until that happens, maybe this problem should be solved.

Can't we just append some code like this:

  (goto-char (point-min))
  (while (progn
  	 (goto-char (+ (point) 2))
           (skip-syntax-forward "^w_")
           (not (eobp)))
    (let* ((beg (point))
           (end (progn (skip-syntax-forward "w_") (point)))
           (sym (intern-soft (buffer-substring-no-properties
                              beg end)))
           (file (and sym (symbol-file sym 'defun))))
      (when file
        (goto-char beg)
        ;; help-xref-button needs to operate on something matched
        ;; by a regexp, so set that up for it.
        (re-search-forward "\\(\\sw\\|\\s_\\)+")
        (help-xref-button 0 'help-function-def sym file)))
    (forward-line 1))

to `edebug-backtrace' (the code is from `debugger-make-xrefs')?

Thanks,

Michael.