From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Mon, 26 Jun 2017 10:54:06 -0400 Message-ID: References: <8739tm9vzl.fsf@jidanni.org> <83oa1bc3x2.fsf@gnu.org> <87d1hrlek2.fsf@users.sourceforge.net> <83eg27bjah.fsf@gnu.org> <87a8cvlcmk.fsf@users.sourceforge.net> <8360njb9o5.fsf@gnu.org> <877f7zksm0.fsf@users.sourceforge.net> <83oa1a9msk.fsf@gnu.org> <83vavf73ei.fsf@gnu.org> <8360ne6v1q.fsf@gnu.org> <874m2ujh2v.fsf@users.sourceforge.net> <87wpcwkuug.fsf@users.sourceforge.net> <87zidx3u5u.fsf@users.sourceforge.net> <87o9tdowbh.fsf@users.sourceforge.net> <87mv8vo1zz.fsf@users.sourceforge.net> <87h8z2oqu0.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498489097 18624 195.159.176.226 (26 Jun 2017 14:58:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 14:58:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: lekktu@gmail.com, johnw@gnu.org, 6991@debbugs.gnu.org, larsi@gnus.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 26 16:58:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPVSu-0004bN-Pk for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 16:58:12 +0200 Original-Received: from localhost ([::1]:47066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPVT0-0007hu-3E for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 10:58:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPVPt-0004ag-4U for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 10:55:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPVPq-0003MP-4q for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 10:55:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPVPq-0003MH-0K for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 10:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dPVPp-00005a-Q5 for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 10:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Jun 2017 14:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 6991-submit@debbugs.gnu.org id=B6991.149848885332747 (code B ref 6991); Mon, 26 Jun 2017 14:55:01 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 26 Jun 2017 14:54:13 +0000 Original-Received: from localhost ([127.0.0.1]:39253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPVP3-0008W7-4A for submit@debbugs.gnu.org; Mon, 26 Jun 2017 10:54:13 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:53624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPVP1-0008Vz-7N for 6991@debbugs.gnu.org; Mon, 26 Jun 2017 10:54:12 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v5QEs7mm020740; Mon, 26 Jun 2017 10:54:08 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C7F8F6627F; Mon, 26 Jun 2017 10:54:06 -0400 (EDT) In-Reply-To: <87h8z2oqu0.fsf@users.sourceforge.net> (npostavs's message of "Mon, 26 Jun 2017 08:50:47 -0400") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6056=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6056> : inlines <5950> : streams <1751603> : uri <2451170> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133925 Archived-At: > Ah, sorry, my memory of the old code got a little fuzzy, it doesn't > correspond to backtrace--print-frame (that function only contains the > code which reads the :debug-on-exit flag). It's actually replacing the > code removed in this hunk: > @@ -301,10 +319,7 @@ (defun debugger-setup-buffer (args) > (setq pos (point)) > (setq debugger-value (nth 1 args)) > (prin1 debugger-value (current-buffer)) > - (insert ?\n) > - (delete-char 1) > - (insert ? ) > - (beginning-of-line)) > + (insert ?\n)) > ;; Watchpoint triggered. > ((and `watchpoint (let `(,symbol ,newval . ,details) (cdr args))) > (insert > So it's another instance of operating on the backtrace frame object > directly, instead of manipulating the text after printing (i.e., > unsetting the :debug-on-exit flag instead of erasing its representation > "*" in the buffer). Ah, yes, I see it now, thanks. It's a good change, then: the new code is more clear. I wonder why we do that, tho: the previous code didn't have a comment, so I'm left guessing that maybe it's that we don't want to advertise as "will stop when exiting foo" a function which we're exiting? > Also, as I'm looking at this, I wonder if I should replace the (prin1 > debugger-value ...) calls with (funcall debugger-print-function ...) Sounds right. > too. Hmm, and I probably shouldn't have moved those print-* > let-bindings at all because they could be relevant to the code printing > "frame 0". Good point. Stefan