emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bob Newell <bobnewell@bobnewell.net>
To: emacs-orgmode@gnu.org
Subject: Re: Distinguish between blank and zero in org-mode spreadsheet
Date: Tue, 11 Dec 2012 04:50:50 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121211T054246-546@post.gmane.org> (raw)
In-Reply-To: 87r4mxv7l8.fsf@googlemail.com

I'm making it work, and using "L" rather than "S" turns out to be better, as in 
this revision of my example above:

$9 = '(if (eq "$2" "") "" (* @2$8 $1));L

But when I want different actions when there is an explicit number (including 0) 
vs. a blank cell, and if my action is at all complex, I end up with one monster 
like this:

$3 = '(if (eq "$2" "") "" (if (< $2 @2$8) 0 (calcFunc-max 0 (calcFunc-ilog (/ $2 
@2$8) 2))));L

and it just seems that "there oughta be a way" to do this with calc and outside 
of elisp. I've tried all sorts of calc things without success to date. 

(This gets even worse when you work with ranges and need to do operations on the 
cells in those ranges.)

I guess the upside is that with elisp you can eventually do almost anything that 
comes to mind, if you have enough patience.

 

  reply	other threads:[~2012-12-11  4:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 22:32 Distinguish between blank and zero in org-mode spreadsheet Bob Newell
2012-12-10 22:57 ` Thorsten Jolitz
2012-12-11  4:50   ` Bob Newell [this message]
2012-12-11  6:10     ` Nick Dokos
2012-12-11 15:14       ` Michael Brand
2012-12-15  9:15         ` Michael Brand
2012-12-15  9:23           ` Bastien
2012-12-28 14:10             ` Michael Brand
2012-12-29 13:39               ` 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=loom.20121211T054246-546@post.gmane.org \
    --to=bobnewell@bobnewell.net \
    --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).