Subject: Re: bug#24923: 25.1; Lisp watchpoints

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Nov 2016 09:19:21 +0200

> From: [email-masked]
> Cc: [email-masked]
> Date: Fri, 11 Nov 2016 23:34:33 -0500
> 
> >> +          (_ (format "watchpoint triggered %S" (cdr args))))
> >
> > Can you give a couple of examples of this, with %S shown explicitly?
> > I'm not sure whether the result will be self-explanatory.
> 
> You mean examples of this this clause being used?  It was meant more as
> a catchall in case some watch types were missed by the previous clauses.
> It shouldn't really ever happen unless the debugger and watchpoint code
> get out of sync.  Do you think it would be better to just signal an
> error?  (although would signalling an error while the debugger is
> invoked cause trouble?)

Either signal an error, or include something like "(please submit a
bug report)" in the text.

> >> +;;;###autoload
> >> +(defun debug-watch (variable)
> >> +  (interactive
> >> +   (let* ((var-at-point (variable-at-point))
> >> +          (var (and (symbolp var-at-point) var-at-point))
> >> +          (val (completing-read
> >> +                (concat "Debug when setting variable"
> >> +                        (if var (format " (default %s): " var) ": "))
> >
> > I think all the other commands/variables similar to this one are named
> > debug-on-SOMETHING, so perhaps this one should also have such a name.
> > Like debug-on-setting-variable, perhaps?
> 
> Hah, I initially called this debug-on-set
> (https://lists.nongnu.org/archive/html/emacs-devel/2015-11/txtyjJDztIULG.txt),
> and then you suggested debug-watch instead
> (https://lists.nongnu.org/archive/html/emacs-devel/2015-11/msg02017.html).
> 
> An alias probably makes sense, how about debug-on-variable-change?
> (since it catches some changes other than `set'.)

Fine with me, thanks.