From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.devel Subject: Re: Typing raw bytes Date: Sun, 20 Jan 2013 15:55:13 -0500 Message-ID: <8738xv1sni.fsf@maru.md5i.com> References: <83hambpqds.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358719453 19952 80.91.229.3 (20 Jan 2013 22:04:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2013 22:04:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 20 23:04:31 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Tx307-0001s8-Vi for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2013 23:04:28 +0100 Original-Received: from localhost ([::1]:46966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tx2zq-0002d7-W6 for ged-emacs-devel@m.gmane.org; Sun, 20 Jan 2013 17:04:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tx1vJ-00029n-A1 for emacs-devel@gnu.org; Sun, 20 Jan 2013 15:55:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tx1vG-0003wg-Ec for emacs-devel@gnu.org; Sun, 20 Jan 2013 15:55:25 -0500 Original-Received: from md5i.com ([75.151.244.229]:56713 helo=maru.md5i.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tx1vD-0003vd-H4; Sun, 20 Jan 2013 15:55:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=re2bhPj7QOnBPCDmcpfcgYPHK4a5tBGOzArWfEFoh30=; b=hgZWRW/rRRIDHEtCc5ktid4Es+xN6bTc0PrKYhFoIdN7yMhBkosTzQW34braskwKjW0WDDmK6ISe6ZaryXpKu2DbCWGcyphRbB+gUmBeSOG5YtVJFEEJpTzUx3Q0zHap; Original-Received: from md5i by maru.md5i.com with local (Exim 4.80) (envelope-from ) id 1Tx1v7-0004a2-D3; Sun, 20 Jan 2013 15:55:13 -0500 In-Reply-To: <83hambpqds.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Jan 2013 22:10:23 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 75.151.244.229 X-Mailman-Approved-At: Sun, 20 Jan 2013 17:04:08 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156516 Archived-At: Eli Zaretskii writes: > Suppose I want to create a file whose contents is a series of certain > bytes. How would I go about that? > > I tried "M-x hexl-mode RET" in a new buffer, but it evidently doesn't > let you insert bytes, only edit existing bytes. > > Next I tried "C-x RET f raw-text RET" in a new buffer followed by > "C-q NNN" etc., but the data written thereafter to disk is more bytes > than I typed, because, I guess, "C-q NNN" inserts windows-1255 > characters (this is on Windows, where keyboard-coding-system is > windows-1255-unix), and what winds up in the file is their UTF-8 > encoding. Could you give an example that fails to do what is expected? I tried what you referenced above, using "C-x RET f raw-text RET" and C-q insert bytes. Saving the file worked just fine, resulting in the expected file length. "M-x find-file-literally" on the resulting file also seemed to work just fine. Note, however, that I am running Emacs under GNU/Linux. -- Michael Welsh Duggan (md5i@md5i.com)