Hi all,

When using org-table-get-remote-range to retrieve a field, I find that
my return value changes depending on if I'm accessing the field via a
row-column reference or a field-name reference.

Here's an example:

--8<---------------cut here---------------start------------->8---
#+NAME: tbl/foo
|   |    42 |
| ^ | myfoo |

Traditional row-column references are returned as strings without any
decoration, as expected.

#+begin_src emacs-lisp :results value
    (let ((res (org-table-get-remote-range "tbl/foo" "@1$2")))
      (format "Type: %s\nValue: %s" (type-of res) res))
#+end_src

#+RESULTS:
: Type: string
: Value: 42

When using a field name, the result is still returned as a string but
is now enclosed in ().

#+begin_src emacs-lisp
  (let ((res (org-table-get-remote-range "tbl/foo" "$myfoo")))
      (format "Type: %s\nValue: %s" (type-of res) res))
#+end_src

#+RESULTS:
: Type: string
: Value: (42)
--8<---------------cut here---------------end--------------->8---

Why when I use the field name is my result enclosed in ()?
org-table-get-remote-range is smart enough to recognize I'm returning a
single value, hence the type being string and not cons. Is this a bug in
Org or a failure in my understanding?

I am on Org 9.6.15.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.

Reply via email to