From: Niclas Borlin <niclas.borlin@cs.umu.se>
To: emacs-orgmode@gnu.org
Subject: org-mode table element selection WITH blanks elements
Date: Thu, 20 Jun 2019 15:37:36 +0200 [thread overview]
Message-ID: <9dead773-714b-cfe0-fa5c-aebcbba09ec4@cs.umu.se> (raw)
Hi,
How do you send a list of elements from a table, including blank cells,
to an elisp function?
I have the table below with points on exam questions in columns 2-4. The
second row contains the maximum number of points for each question. The
student rows contain the actual points received. I want to compute the
maximum possible sum for a student, to be updated while I grade the
questions.
I have written an elisp function that takes two lists as arguments and
does the necessary computations. However, the standard selection
argument ignores blank elements. In the function call below, the
function will receive the (fontified) lists '("3" "4") '("6" "4" "6")
and '("6" "2") '("6" "4" "6"), respectively. I need a selection where
each blank element is kept as, e.g., fontified "". Thus, I would like
the function to receive '("3" "4" "") '("6" "4" "6"), etc.
Is that possible?
Have tried google and the org manual to no avail.
#+NAME: PTS
| | Q1| Q2| Q3| | Max |
|-----------+---+---+---+-----+-----|
| | 6 | 4 | 6 | Sum | Sum |
|-----------+---+---+---+-----+-----|
| Student 1 | 3 | 4 | | 7 | 13 |
| Student 2 | 6 | | 2 | 8 | 12 |
#+TBLFM: @3$6..@>$6='(sum-with-defaults '(@0$2..@0$4) '(@2$2..@2$4)))
Thanks,
/Niclas Börlin
--
Niclas Borlin, PhD email: Niclas.Borlin@cs.umu.se
Department of Computing Science phone: +46 (0)90-786 68 32
Umea University fax: +46 (0)90-580 14
SE-901 87 Umea, SWEDEN lat/long: 63.49 N, 20.19 E
next reply other threads:[~2019-06-20 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 13:37 Niclas Borlin [this message]
2019-06-20 19:37 ` org-mode table element selection WITH blanks elements Nick Dokos
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9dead773-714b-cfe0-fa5c-aebcbba09ec4@cs.umu.se \
--to=niclas.borlin@cs.umu.se \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.