all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Org functions in source blocks
@ 2022-12-09 20:41 William Denton
  2022-12-10  2:28 ` Max Nikulin
  0 siblings, 1 reply; 4+ messages in thread
From: William Denton @ 2022-12-09 20:41 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-13 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 20:41 Org functions in source blocks William Denton
2022-12-10  2:28 ` Max Nikulin
2022-12-12  3:23   ` William Denton
2022-12-13 15:05     ` Max Nikulin

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.