From: Michael Brand <michael.ch.brand@gmail.com>
To: Emacs orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-spreadsheet: formatting chops off units
Date: Fri, 7 Sep 2012 19:28:32 +0200 [thread overview]
Message-ID: <CALn3zojiGmxX_sqhSgzh3QepVB-x-ZWfVa_Sd_G2hEeRxrgA7A@mail.gmail.com> (raw)
In-Reply-To: <CAG3md+t--GqAbA9ZONCReyrYkB1OR86ztqKWu97G7LEy4QobGA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Hi all
On Wed, Sep 5, 2012 at 11:46 PM, Kyle Andrews <kyle.c.andrews@gmail.com> wrote:
> [...]
> #+TBLFM: $2=uconvert($1, lb)
> [...]
> #+begin_src emacs-lisp
> (defmath uconvert (expression new-units)
> (math-convert-units expression new-units)))
> #+end_src
Calc `defmath' is not mentioned in the Org manual or on Worg, so I
suggest the attached patch for the Org manual.
Michael
[-- Attachment #2: 0001-org.texi-Mention-defmath.patch.txt --]
[-- Type: text/plain, Size: 1021 bytes --]
From 64c0fad8b4fddca4b8839fadc52d2f2e7086ebd6 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Fri, 7 Sep 2012 19:24:14 +0200
Subject: [PATCH] org.texi: Mention Calc defmath
* org.texi (Formula syntax for Calc): Add a sentence to mention Calc
defmath.
---
doc/org.texi | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/doc/org.texi b/doc/org.texi
index b82d5db..c9fc008 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2659,6 +2659,9 @@ if($1<20,teen,string("")) @r{"teen" if age $1 less than 20, else empty}
Note that you can also use two org-specific flags @code{T} and @code{t} for
durations computations @ref{Durations and time values}.
+You can add your own Calc functions defined in Emacs Lisp with @code{defmath}
+and use them in formula syntax for Calc.
+
@node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet
@subsection Emacs Lisp forms as formulas
@cindex Lisp forms, as table formulas
--
1.7.4.2
next prev parent reply other threads:[~2012-09-07 17:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 21:46 org-spreadsheet: formatting chops off units Kyle Andrews
2012-09-06 3:08 ` Nick Dokos
2012-09-06 5:15 ` Michael Brand
2012-09-07 17:28 ` Michael Brand [this message]
2012-09-12 7:51 ` Bastien
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALn3zojiGmxX_sqhSgzh3QepVB-x-ZWfVa_Sd_G2hEeRxrgA7A@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=emacs-orgmode@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).