From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: David Kastrup <dak@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: editing binary (hexa) data
Date: Thu, 17 May 2007 20:27:51 +0200 [thread overview]
Message-ID: <7D183048-B254-4CC1-8F89-EAAA6AC8DC20@Web.DE> (raw)
In-Reply-To: <85fy5vwefz.fsf@lola.goethe.zz>
Am 17.05.2007 um 19:24 schrieb David Kastrup:
> You mean
>
> M-x replace-regexp RET . RET \,(string-to-char \1) RET
No, I meant that the text is first written in ASCII as "text" and
then converted to ASCII values separated by spaces, i.e. the numbers
and spaces we've seen.
>
> (returns Emacs' internal coding, not unicode or latin-1).
So it is not converting "ASCII" characters to their values?
>
>> 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.
You're right: this is nonsense! The numbers already *are* the ASCII
values (and not the first, second, third ... letter, and the smallest
letter is, of course, capital A!), so it's not necessary to add the
smallest letter's ASCII value to the supposed ordinal. And two digits
are not enough for all ASCII characters, since d already has 100 in
decimal!
Why are you using ``\#&´´? Isn't \# meaning the back-reference?
--
Mit friedvollen Grüßen
Pete
A child of five could understand this! Fetch me a child of five.
prev parent reply other threads:[~2007-05-17 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 11:09 editing binary (hexa) data Peter Tury
2007-05-17 15:29 ` Peter Dyballa
[not found] ` <mailman.776.1179416261.32220.help-gnu-emacs@gnu.org>
2007-05-17 17:24 ` David Kastrup
2007-05-17 18:27 ` Peter Dyballa [this message]
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=7D183048-B254-4CC1-8F89-EAAA6AC8DC20@Web.DE \
--to=peter_dyballa@web.de \
--cc=dak@gnu.org \
--cc=help-gnu-emacs@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.