From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Fri, 18 Nov 2016 20:55:54 -0500 Message-ID: <87fumokzbp.fsf@users.sourceforge.net> References: <8739tm9vzl.fsf@jidanni.org> <87vb5ct1lz.fsf@gnus.org> <2223f654-1e67-4a9a-a471-828fd4078410@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479520575 2719 195.159.176.226 (19 Nov 2016 01:56:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2016 01:56:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Juanma Barranquero , Lars Ingebrigtsen , John Wiegley , Stefan Monnier , 6991@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 19 02:56:11 2016 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 1c7usx-0007bO-FQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 02:56:07 +0100 Original-Received: from localhost ([::1]:39680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7ut1-0004HQ-05 for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 20:56:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7usv-0004H1-Be for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 20:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7uss-0005Di-8i for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 20:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7uss-0005Da-5J for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 20:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7usr-0006FN-PI for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2016 20:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Nov 2016 01:56: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: Original-Received: via spool by 6991-submit@debbugs.gnu.org id=B6991.147952051023945 (code B ref 6991); Sat, 19 Nov 2016 01:56:01 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 19 Nov 2016 01:55:10 +0000 Original-Received: from localhost ([127.0.0.1]:34337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7us2-0006E9-GO for submit@debbugs.gnu.org; Fri, 18 Nov 2016 20:55:10 -0500 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:36553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7us0-0006Ds-R4 for 6991@debbugs.gnu.org; Fri, 18 Nov 2016 20:55:09 -0500 Original-Received: by mail-it0-f67.google.com with SMTP id n68so8199003itn.3 for <6991@debbugs.gnu.org>; Fri, 18 Nov 2016 17:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/7e+AxNpXUeeDCHj6TZNgLuoJcV0UvnKbhbWg75/5UQ=; b=fAyoBIyjHWqAumAuyxzKYeO0SaIE4w0lT3qaGN6xhiXKnmQqFYISsssyA8GEuetkdA DiEJk6Gs7lRbvQNMkcXl5+F8AQnQpsAazKbNpJpVj4TcpBW68oOEvoBcZ5g2RTy32i8C xP2G5pU4cH8QsPHSC7pxgy1rBdyagedK13YaZDTSLB+Nzel6hwdIIifT5S3ftDZvR8PP Z+CeFabG1wxKZ9nwEyqCzdVfDjJIRqUxiaHJIUaM8HsAq4uLG74EP1z7cUH1nuAYitWl atKCeGpF9l/bT1IJhIMb71r+xuYI5W9IbuMGy72f4d7bbLajx/eBDutehL7+CBKAUwec RE7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=/7e+AxNpXUeeDCHj6TZNgLuoJcV0UvnKbhbWg75/5UQ=; b=aOWvy5aG39uu7kXcjE9w1QPYzqGGg2rbjQv4pMdTc8U27rHVzOFpBYGdQ0WcCFSdwd QjG/nH+HJy3JJH7NmnN51T+uTN6qqgsT/Kp33iyKS1uV7dfFhjq3KzsKFbiFUSrLGL/Y 6PuwOUGUVVf3cgS55mb6J9gmV4CbxTyqLJOSOQpg57ledmiHQbMsOggg+8d0h1pHNXFo 5lKvB3a5kGf6YyTbMv+yN700p1FFHhtCzfRvEdP2uDgyXa7+CTtQfDnPG7VIj6Sbp9MT Ira4QgCz9OFt8TZRvwD7anqm6AMdeLpWCzfMgLA7XFtUOFBml9l0cU3AHWCTp9lQRCDv HIuA== X-Gm-Message-State: AKaTC00cKvJ8Kq+2vKj561ERJdikDlZkSaPmLRE9Nr2dByT8tYANQhcy8MMfG/bCj9ysHw== X-Received: by 10.107.201.86 with SMTP id z83mr2434811iof.156.1479520503251; Fri, 18 Nov 2016 17:55:03 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p20sm2114675itc.2.2016.11.18.17.55.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Nov 2016 17:55:02 -0800 (PST) In-Reply-To: <2223f654-1e67-4a9a-a471-828fd4078410@default> (Drew Adams's message of "Fri, 26 Feb 2016 17:49:59 -0800 (PST)") 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:125853 Archived-At: It looks like this bug was closed a couple times because 6991-done@debbugs.gnu.org was added to the Cc list. I've removed it, and let's try not to add it again. Drew Adams writes: > > Here's a backtrace with some byte-code in it: > > Debugger entered--entering a function: > * icicle-ucs-names() > * #[(prompt &optional names) "\204 > > > See, only the top two lines got pasted (even into an Outlook > window, and the second line was truncated at the first null > byte (it appears as ^@ in the backtrace, where that is a null > char and not two chars). I would propose something like the below, which will cause the NUL byte to be rendered as \0 instead of ^@. We could potentially do this with other control characters too, if they cause trouble too? I do think it's worth keeping the bytecode in the backtrace, because it's not useless: you can run `disassemble' on it and get something meaningful. Perhaps hiding the byte code with display properties would be useful. modified src/print.c @@ -1477,18 +1477,20 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) could be taken as part of it, output `\ ' to prevent that. */ if (need_nonhex && c_isxdigit (c)) print_c_string ("\\ ", printcharfun); + need_nonhex = false; if (c == '\n' && print_escape_newlines ? (c = 'n', true) : c == '\f' && print_escape_newlines ? (c = 'f', true) + : c == '\0' && print_escape_nonascii + ? (c = '0', need_nonhex = true) : c == '\"' || c == '\\') printchar ('\\', printcharfun); printchar (c, printcharfun); - need_nonhex = false; } } printchar ('\"', printcharfun);