From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
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:24:11 +0300
Message-ID: <867cgsa1ck.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>
 <jwvh6g10yst.fsf-monnier+emacs@gnu.org> <86a5lsiuo8.fsf@gnu.org>
 <jwvttk0zoyb.fsf-monnier+emacs@gnu.org> <87r0f49yq9.fsf@gmail.com>
 <86mspsgmzt.fsf@gnu.org> <661fceac.050a0220.5950a.8357@mx.google.com>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="26093"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 70436@debbugs.gnu.org
To: Bruno Barbier <brubar.cs@gmail.com>,
 Stefan Monnier <monnier@iro.umontreal.ca>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 20 10:25:11 2024
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1ry622-0006UZ-Es
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Apr 2024 10:25:10 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1ry61i-0003aB-CO; Sat, 20 Apr 2024 04:24:50 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1ry61g-0003Zz-TB
 for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:24:48 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1ry61g-0000RZ-ID
 for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:24:48 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ry61v-0002qj-2D
 for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 04:25:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 20 Apr 2024 08:25:03 +0000
Resent-Message-ID: <handler.70436.B70436.171360149110840@debbugs.gnu.org>
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.171360149110840
 (code B ref 70436); Sat, 20 Apr 2024 08:25:03 +0000
Original-Received: (at 70436) by debbugs.gnu.org; 20 Apr 2024 08:24:51 +0000
Original-Received: from localhost ([127.0.0.1]:35044 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1ry61h-0002ol-Jt
 for submit@debbugs.gnu.org; Sat, 20 Apr 2024 04:24:50 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46136)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1ry61f-0002ne-DE
 for 70436@debbugs.gnu.org; Sat, 20 Apr 2024 04:24:48 -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 <eliz@gnu.org>)
 id 1ry61L-0000Ov-6C; Sat, 20 Apr 2024 04:24:27 -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=oL/uSB4M0rQyu4vVuCyrvs7RfmyO2e4jcxINplVGyCw=; b=F6vcHS/7CS1R
 I+tbLMvhUM9C4wWx+oOdTZxbDVKmaW3nBSBqZta5Rl9dz4bs5XLM0VKmXLEovbliCcO8FGdFvgcg2
 G4dfKPa3jL+NqJQSsVMiQpyoqM1FodJ9c7YiDBFYnwrfyLIRJPPzE5O0Bg8r2PP0ZyqEOk+w6Br7J
 vNPN4VAmwhan8xzfrnI7wGo4DizKXah1ESA5W0rH+nxk9aWQ5Oa+0tGm4AkycU2zq3eJgbs4jKC9j
 lhFMq4RwaRlhBVcoTCDFIHZj8dWzUjOCSct9OZSWgm69pceYnGoPOHhU2SRP4A96Vj4qcH1jXPOxI
 NDfz+zDhYx6FfRpioGqtew==;
In-Reply-To: <661fceac.050a0220.5950a.8357@mx.google.com> (message from Bruno
 Barbier on Wed, 17 Apr 2024 15:29:14 +0200)
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:283723
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/283723>

> 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?