emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#6991: closed (Please keep bytecode out of *Backtra


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#6991: closed (Please keep bytecode out of *Backtrace* buffers)
Date: Mon, 02 Jul 2012 18:44:02 +0000

Your message dated Mon, 02 Jul 2012 14:38:40 -0400
with message-id <address@hidden>
and subject line Re: bug#6991: Please keep bytecode out of *Backtrace* buffers
has caused the debbugs.gnu.org bug report #6991,
regarding Please keep bytecode out of *Backtrace* buffers
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
6991: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6991
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Please keep bytecode out of *Backtrace* buffers Date: Tue, 07 Sep 2010 09:35:10 +0800
Please keep bytecode out of *Backtrace* buffers.
* It is unreadable.
* It will cause problems when sent via email. Even if one runs col(1)
and strings(1) on it, nobody can read it anyway.
* The mountain of gobbledygook makes people reading give up on trying to help.
E.g., http://article.gmane.org/gmane.emacs.w3m/8695



--- End Message ---
--- Begin Message --- Subject: Re: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Mon, 02 Jul 2012 14:38:40 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
>> > Why?  No reason given.  This is a reasonable request, which 
>> > 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


=== 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 = ASIZE (obj);
+         int bytecode = 0;
+
          if (COMPILEDP (obj))
            {
              PRINTCHAR ('#');
+             bytecode = 1;
              size &= PSEUDOVECTOR_SIZE_MASK;
            }
@@ -1978,6 +1981,9 @@
              {
                if (i) PRINTCHAR (' ');
                tem = AREF (obj, i);
+               if (bytecode && i == 1 && INTEGERP (Vprint_level))
+                 strout ("\"..<bytecode>..\"", 16, 16, printcharfun);
+               else
                print_object (tem, printcharfun, escapeflag);
              }
            if (size < real_size)



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]