From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Inspecting integer, float values from hexl-mode Date: Fri, 04 Feb 2011 10:25:38 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296834096 10931 80.91.229.12 (4 Feb 2011 15:41:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2011 15:41:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 04 16:41:32 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PlNmt-0002O3-NI for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Feb 2011 16:41:31 +0100 Original-Received: from localhost ([127.0.0.1]:36626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlNmt-0007dN-6Q for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Feb 2011 10:41:31 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.tcx.org.uk!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Injection-Info: mx01.eternal-september.org; posting-host="OMXwpkaPv7NstSbQ1F3FBA"; logging-data="18649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qgoFFZ9OviV5eQA1xU+Fo" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:T/JLs5JGBB0ZE38nh54CkP73SLM= sha1:ITbPk0KgvLgblXMGlrxuHsa37VA= Original-Xref: usenet.stanford.edu gnu.emacs.help:184804 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78958 Archived-At: >>>>> "Alberto" == Alberto Luaces 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). Stefan