[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inspecting integer, float values from hexl-mode

From: Stefan Monnier
Subject: Re: Inspecting integer, float values from hexl-mode
Date: Fri, 04 Feb 2011 10:25:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>>>> "Alberto" == Alberto Luaces <address@hidden> writes:

> Hello,
> I'm inspecting a binary file with hexl-mode. I need to select some bytes
> and then be able to interpret their value as integer, or as float. I was
> wondering if there is a method for doing this since it seems that
> hexl-mode doesn't do that by default.

Not that I know, no.

> In case there isn't one, I suppose I would have to code my method
> calling the external `od' program to interpret the values.

That sounds like a reasonably straightforward way to do it, yes.

> The problem here would be how to compute the offset for the binary
> file that the selected region in emacs is representing.

The function hexl-current-address should do just that.

It would probably make sense to try and include such a feature in
hexl.el, so I encourage you to post your code for inclusion once you
have it working (and send it along for help if you have trouble getting
it to work, of course).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]