Re: Concatenating results

2022-10-03 Thread Felix Dorner
On Mon, Oct 3, 2022 at 11:28 AM Ihor Radchenko  wrote:

>
> #+begin_src emacs-lisp :noweb yes
>
> Thank you Ihor.
Felix



-- 
Linux. The choice of a GNU generation.


Re: Concatenating results

2022-10-03 Thread Ihor Radchenko
Felix Dorner  writes:

> I get an error with this:
> executing Emacs-Lisp code block...
> progn: Symbol’s value as variable is void: >>

That's because noweb references are disabled by default (see
https://orgmode.org/manual/Noweb-Reference-Syntax.html#Noweb-Reference-Syntax)

With default Org settings you need

#+begin_src emacs-lisp :noweb yes
(append
'<>
'<>)
#+end_src

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: Concatenating results

2022-10-03 Thread Felix Dorner
On Mon, Oct 3, 2022 at 10:44 AM Ihor Radchenko  wrote:

> #+name: block1
> #+begin_src emacs-lisp :results table
> '((1 2) (3 4))
> #+end_src
>
> #+name: block2
> #+begin_src emacs-lisp :results table
> '((5 6) (7 8))
> #+end_src
>
>
> #+begin_src emacs-lisp
> (append
> '<>
> '<>)
> #+end_src
>

I get an error with this:
executing Emacs-Lisp code block...
progn: Symbol’s value as variable is void: >>


Re: Concatenating results

2022-10-03 Thread Ihor Radchenko
Felix Dorner  writes:

> I have a list of N source blocks, of which each produces a table, and all
> these tables have the same column count. What is the easiest way to now
> make a single table which is the result of calling all these blocks and
> concatenating the result?
>
> Essentially, would be also the same as N CALL together but all append to
> the same result instead of a result for each CALL.

There are can be multiple ways to achieve what you want.

One way could be using noweb references:

#+name: block1
#+begin_src emacs-lisp :results table
'((1 2) (3 4))
#+end_src

#+name: block2
#+begin_src emacs-lisp :results table
'((5 6) (7 8))
#+end_src

 
#+begin_src emacs-lisp
(append
'<>
'<>)
#+end_src


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Concatenating results

2022-10-03 Thread Felix Dorner
I have a list of N source blocks, of which each produces a table, and all
these tables have the same column count. What is the easiest way to now
make a single table which is the result of calling all these blocks and
concatenating the result?

Essentially, would be also the same as N CALL together but all append to
the same result instead of a result for each CALL.

Btw thanks, this Org stuff is all so mind blowing.

-- 
Linux. The choice of a GNU generation.