[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Org functions in source blocks
From: |
William Denton |
Subject: |
Org functions in source blocks |
Date: |
Fri, 9 Dec 2022 15:41:44 -0500 (EST) |
User-agent: |
Alpine 2.22 (DEB 394 2020-01-19) |
I ran org-lookup-all in a source block, but it didn't give any output. I think
I don't know something basic about Org or Lisp (likely both) and I hope someone
can point out what's going on.
For example, I have this table, and I can count how many times x appears:
#+name: test_table
| | A |
|---+---|
| ! | A |
| | x |
| | |
| | x |
| | x |
|---+---|
| # | 3 |
#+TBLFM: $2='(length(org-lookup-all "x" '(@I..@II) nil))
I can do the count from another table, referring to a remote table:
#+name: summary
| A |
|---|
| 3 |
#+TBLFM: @2$1='(length(org-lookup-all "x" '(remote(test_table, @I$A..@II$A))
nil))
But running org-lookup-all on its own like this gives result nil, not something
with some xs in it. Why not?
#+begin_src emacs-lisp :results raw
(org-lookup-all "x" '(remote(test_table, @I$A..@II$A)) nil)
#+end_src
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
- Org functions in source blocks,
William Denton <=