unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6435: Go to eval-buffer: Reading at buffer position
@ 2010-06-16  2:49 Lennart Borgman
  2018-08-03 19:15 ` Gemini Lasswell
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman @ 2010-06-16  2:49 UTC (permalink / raw)
  To: 6435

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

A small patch I have forgotten that lets you more conveniently go to
the position where eval-buffer finds an error.

[-- Attachment #2: debug-eval-goto-0.diff --]
[-- Type: text/x-patch, Size: 1285 bytes --]

=== modified file 'lisp/emacs-lisp/debug.el'
--- trunk/lisp/emacs-lisp/debug.el	2010-01-13 08:35:10 +0000
+++ patched/lisp/emacs-lisp/debug.el	2010-06-16 02:44:54 +0000
@@ -317,12 +317,21 @@
       (while (and tem
 		  (re-search-forward "^  eval-\\(buffer\\|region\\)(" nil t))
 	(end-of-line)
-	(insert (format "  ; Reading at buffer position %d"
+	(insert "  ; Reading at buffer position ")
+        (let* ((buf (car tem))
 			;; This will get the wrong result
 			;; if there are two nested eval-region calls
 			;; for the same buffer.  That's not a very useful case.
-			(with-current-buffer (car tem)
-			  (point))))
+               (pos (with-current-buffer buf (point))))
+          (insert-text-button (format "%d" pos)
+                              'buf buf
+                              'pos pos
+                              'action (lambda (btn)
+                                        (interactive)
+                                        (let ((buf (button-get btn 'buf))
+                                              (pos (button-get btn 'pos)))
+                                          (switch-to-buffer-other-window buf)
+                                          (goto-char pos)))))
 	(pop tem))))
   (debugger-make-xrefs))
 


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

* bug#6435: Go to eval-buffer: Reading at buffer position
  2010-06-16  2:49 bug#6435: Go to eval-buffer: Reading at buffer position Lennart Borgman
@ 2018-08-03 19:15 ` Gemini Lasswell
  0 siblings, 0 replies; 2+ messages in thread
From: Gemini Lasswell @ 2018-08-03 19:15 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 6435

tags 6435 fixed
close 6435 27.1

Lennart Borgman <lennart.borgman@gmail.com> writes:

> A small patch I have forgotten that lets you more conveniently go to
> the position where eval-buffer finds an error.

Hi Lennart,

I didn't use your patch, but included with the backtrace-mode changes
which I have just pushed to master is a similar change to add links to
the reading positions of eval-buffer and eval-region when they occur in
backtraces.

Gemini







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

end of thread, other threads:[~2018-08-03 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  2:49 bug#6435: Go to eval-buffer: Reading at buffer position Lennart Borgman
2018-08-03 19:15 ` Gemini Lasswell

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).