[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debug on error and Emacs client

From: Lennart Borgman (gmail)
Subject: Re: Debug on error and Emacs client
Date: Wed, 16 May 2007 14:00:09 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070326 Thunderbird/ Mnenhy/

Juanma Barranquero wrote:
On 5/16/07, Lennart Borgman (gmail) <address@hidden> wrote:

Would it not be easier if you get a normal backtrace if debug-on-error
is t?

Perhaps. OTOH, it is an error in an emacsclient-sent string to
evaluate an Error *in* Emacs?

Eh, you lost me on this one ;-) -- I do not understand the context. Can you please explain?

Something like this can be used in server.el, server-process-filter:

Can you please send it as a patch? Otherwise it's kind of difficult to
see what's changing.

It is not much, just two or three new lines actually. (The line numbers below are not correct.)

*** c:/DOCUME~1/LENNAR~1/LOCALS~1/Temp/ediff972RQU 2007-05-16 13:55:37.203125000 +0200 --- c:/emacs/p/070515/emacs/lisp/server.el 2007-05-16 13:32:13.328125000 +0200
*** 469,477 ****
                 (setq arg (decode-coding-string arg coding-system)))
               (if eval
                   (let* (errorp
!                         (v (condition-case errobj
                                 (eval (car (read-from-string arg)))
!                              (error (setq errorp t) errobj))))
                     (when v
                         (let ((standard-output (current-buffer)))
--- 482,493 ----
                 (setq arg (decode-coding-string arg coding-system)))
               (if eval
                   (let* (errorp
!                         (v
!                          (if debug-on-error
!                              (eval (car (read-from-string arg)))
!                            (condition-case errobj
                                 (eval (car (read-from-string arg)))
!                              (error (setq errorp t) errobj)))))
                     (when v
                         (let ((standard-output (current-buffer)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]