From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <865xwca15c.fsf@gnu.org> References: <87zfuc48d5.fsf@gmail.com> <86msqc9dsa.fsf@gnu.org> <874jcjeuac.fsf@gmail.com> <86edbnajfp.fsf@gnu.org> <87mspwcn0f.fsf_-_@gmail.com> <86v84kmeh0.fsf@gnu.org> <874jc2y2ky.fsf@gmail.com> <86sezmjxbc.fsf@gnu.org> <86a5lsiuo8.fsf@gnu.org> <87r0f49yq9.fsf@gmail.com> <86mspsgmzt.fsf@gnu.org> <661fceac.050a0220.5950a.8357@mx.google.com> <867cgsa1ck.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3831"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brubar.cs@gmail.com, 70436@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 20 10:28:58 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ry65h-0000lt-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Apr 2024 10:28:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ry65b-0004Lq-0s; Sat, 20 Apr 2024 04:28:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ry65Z-0004Le-CC for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:28:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ry65Z-0001ML-4F for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:28:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ry65n-0003Lo-Jw for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:29:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Apr 2024 08:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70436 X-GNU-PR-Package: emacs Original-Received: via spool by 70436-submit@debbugs.gnu.org id=B70436.171360173712822 (code B ref 70436); Sat, 20 Apr 2024 08:29:03 +0000 Original-Received: (at 70436) by debbugs.gnu.org; 20 Apr 2024 08:28:57 +0000 Original-Received: from localhost ([127.0.0.1]:35070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ry65g-0003Kk-ID for submit@debbugs.gnu.org; Sat, 20 Apr 2024 04:28:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ry65d-0003JA-79 for 70436@debbugs.gnu.org; Sat, 20 Apr 2024 04:28:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ry65J-0001Jg-AS; Sat, 20 Apr 2024 04:28:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fw+kk2/A6Envi546yH9l/os9Ms72pyxeJWei1Fgxa9Q=; b=HDdjHbAMh19U 4tCtu8SyFhDQXejfP2VZOE3Cp+DaDrCRdp6uXfJ6Quu7VoUJROBW3YDe+xdqLW/3l1V0VUVLSwH9O 1j5VfIixzJMq65BkEBL+pe3PIY7LwP3RgOGqAfbRf3vjt1CgWfcZPkuP5WuUZMdhpn2/IIE5IEzYM zJz56Rv0bHWgqGvM4W6FumnlQzFHtkREJofUa+eBZNBmW/tcv5IguY+4VlmYemm4ncDi21k19CkXc 1BID29thawJwNadui6N2ny2IZUk71YRsB4qlOumI7xmRlF6mlvys8gGl1YhP6bs/sqE1FAVk2oORR 2FdEeExzGdxtHdDWyprtdA==; In-Reply-To: <867cgsa1ck.fsf@gnu.org> (message from Eli Zaretskii on Sat, 20 Apr 2024 11:24:11 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:283724 Archived-At: > Cc: 70436@debbugs.gnu.org > Date: Sat, 20 Apr 2024 11:24:11 +0300 > From: Eli Zaretskii > > > From: Bruno Barbier > > 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?