From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6991: Please keep bytecode out of *Backtrace* buffers Date: Sat, 19 Nov 2016 17:07:02 +0200 Message-ID: <83eg27bjah.fsf@gnu.org> References: <8739tm9vzl.fsf@jidanni.org> <87vb5ct1lz.fsf@gnus.org> <2223f654-1e67-4a9a-a471-828fd4078410@default> <87fumokzbp.fsf@users.sourceforge.net> <83oa1bc3x2.fsf@gnu.org> <87d1hrlek2.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1479568095 1077 195.159.176.226 (19 Nov 2016 15:08:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2016 15:08:15 +0000 (UTC) Cc: lekktu@gmail.com, johnw@gnu.org, monnier@iro.umontreal.ca, 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 Sat Nov 19 16:08: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 1c87FS-0008IS-8j for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 16:08:10 +0100 Original-Received: from localhost ([::1]:41747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c87FV-0007IP-OI for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 10:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c87FN-0007HQ-J6 for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 10:08:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c87FK-0003sg-1N for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 10:08:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c87FJ-0003sc-UU for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 10:08:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c87FJ-0004Tr-Pl for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 10:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Nov 2016 15:08: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.147956807217209 (code B ref 6991); Sat, 19 Nov 2016 15:08:01 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 19 Nov 2016 15:07:52 +0000 Original-Received: from localhost ([127.0.0.1]:35266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c87F8-0004TS-OV for submit@debbugs.gnu.org; Sat, 19 Nov 2016 10:07:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c87F4-0004TC-Dg for 6991@debbugs.gnu.org; Sat, 19 Nov 2016 10:07:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c87Ey-0003ph-8A for 6991@debbugs.gnu.org; Sat, 19 Nov 2016 10:07:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c87EH-0003iN-DP; Sat, 19 Nov 2016 10:06:57 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4549 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c87EG-0005vQ-3d; Sat, 19 Nov 2016 10:06:56 -0500 In-reply-to: <87d1hrlek2.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:125873 Archived-At: > From: npostavs@users.sourceforge.net > Cc: 6991@debbugs.gnu.org, lekktu@gmail.com, johnw@gnu.org, monnier@iro.umontreal.ca, larsi@gnus.org, drew.adams@oracle.com > Date: Sat, 19 Nov 2016 09:39:09 -0500 > > Eli Zaretskii writes: > >> > >> 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? > > > > Isn't the fact that copying text into the clipboard stops at the first > > null character a Windows-specific issue? And if it isn't Windows > > specific, isn't it at least specific to selections? > > It seems to be application specific. When I copy to a Firefox text area > on GNU/Linux I get a truncated result, but using xclip | od -c, I can > see the NUL byte and following characters are there. If this happens on both Windows and X, then both xselect.c and w32select.c should "encode" null bytes. Would that solve the problem? > > Exactly. But if we change print_object like you suggest, there's no > > way of being sure the null bytes won't be mangled by some application > > of a print function. > > I'm not sure what you mean. A literal string can be printed, and the result is generally the string itself. But with your suggestion, the null bytes will be lossily converted to something else.