emacs-orgmode
[Top][All Lists]
Advanced

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

[O] org-mode table element selection WITH blanks elements


From: Niclas Borlin
Subject: [O] org-mode table element selection WITH blanks elements
Date: Thu, 20 Jun 2019 15:37:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

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: address@hidden
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



reply via email to

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