emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] getting calc-units working in table formulas


From: Eric Abrahamsen
Subject: Re: [O] getting calc-units working in table formulas
Date: Wed, 17 Dec 2014 15:02:48 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Michael Brand <address@hidden> writes:

> Hi Eric
>
> On Wed, Dec 17, 2014 at 2:09 AM, Eric Abrahamsen
> <address@hidden> wrote:
>> Lastly, is there a way to both use output formatting, and retain the
>> unit name (if desired)? Right now I get this:
>>
>> | km    | units | conversion |
>> |-------+-------+------------|
>> | 2.5km | ft    |    8202.10 |
>> #+TBLFM: $3=uconvert($1, $2); %.2f
>>
>> Ie, the "ft" falls off the results when I add the "%.2f". Is it possible
>> to retain that and have formatting?
>
> Yes, see
> "org-spreadsheet: formatting chops off units"
> http://thread.gmane.org/gmane.emacs.orgmode/59928

I'm certainly late to this party! My only excuse is that it's far from
obvious, given the current manual, that all this is available (even
after your documentation patch in the referenced thread).

Just to note, the second of the two formatting solutions you mentioned
(manually adding the units as a string) seems to no longer work. The
first does, however.

I'll work up a slightly longer documentation patch in the next couple of
days -- I really think people should be alerted to what's possible with
units. The "uconvert" defmath could even just be an example in the
manual, rather than code that ships with Org.

E




reply via email to

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