From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Oswald Subject: Creating Org Table using Calc on C-syntax hex integers Date: Wed, 24 Jun 2009 18:24:48 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJati-0002eV-2t for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 18:24:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJatd-0002dN-Sv for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 18:24:53 -0400 Received: from [199.232.76.173] (port=57421 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJatd-0002dC-Nh for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 18:24:49 -0400 Received: from mail-gx0-f211.google.com ([209.85.217.211]:45398) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJatd-0004dl-BI for emacs-orgmode@gnu.org; Wed, 24 Jun 2009 18:24:49 -0400 Received: by gxk7 with SMTP id 7so1716269gxk.18 for ; Wed, 24 Jun 2009 15:24:48 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on RELEASE Running on Windows XP Pro org-version 4.67c I have composed a table in org including integers using C-syntax hexadecima= l. | Variable Name | Current | Target.exe locn | Address of | = | | | Source | | reference | Del= ta | |---------------------------+---------+-----------------+------------+-----= ---| | read_thread_func | 0x11450 | 0x11450 | 0x113b8 | = | | MainWndProc | 0x18190 | 0x18190 | 0x11284 | = | | l_bData | 0x1d1b8 | 0x1d194 | 0x187d8 | 0x= 24 | I would like to create a formula that causes the difference between two columns in this format to be calculated and displayed (preferably, but not necessarily) in the same C-syntax, in the Delta column. (The 0x24 was calculated by hand in the above excerpt) The file itself is primarily an org file, not a C file, and I would prefer to keep the choice of C-syntax for Calc localized to this particular .org file, or even better, to this particular table. I have tried persuading the embedded calc mode to use the C "language mode" for the table, it seems like there should be a line like =A0% [calc-mode: language-mode: c] or % [calc-mode: calc-language-option: c] or some other thing that could be placed somewhere near the table or in the file to affect how Calc treats the numbers in the table, but I can't seem to figure how to make that happen. I find the Calc documentation of this stuff to be a little confusing, as to which names in the source and/or documentation apply to which context. It appears from the .el source that the settings specific to org-calc (i.e., following a semicolon after the formula are hard-coded to the limited set described in "Formula Syntax for Calc"), not including this setting. 1) Is it possible to do this? 2) If so, how? Thanks for your help. --Joe P.S. The org-mode info file "Feedback node" suggests mailing Carsten Dominik directly for "questions, remarks, or ideas" instead of this mailing list. I assumed this list was a more appropriate target.