From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Mon, 02 Jul 2012 14:38:40 -0400 Message-ID: References: <8739tm9vzl.fsf@jidanni.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1341254375 32646 80.91.229.3 (2 Jul 2012 18:39:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Jul 2012 18:39:35 +0000 (UTC) Cc: 'Juanma Barranquero' , 6991-done@debbugs.gnu.org, 6991@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 02 20:39:34 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SllX2-0005Em-7p for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Jul 2012 20:39:32 +0200 Original-Received: from localhost ([::1]:55440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SllX1-0008Mk-8R for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Jul 2012 14:39:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SllWx-0008M9-Dk for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2012 14:39:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SllWv-0004gA-RE for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2012 14:39:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SllWv-0004g6-NZ for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2012 14:39:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SllbO-0004xP-53 for bug-gnu-emacs@gnu.org; Mon, 02 Jul 2012 14:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jul 2012 18:44:02 +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: wontfix Original-Received: via spool by 6991-submit@debbugs.gnu.org id=B6991.134125460218998 (code B ref 6991); Mon, 02 Jul 2012 18:44:02 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 2 Jul 2012 18:43:22 +0000 Original-Received: from localhost ([127.0.0.1]:43164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sllaj-0004wJ-RE for submit@debbugs.gnu.org; Mon, 02 Jul 2012 14:43:22 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23452) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sllag-0004w6-VX; Mon, 02 Jul 2012 14:43:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxKFY/2dsb2JhbABEsEiDSYEIghUBAQQBViMQCzQSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="192491918" Original-Received: from 69-196-161-88.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.88]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Jul 2012 14:38:41 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 276505976E; Mon, 2 Jul 2012 14:38:41 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Mon, 2 Jul 2012 10:40:38 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61501 Archived-At: >> > Why? =A0No reason given. =A0This is a reasonable request, which=20 >> > would improve correspondence about bugs and user difficulties. > And no response to that question. I've reopened this bug. You can try the simple patch below. It doesn't cut it for me, and I think the only way to make it work well would be to change the representation of the byte-codes so that they're not just a "unibyte string" but an object with a distinctive type: the patch only catches the case where the byte-codes appear within a printed byte-compiled-function, not when they're arguments to the `byte-code' function or to the `make-byte-code' function, and I'm sure there can be other cases. Stefan =3D=3D=3D modified file 'src/print.c' --- src/print.c 2012-06-28 11:11:48 +0000 +++ src/print.c 2012-07-02 18:37:46 +0000 @@ -1937,8 +1937,11 @@ else { ptrdiff_t size =3D ASIZE (obj); + int bytecode =3D 0; + if (COMPILEDP (obj)) { PRINTCHAR ('#'); + bytecode =3D 1; size &=3D PSEUDOVECTOR_SIZE_MASK; } @@ -1978,6 +1981,9 @@ { if (i) PRINTCHAR (' '); tem =3D AREF (obj, i); + if (bytecode && i =3D=3D 1 && INTEGERP (Vprint_level)) + strout ("\"....\"", 16, 16, printcharfun); + else print_object (tem, printcharfun, escapeflag); } if (size < real_size)