From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Date: Sat, 08 Feb 2014 11:04:05 +0200 Message-ID: <831tzex9fe.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391850314 12132 80.91.229.3 (8 Feb 2014 09:05:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 09:05:14 +0000 (UTC) Cc: 16686-done@debbugs.gnu.org To: Jacob Burckhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 08 10:05:20 2014 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 1WC3qh-0007yj-C5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 10:05:19 +0100 Original-Received: from localhost ([::1]:45701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC3qg-0006bY-TG for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 04:05:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC3qY-0006bN-KE for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2014 04:05:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WC3qR-0005mQ-ST for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2014 04:05:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC3qR-0005ly-Pm for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2014 04:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WC3qR-0007ls-ER for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2014 04:05:03 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2014 09:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 16686 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 16686@debbugs.gnu.org, eliz@gnu.org, jburckhardt@pdvcorp.com Original-Received: via spool by 16686-done@debbugs.gnu.org id=D16686.139185026829820 (code D ref 16686); Sat, 08 Feb 2014 09:05:02 +0000 Original-Received: (at 16686-done) by debbugs.gnu.org; 8 Feb 2014 09:04:28 +0000 Original-Received: from localhost ([127.0.0.1]:56392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WC3ps-0007ks-2q for submit@debbugs.gnu.org; Sat, 08 Feb 2014 04:04:28 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:46822) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WC3po-0007kf-BY for 16686-done@debbugs.gnu.org; Sat, 08 Feb 2014 04:04:25 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N0O00G00676V300@a-mtaout23.012.net.il> for 16686-done@debbugs.gnu.org; Sat, 08 Feb 2014 11:04:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0O00GT06JAR560@a-mtaout23.012.net.il>; Sat, 08 Feb 2014 11:04:23 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:84918 Archived-At: > Date: Fri, 7 Feb 2014 17:42:45 -0800 > From: Jacob Burckhardt > > hexl-insert-hex-char is supposed to change a character meaning the file > size should remain the same. But it actually deletes 7 bytes from the > file. Here is how to reproduce it: > > * In the shell, I ran: env printf > '\xee\x00\x4a\x7b\x30\x90\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 > 0\x00\x00\x00\x00\x00' >! /tmp/testfile > > * In the shell, I ran "env ls -l /tmp/testfile". It output: > > -rw-r--r-- 1 jburckhardt jburckhardt 23 Feb 7 17:27 /tmp/testfile > > * emacs -q /tmp/testfile & > > * M-x hexl-mode > > * M-x hexl-insert-hex-char > > * ff > > * C-x C-s > > * Type 'y' to acknowledge the warning about loss of undo info. > > * In the shell, I ran "env ls -l /tmp/testfile". It output: > > -rw-r--r-- 1 jburckhardt jburckhardt 16 Feb 7 17:29 /tmp/testfile > > Notice that the first ls command said 23 bytes, but the last ls command > said 16 bytes. So it lost 7 bytes. The second ls command should have > also said 23 bytes. > > This happened on GNU Emacs 23.1.1 on a machine whose "uname -a" says: > > Linux bb003-centos-02 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 > 23:51:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Thanks for the report. I cannot reproduce this problem with Emacs 24, so I guess this bug was already fixed.