* hexl-mode, while saving encoding problem
@ 2007-11-08 15:03 Gelika PAPP-RAFFY
2007-11-08 15:40 ` Peter Dyballa
0 siblings, 1 reply; 7+ messages in thread
From: Gelika PAPP-RAFFY @ 2007-11-08 15:03 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 493 bytes --]
Hello,
I am editing binary files with emacs (ID3 tags in .mp3 files).
I use the hexl-mode.
When I want to save my modifications I get the question "Selet coding system" and it is asking me to choose between several like undecided-unix, mule-utf-8, etc.
But I don't want to encode the text, it is pure binary!
I tried to do with the "undecided" but it still modifies (and corrupts) my file.
Is there any possibility to overcome this problem?
Thanks for any help,
Gelika
[-- Attachment #1.2: Type: text/html, Size: 1734 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hexl-mode, while saving encoding problem
2007-11-08 15:03 Gelika PAPP-RAFFY
@ 2007-11-08 15:40 ` Peter Dyballa
2007-11-09 8:36 ` Gelika PAPP-RAFFY
0 siblings, 1 reply; 7+ messages in thread
From: Peter Dyballa @ 2007-11-08 15:40 UTC (permalink / raw)
To: Gelika PAPP-RAFFY; +Cc: help-gnu-emacs
Am 08.11.2007 um 16:03 schrieb Gelika PAPP-RAFFY:
> I am editing binary files with emacs (ID3 tags in .mp3 files).
> I use the hexl-mode.
> When I want to save my modifications I get the question "Selet
> coding system" and it is asking me to choose between several like
> undecided-unix, mule-utf-8, etc.
There is a variable, file-coding-system-alist, that also lists file
name extensions for which no-conversion is applied upon reading or
writing. Obviously no-one has edited an MP3 file before, so this is
not mentioned there.
It might be worth to write a bug report and ask for this enhancement.
To solve your problem now you can add to your init file this code:
(add-to-list 'file-coding-system-alist '("\\.mp3\\'" . no-conversion))
To have it set at once put the line into the *scratch* buffer,
position the cursor at its end and press C-j. Then open, edit, and
save the MP3 file again.
--
Greetings
Pete
"Isn't vi that text editor with two modes... one that beeps and one
that corrupts your file?" -- Dan Jacobson, on comp.os.linux.advocacy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hexl-mode, while saving encoding problem
@ 2007-11-08 16:33 martin rudalics
0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2007-11-08 16:33 UTC (permalink / raw)
To: gelika.papp-raffy; +Cc: help-gnu-emacs
> I am editing binary files with emacs (ID3 tags in .mp3 files).
Is there a special mode for editing ID3 tags?
> I use the hexl-mode.
> When I want to save my modifications I get the question "Selet coding system"
> and it is asking me to choose between several like undecided-unix, mule-utf-8, etc.
Does it work when you use `find-file-literally' to open the file?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hexl-mode, while saving encoding problem
[not found] <mailman.3130.1194534207.18990.help-gnu-emacs@gnu.org>
@ 2007-11-08 19:02 ` Stefan Monnier
0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2007-11-08 19:02 UTC (permalink / raw)
To: help-gnu-emacs
> I am editing binary files with emacs (ID3 tags in .mp3 files).
> I use the hexl-mode.
> When I want to save my modifications I get the question "Selet coding system" and it is asking me to choose between several like undecided-unix, mule-utf-8, etc.
Sounds like a bug. Please report it with M-x report-emacs-bug.
Don't forget to include a recipe to reproduce it starting from "emacs -Q".
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: hexl-mode, while saving encoding problem
2007-11-08 15:40 ` Peter Dyballa
@ 2007-11-09 8:36 ` Gelika PAPP-RAFFY
2007-11-09 9:54 ` Peter Dyballa
0 siblings, 1 reply; 7+ messages in thread
From: Gelika PAPP-RAFFY @ 2007-11-09 8:36 UTC (permalink / raw)
To: Peter_Dyballa; +Cc: help-gnu-emacs
Thanks for your tip, it works fine.
Now I have a very basic problem: My emacs installation is on a virtual
machine with no internet access, so that I can not report the bug from emacs
directly.
If this is to be corrected as a bug, then there should be also other
compressed audio files added to this list (I didn't try to edit them so I am
not sure they would save wrongly): .wma, .aac, .m4a and probably also ogg
vorbis files, I don't know the extensions.
Thank you for the prompt support, I had been searching the net for quite a
while now *what* could be corrupting and how not to corrupt my files :-))))
Gelika
> -----Original Message-----
> From: Peter_Dyballa@Web.DE [mailto:Peter_Dyballa@Web.DE]
> Sent: Thursday, November 08, 2007 4:40 PM
> To: Gelika PAPP-RAFFY
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: hexl-mode, while saving encoding problem
>
>
> Am 08.11.2007 um 16:03 schrieb Gelika PAPP-RAFFY:
>
> > I am editing binary files with emacs (ID3 tags in .mp3 files).
> > I use the hexl-mode.
> > When I want to save my modifications I get the question "Selet
> > coding system" and it is asking me to choose between several like
> > undecided-unix, mule-utf-8, etc.
>
> There is a variable, file-coding-system-alist, that also lists file
> name extensions for which no-conversion is applied upon reading or
> writing. Obviously no-one has edited an MP3 file before, so this is
> not mentioned there.
>
> It might be worth to write a bug report and ask for this enhancement.
>
> To solve your problem now you can add to your init file this code:
>
> (add-to-list 'file-coding-system-alist '("\\.mp3\\'" .
> no-conversion))
>
> To have it set at once put the line into the *scratch* buffer,
> position the cursor at its end and press C-j. Then open, edit, and
> save the MP3 file again.
>
> --
> Greetings
>
> Pete
>
> "Isn't vi that text editor with two modes... one that beeps and one
> that corrupts your file?" -- Dan Jacobson, on comp.os.linux.advocacy
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hexl-mode, while saving encoding problem
2007-11-09 8:36 ` Gelika PAPP-RAFFY
@ 2007-11-09 9:54 ` Peter Dyballa
0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2007-11-09 9:54 UTC (permalink / raw)
To: Gelika PAPP-RAFFY; +Cc: help-gnu-emacs
Am 09.11.2007 um 09:36 schrieb Gelika PAPP-RAFFY:
> Now I have a very basic problem: My emacs installation is on a virtual
> machine with no internet access, so that I can not report the bug
> from emacs
> directly.
That does not matter! Just select the 'Send Bug Report...' entry from
the Help menu and copy the contents of the newly created *mail*
buffer into your eMail client's compose window. Do the same with
address and subject. Then complete the message's body.
> If this is to be corrected as a bug, then there should be also other
> compressed audio files added to this list (I didn't try to edit
> them so I am
> not sure they would save wrongly): .wma, .aac, .m4a and probably
> also ogg
> vorbis files, I don't know the extensions.
There is also FLAC (.flac) and SHTN (.shn) and there are many video
and graphics formats. Ogg Vorbis uses .ogg, at least in those
downloaded live concerts I have.
When filling out the bug report please concentrate on the failure of
hexl-mode, as Stefan Monnier emphasised. IMO too this should not have
happened, since no-one would edit a simple text file with an encoding
as a binary in hexl-mode. So there seems to be some bug when you're
asked to give some text encoding's name. Mentioning of file-coding-
system-alist should not be the bug report's main concern, merely a
remark describing how you solved your problem, since its purpose
might be aiming towards text files.
--
Greetings
Pete
"Let's face it; we don't want a free market economy either."
James Farley, president, Coca-Cola Export Corp., 1959
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: hexl-mode, while saving encoding problem
[not found] <mailman.3165.1194597393.18990.help-gnu-emacs@gnu.org>
@ 2007-11-10 0:31 ` Mark Hood
0 siblings, 0 replies; 7+ messages in thread
From: Mark Hood @ 2007-11-10 0:31 UTC (permalink / raw)
To: help-gnu-emacs
I often have to edit binary files of various types and run into the
same problem. The following works for me in those situations:
(setq default-enable-multibyte-characters nil)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-11-10 0:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3165.1194597393.18990.help-gnu-emacs@gnu.org>
2007-11-10 0:31 ` hexl-mode, while saving encoding problem Mark Hood
[not found] <mailman.3130.1194534207.18990.help-gnu-emacs@gnu.org>
2007-11-08 19:02 ` Stefan Monnier
2007-11-08 16:33 martin rudalics
-- strict thread matches above, loose matches on Subject: below --
2007-11-08 15:03 Gelika PAPP-RAFFY
2007-11-08 15:40 ` Peter Dyballa
2007-11-09 8:36 ` Gelika PAPP-RAFFY
2007-11-09 9:54 ` Peter Dyballa
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).