all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9462: 24.0.50; Initial point in debugger
@ 2011-09-08  9:03 Helmut Eller
  2011-09-10 18:13 ` Helmut Eller
  0 siblings, 1 reply; 3+ messages in thread
From: Helmut Eller @ 2011-09-08  9:03 UTC (permalink / raw
  To: 9462

When entering the debugger, point is placed at seemingly random
positions.  E.g. executing this file

(progn
  (defun foo (n)
    (cond ((zerop n) (debug))
	  (t (foo (1- n)))))
  (foo 100))

with emacs -Q -l foo.el opens a *Backtrace* buffer but the cursor is
somewhere near the end of the buffer.  When debugging other code, it's
often somewhere in the middle sometimes at the beginning.

In the old days, point was consistently placed at the first line of the
backtrace (top-of-stack).  That was more useful: it was easier to see
the error message; using d was more convenient as the first line is
almost always the most interesting one.




In GNU Emacs 24.0.50.4 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2011-09-05 on ix
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--enable-asserts' '--enable-checking' '--with-gif=no' '--with-gnutls=no' 'CFLAGS=-g3 -O0''





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9462: 24.0.50; Initial point in debugger
  2011-09-08  9:03 bug#9462: 24.0.50; Initial point in debugger Helmut Eller
@ 2011-09-10 18:13 ` Helmut Eller
  2011-09-13 21:04   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Helmut Eller @ 2011-09-10 18:13 UTC (permalink / raw
  To: 9462

* Helmut Eller [2011-09-08 09:03] writes:

> When entering the debugger, point is placed at seemingly random
> positions.

I think this would fix the problem:

=== modified file 'lisp/emacs-lisp/debug.el'
--- lisp/emacs-lisp/debug.el	2011-08-22 21:16:46 +0000
+++ lisp/emacs-lisp/debug.el	2011-09-10 18:10:29 +0000
@@ -336,7 +336,8 @@
 			(with-current-buffer (car tem)
 			  (point))))
 	(pop tem))))
-  (debugger-make-xrefs))
+  (save-excursion
+    (debugger-make-xrefs)))
 
 (defun debugger-make-xrefs (&optional buffer)
   "Attach cross-references to function names in the `*Backtrace*' buffer."







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#9462: 24.0.50; Initial point in debugger
  2011-09-10 18:13 ` Helmut Eller
@ 2011-09-13 21:04   ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2011-09-13 21:04 UTC (permalink / raw
  To: 9462-done

Version: 24.1

Helmut Eller wrote:

> -  (debugger-make-xrefs))
> +  (save-excursion
> +    (debugger-make-xrefs)))

Thanks for the diagnosis, I installed a similar fix.

This looks like more fallout from "save-excursion + set-buffer ->
with-current-buffer".





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-13 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08  9:03 bug#9462: 24.0.50; Initial point in debugger Helmut Eller
2011-09-10 18:13 ` Helmut Eller
2011-09-13 21:04   ` Glenn Morris

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.