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: Sat, 19 Nov 2016 09:39:09 -0500 Message-ID: <87d1hrlek2.fsf@users.sourceforge.net> References: <8739tm9vzl.fsf@jidanni.org> <87vb5ct1lz.fsf@gnus.org> <2223f654-1e67-4a9a-a471-828fd4078410@default> <87fumokzbp.fsf@users.sourceforge.net> <83oa1bc3x2.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1479566359 437 195.159.176.226 (19 Nov 2016 14:39:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2016 14:39:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: lekktu@gmail.com, johnw@gnu.org, monnier@iro.umontreal.ca, 6991@debbugs.gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 19 15:39:14 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 1c86nR-0007ws-DA for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 15:39:13 +0100 Original-Received: from localhost ([::1]:41690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c86nU-0003TB-Qf for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Nov 2016 09:39:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c86nJ-0003S3-Pj for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 09:39:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c86nG-0002vN-Hu for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 09:39:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c86nG-0002vH-Dj for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 09:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c86nG-0003Vx-8i for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2016 09:39:02 -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 14:39: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: Original-Received: via spool by 6991-submit@debbugs.gnu.org id=B6991.147956630513445 (code B ref 6991); Sat, 19 Nov 2016 14:39:02 +0000 Original-Received: (at 6991) by debbugs.gnu.org; 19 Nov 2016 14:38:25 +0000 Original-Received: from localhost ([127.0.0.1]:34575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c86mf-0003Un-2y for submit@debbugs.gnu.org; Sat, 19 Nov 2016 09:38:25 -0500 Original-Received: from mail-io0-f181.google.com ([209.85.223.181]:33792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c86md-0003UO-HD for 6991@debbugs.gnu.org; Sat, 19 Nov 2016 09:38:23 -0500 Original-Received: by mail-io0-f181.google.com with SMTP id c21so7438626ioj.1 for <6991@debbugs.gnu.org>; Sat, 19 Nov 2016 06:38:23 -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=HhUHKfYBqnALJgkyoFb+8w+pCi+yGeeGf10eQCvsh8I=; b=rQd6NCZ5qO5kLyesK1KSts1jYUzegMxtLVaacY+pPc/b67MS6jBPQKKimdexDiWveX 0c/uAvc6pJJDaqk91rNTzfCToxfvMD5bOWChegO3iGMUUKy9/M0Xm7ugwdx9IUk2koNg T4zCI4LefYM3Z+cMpZjWCu4RtDGudVf1usoP4yQZlu81AX+V/gmgjOQToPEVuMwAJBbE yBqRv1Fl89SxUlWgKZ6N6pwUX5Z4kJTKmfeIqIgeYKVh1ayVO0RkwNUvMzqwwd+Bn0pv QzV9b9gqgWKL9Syvn+2HVegEg0gRLRuvhelnemJtEPp2lFF6iColvXreKZUEIjwZ6NrR pMOw== 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=HhUHKfYBqnALJgkyoFb+8w+pCi+yGeeGf10eQCvsh8I=; b=kc36M0sYVCX5oi94xszZBUnmDliUi8GFLZb/rJd5vsBeIoolZml8mY4s4dsdQWWJHc OcmdnuyzoBAd6nNINdKN1PV2fweSYsyqAX372762WAOwtnVf0I8MtfM6+Z+ZQtooEE6G ArK59U7UoyiSq0P+bz9hjZvrTcZrvgcm19G6G4Kew/f7un8BpkaA6/nGb1jnRzwnribT ie5LwsvhAUlC+yQktYnoXuk28l/J8MYilGMpnbfochZK0bsDxNliFa7D2ccp1AN3Qd1z a8Um+3ZPLmEpObqNCi+JLH1UgZINQDZdPu6tCkQpPU1YVCY6A9f5jezomSJXQwSABBYQ E/xw== X-Gm-Message-State: AKaTC00WxarYaW3HD7Pbo2TShxMT6EvSpujOv7R+GJuL+ZqGa+2etchTHECn9lOcEAoVTA== X-Received: by 10.107.149.144 with SMTP id x138mr4725997iod.23.1479566297942; Sat, 19 Nov 2016 06:38:17 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id i18sm3538960itb.0.2016.11.19.06.38.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Nov 2016 06:38:17 -0800 (PST) In-Reply-To: <83oa1bc3x2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Nov 2016 09:41:29 +0200") 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:125871 Archived-At: 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. > > I think Emacs doesn't need this change for all occurrences of the null > byte, because Emacs Lisp strings and buffer text will happily DTRT > with them (they were designed to do so). So I thin we should only > "fix" this problem where it happens, not in print functions in > general. We could try fixing this in `gui-select-text', but the problem there is that we don't necessarily know that replace NUL with "\0" is valid. > > 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.