help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: if and only if an Error message


From: Michael Heerdegen
Subject: Re: if and only if an Error message
Date: Sat, 19 Jul 2014 07:49:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:


> >> OK, I just found another variable, inhibit-debugger,
> >> sounds interesting as well...
> >
> > But that one is not intended to be set by the user.
>
> OK, if that is harmful (?) perhaps it should be
> mentioned in the documentation:

It's not harmful.  But it's not a user option, so if you set its value,
you should know what you are doing and how the flag is used internally.


> OK, will do! Yes, it is useful so I can study the error
> messages and see if any of them is something that I'd
> care to analyze and/or fix. Now I'm basically unaware
> of them (if they even exits).

I would start trying something like this:

,----------------------------------------------------------------------
| (defun my-log-error (data _ function)
|   (with-current-buffer (get-buffer-create "*Error*")
|     (goto-char (point-max))
|     (insert (format "%s in %s\n" data function))))
| 
| (setq command-error-function
|       (lambda (&rest args)
|         (apply #'command-error-default-function args)
|         (apply #'my-log-error args)))
`----------------------------------------------------------------------




reply via email to

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