GNU bug report logs -
#70436
30.0.50; Fail to enter the debugger when using prin1 (instead of cl-prin1)
Previous Next
Reported by: Bruno Barbier <brubar.cs <at> gmail.com>
Date: Wed, 17 Apr 2024 13:31:05 UTC
Severity: normal
Merged with 70437
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: 70436 <at> debbugs.gnu.org
> Date: Sat, 20 Apr 2024 11:24:11 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Bruno Barbier <brubar.cs <at> gmail.com>
> > Date: Wed, 17 Apr 2024 15:29:14 +0200
> >
> > When setting debugger-print-function to prin1, Emacs 30.0.50 may fail
> > to enter the debugger.
> >
> > Emacs displays something like:
> >
> > Entering debugger...
> > make-text-button: Args out of range: 67, 3000
> >
> >
> > The correct behavior is to enter the debugger, with something like this:
> >
> > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> > #f(compiled-function (&rest args) "Start a program in a subprocess. ...
> > ...
> > make-process(:name "mandatory" :command "ls" :stderr err-buf)
> >
> > The problem doesn't occur with Emacs 29.3.
> >
> > To manually reproduce, execute the following code block in a new Emacs
> > (started with '-Q'):
> >
> > #+begin_src elisp
> > (progn
> > (setq debugger-print-function 'prin1)
> >
> > (defun my-useless-advice (fun &rest args)
> > (apply fun args))
> >
> > (advice-add 'make-process :around #'my-useless-advice)
> >
> > (make-process :name "mandatory"
> > :command "ls"
> > :stderr 'err-buf))
> > #+end_src
> >
> > It seems that backtrace.el prints using prin1, but infers where the
> > button should be using cl-prin1.
> >
> > My personal workaround is to stop setting debugger-print-function to
> > prin1 (I customized it a few years ago because I found that cl-prin1 was
> > really slow at the time, I guess it shouldn't be the case anymore).
>
> Stefan, is this supposed to be supported?
Btw, if I also set backtrace-print-function to prin1, the above recipe
works as expected. So maybe we should document that changing
debugger-print-function should also change backtrace-print-function?
Or even use the value of debugger-print-function as the default value
of backtrace-print-function?
This bug report was last modified 1 year and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.