[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editing binary (hexa) data
From: |
David Kastrup |
Subject: |
Re: editing binary (hexa) data |
Date: |
Thu, 17 May 2007 19:24:48 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) |
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 17.05.2007 um 11:09 schrieb Peter Tury:
>
>> Or perhaps you know some other mode for me?
>
> In GNU Emacs 22 you can use query-replace-regexp or replace-regexp to
> convert between ASCII and numeric:
>
> M-x replace-regexp RET \(.\) RET \,(string-to-number \1) RET
You mean
M-x replace-regexp RET . RET \,(string-to-char \1) RET
(returns Emacs' internal coding, not unicode or latin-1).
> or such and back with
>
> M-x replace-regexp RET \([1-9][0-9]\) RET \,(string (+ ?a \1)) RET
M-x replace-regexp RET [0-9]+ RET \,(string (+ ?a \#&)) RET
But why ?a? Weird.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum