emacs-orgmode
[Top][All Lists]
Advanced

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

proposed additions to org-collector code


From: Charles Millar
Subject: proposed additions to org-collector code
Date: Mon, 30 Aug 2021 18:18:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

First, I thank Slava Barinov for his proposed patch to appending a #+tblfm line to an org-collector table. Date: 17 Mar 2019 13:22:58 +0300
Message-ID: <87sgvl4wes.fsf@gmail.com> (raw)

Attached is my, in all modesty named, cm-org-collector.el in which I have added code to prepend name and attribute headers to the table, for example:

* orgcollector experiment
:PROPERTIES:
:ID: test
:END:

** Heading One


** Heading two

#+BEGIN: propview :id "test" :cols (ITEM) :noquote t :defaultval "" :tblfm "@>$>" :tblname "That" :tblattributes "#+attr_latex: somethingelse" :content ""
#+name: That
#+attr_latex: somethingelse
| ITEM                    |
|-------------------------|
| orgcollector experiment |
| Heading One             |
| Heading two             |
|-------------------------|
|                         |
#+tblfm: @>$>
#+END:

Please note that the :content param must be set to an empty string on the #+BEGIN: propview line. Without doing so, upon evaluation of the block, the table is updated; however, the following conditions result:
(error "(user-error Not at a table)")
the #+tblfm line is not replaced but an additional #+tblfm line is added, and the #+name and #+attr headers do not reflect any changes to :tblname and tblattributes if made in the propview line.

I realize that org-collector is an orphan and that it requires additional documentation. (See Bastien's comments to Slava's message.)

That said, if anyone so desires, please consider these additions, make all appropriate changes and corrections and patch them to org-coolector.el. I believe that this additional code makes org-collector more useful as database tool. Instead of having to add headers after evaluation, those headers would be inserted at the correct point when the propview is evaluated. The resulting table can be called from other code blocks. Also, the #+attr header allows, I believe, for exporting as desired. (I tried only a latex to pdf and it worked OK.)

I imagine other header params may be included as well.

Charlie Millar

Attachment: cm-org-collector.el
Description: Text Data


reply via email to

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