all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jacob Burckhardt <jburckhardt@pdvcorp.com>
To: 16686@debbugs.gnu.org
Subject: bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes
Date: Fri, 7 Feb 2014 17:42:45 -0800	[thread overview]
Message-ID: <D3888F1F9DD0EC458DF0C19A4D83EA5211057D68@exchange1> (raw)

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 <return>

* M-x hexl-insert-hex-char <return>

* ff <return>

* 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

-Jacob






             reply	other threads:[~2014-02-08  1:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08  1:42 Jacob Burckhardt [this message]
2014-02-08  9:04 ` bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Eli Zaretskii
2014-02-08  9:24 ` Andreas Schwab
2014-02-10 19:55   ` Jacob Burckhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D3888F1F9DD0EC458DF0C19A4D83EA5211057D68@exchange1 \
    --to=jburckhardt@pdvcorp.com \
    --cc=16686@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.