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 00:02:17 -0400 Message-ID: References: <8739tm9vzl.fsf@jidanni.org> <2223f654-1e67-4a9a-a471-828fd4078410@default> <87fumokzbp.fsf@users.sourceforge.net> <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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1498449796 16085 195.159.176.226 (26 Jun 2017 04:03:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 04:03:16 +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 06:03:12 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 1dPLEy-0003oA-4z for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 06:03:08 +0200 Original-Received: from localhost ([::1]:44595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPLF3-000443-HB for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Jun 2017 00:03:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPLEv-00043e-Fb for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 00:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPLEs-0000Pd-Bl for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 00:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPLEs-0000PZ-8g for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 00:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dPLEr-000683-S4 for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2017 00:03: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 04:03: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.149844974623517 (code B ref 6991); Mon, 26 Jun 2017 04:03:01 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 26 Jun 2017 04:02:26 +0000 Original-Received: from localhost ([127.0.0.1]:37864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPLEI-00067E-I0 for submit@debbugs.gnu.org; Mon, 26 Jun 2017 00:02:26 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPLEE-000674-Ry for 6991@debbugs.gnu.org; Mon, 26 Jun 2017 00:02:24 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v5Q42IK2011782; Mon, 26 Jun 2017 00:02:19 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id DE5866627F; Mon, 26 Jun 2017 00:02:17 -0400 (EDT) In-Reply-To: <87mv8vo1zz.fsf@users.sourceforge.net> (npostavs's message of "Sun, 25 Jun 2017 23:34:56 -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, RV6055=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6055> : inlines <5949> : streams <1751539> : uri <2450818> 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:133910 Archived-At: >>> + (when fun-file >>> + (make-text-button fun-pt (+ fun-pt (length (symbol-name fun))) >>> + :type 'help-function-def >>> + 'help-args (list fun fun-file)))) >> Hmm... this looks like code which was moved from elsewhere, yet I can't >> find this elsewhere in your patch(es). >> I think that other code is in debugger-make-xrefs, so can't we remove >> debugger-make-xrefs? > I'm not sure exactly what you mean by "looks like code which was moved". It's not functionality described as new in the commit log, so it's presumably behavior which was earlier implemented elsewhere. > It does replace the functionality of debugger-make-xrefs. But > `ert--make-xrefs-region' is still using `debugger-make-xrefs', and I > don't quite see how to remove that usage. I see. Maybe we should move it to ert.el, then? >>> + (let ((frames (nthcdr >>> + ;; Remove debug--implement-debug-on-entry and the >>> + ;; advice's `apply' frame. >>> + (if (eq (car args) 'debug) 3 1) >>> + (backtrace-frames 'debug))) >>> + (print-escape-newlines t) >>> + (print-level 8) >>> + (print-length 50)) >> >> Why let-bind print-* here rather than inside debugger-insert-backtrace? > I thought moving those inside might needlessly make the function less > flexible, though nobody is currently making use of the flexibility so > maybe it's not worth it... Hmm... I can agree with it for level and length, but I think that the escape-newline behavior is indispensable. >>> + (when (eq (car args) 'exit) >>> + (setf (cl-getf (nth 3 (car frames)) :debug-on-exit) nil)) >> >> This looks like code which was moved from elsewhere, yet I can't find >> this elsewhere in your patch(es). What am I missing? > backtrace--print-frame I guess? I haven't changed the printing for > `backtrace', perhaps I should... Hmm... I don't see anything that corresponds to this setf in backtrace--print-frame. What do the above 2 lines do, and where is the corresponding code in the current debug.el? Or is that a new feature in your code? (if so, where is it documented in the commit message?) Stefan