all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: brubar.cs@gmail.com, 70436@debbugs.gnu.org
Subject: bug#70436: 30.0.50; Fail to enter the debugger when using prin1 (instead of cl-prin1)
Date: Sat, 20 Apr 2024 11:28:31 +0300	[thread overview]
Message-ID: <865xwca15c.fsf@gnu.org> (raw)
In-Reply-To: <867cgsa1ck.fsf@gnu.org> (message from Eli Zaretskii on Sat, 20 Apr 2024 11:24:11 +0300)

> Cc: 70436@debbugs.gnu.org
> Date: Sat, 20 Apr 2024 11:24:11 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Bruno Barbier <brubar.cs@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?





  reply	other threads:[~2024-04-20  8:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  5:54 bug#70136: 30.0.50; comint-mode doesn't call hack-dir-local-variables-non-file-buffer Augusto Stoffel
2024-04-02 11:58 ` Eli Zaretskii
2024-04-02 14:03   ` Augusto Stoffel
2024-04-02 15:11     ` Eli Zaretskii
2024-04-14  9:16       ` Augusto Stoffel
2024-04-14 10:08         ` Eli Zaretskii
2024-04-14  9:27       ` bug#70136: 30.0.50; compilation-mode [was: comint-mode] " Augusto Stoffel
2024-04-14 10:21         ` Eli Zaretskii
2024-04-15 17:10           ` Augusto Stoffel
2024-04-15 18:27             ` Eli Zaretskii
2024-04-16 21:49               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17  2:34                 ` Eli Zaretskii
2024-04-17  2:58                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17  8:31                     ` Augusto Stoffel
2024-04-17 13:03                       ` Eli Zaretskii
2024-04-17 13:29                         ` bug#70436: 30.0.50; Fail to enter the debugger when using prin1 (instead of cl-prin1) Bruno Barbier
2024-04-20  8:24                           ` Eli Zaretskii
2024-04-20  8:28                             ` Eli Zaretskii [this message]
2024-04-20 15:24                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-25 16:37                                 ` Eli Zaretskii
2024-04-27 10:29                                   ` Bruno Barbier
2024-04-27 14:45                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-20 13:57                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17 12:36                     ` bug#70136: 30.0.50; compilation-mode [was: comint-mode] doesn't call hack-dir-local-variables-non-file-buffer Eli Zaretskii
2024-04-17 12:59                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17 13:16                         ` Eli Zaretskii
2024-04-17 17:55                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-17 18:18                             ` Eli Zaretskii
2024-04-17 18:24                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16  6:33             ` Juri Linkov
2024-04-16 12:37               ` Eli Zaretskii
2024-04-17  8:16               ` Augusto Stoffel
2024-04-17 13:00                 ` Eli Zaretskii
2024-05-02  6:17         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=865xwca15c.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70436@debbugs.gnu.org \
    --cc=brubar.cs@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.