--- Begin Message ---
Subject: |
23.1; hexl-insert-hex-char shortens file by 7 bytes |
Date: |
Fri, 7 Feb 2014 17:42:45 -0800 |
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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes |
Date: |
Sat, 08 Feb 2014 11:04:05 +0200 |
> Date: Fri, 7 Feb 2014 17:42:45 -0800
> From: Jacob Burckhardt <address@hidden>
>
> 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
Thanks for the report. I cannot reproduce this problem with Emacs 24,
so I guess this bug was already fixed.
--- End Message ---