unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes
@ 2014-02-08  1:42 Jacob Burckhardt
  2014-02-08  9:04 ` Eli Zaretskii
  2014-02-08  9:24 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Jacob Burckhardt @ 2014-02-08  1:42 UTC (permalink / raw)
  To: 16686

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






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes
  2014-02-08  1:42 bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Jacob Burckhardt
@ 2014-02-08  9:04 ` Eli Zaretskii
  2014-02-08  9:24 ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2014-02-08  9:04 UTC (permalink / raw)
  To: Jacob Burckhardt; +Cc: 16686-done

> Date: Fri, 7 Feb 2014 17:42:45 -0800
> From: Jacob Burckhardt <jburckhardt@pdvcorp.com>
> 
> 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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes
  2014-02-08  1:42 bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Jacob Burckhardt
  2014-02-08  9:04 ` Eli Zaretskii
@ 2014-02-08  9:24 ` Andreas Schwab
  2014-02-10 19:55   ` Jacob Burckhardt
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2014-02-08  9:24 UTC (permalink / raw)
  To: Jacob Burckhardt; +Cc: 16686

Jacob Burckhardt <jburckhardt@pdvcorp.com> writes:

> This happened on GNU Emacs 23.1.1 on a machine whose "uname -a" says:

Emacs 23.1 is no longer supported, please retest with the newest
version.  I cannot reproduce that with Emacs 24.3.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes
  2014-02-08  9:24 ` Andreas Schwab
@ 2014-02-10 19:55   ` Jacob Burckhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jacob Burckhardt @ 2014-02-10 19:55 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 16686

Andreas writes:

> Jacob Burckhardt <jburckhardt@pdvcorp.com> writes:
> 
> > This happened on GNU Emacs 23.1.1 on a machine whose "uname -a"
says:
> 
> Emacs 23.1 is no longer supported, please retest with the newest
> version.  I cannot reproduce that with Emacs 24.3.

You are right.  I do not have easy access to Emacs 24, but I found a
machine with Emacs 23.4.1, and that too worked correctly.  I'm sorry to
submit a report about something already fixed.

-Jacob







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-10 19:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-08  1:42 bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Jacob Burckhardt
2014-02-08  9:04 ` Eli Zaretskii
2014-02-08  9:24 ` Andreas Schwab
2014-02-10 19:55   ` Jacob Burckhardt

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).