Re: [O] org-collector

2018-06-28 Thread Colin Baxter
> "Nicolas" == Nicolas Goaziou  writes:

Nicolas> Hello, Colin Baxter  writes:

>> I do not want any output fields of the tables generated by
>> org-collector to show double quotes ("). To achieve this, I
>> changed the stringformat variable at line 136 of org-collector.el
>> to
>> 
>> (setq stringformat (if noquote "%s" "%s"))
>> 
>> Is there a more elegant way to do this other than my clumsy,
>> cargo-cult effort?

Nicolas> Have you tried using :noquote t property?

No I hadn't - but should have. Thank you.

Best wishes,

Colin.



Re: [O] org-collector

2018-06-28 Thread Nicolas Goaziou
Hello,

Colin Baxter  writes:

> I do not want any output fields of the tables generated by org-collector
> to show double quotes ("). To achieve this, I changed the stringformat
> variable at line 136 of org-collector.el to
>
> (setq stringformat (if noquote "%s" "%s"))
>
> Is there a more elegant way to do this other than my clumsy, cargo-cult
> effort?

Have you tried using :noquote t property?

Regards,

-- 
Nicolas Goaziou



[O] org-collector

2018-06-28 Thread Colin Baxter


Hello,

I do not want any output fields of the tables generated by org-collector
to show double quotes ("). To achieve this, I changed the stringformat
variable at line 136 of org-collector.el to

(setq stringformat (if noquote "%s" "%s"))

Is there a more elegant way to do this other than my clumsy, cargo-cult
effort?

Thank you.


Colin Baxter
m43...@yandex.com
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-




Re: [O] org-collector - Date-based conditions

2017-12-06 Thread Gonzalo Camarillo
Hi,

after investigating a bit, it turns out the condition can be any elisp
expression. So, the following block lists all items with SCHEDULED dates
up to today:

#+BEGIN: propview :conds  ((string< (org-read-date nil nil SCHEDULED)
(org-read-date nil nil "+1"))) :cols (ITEM EFFORT)

#+END:


However, per the second part of my initial question, I am still unable
to have a block only list items with no TODO keyword. Interestingly,
simply adding the TODO property to the conditions makes items with no
TODO keyword *not* be listed at all. For example, the block below will
list items with TODO keywords different than "WAITING", but it will not
include items with no TODO keyword for some reason:

#+BEGIN: propview :conds  ((not (string= TODO "WAITING"))) :cols (ITEM
EFFORT)

#+END:

So, the block above will include Item A below, but not Item C.

* TODO Item A
* WAITING Item B
* Item C

Any ideas how to fix that?

Thanks,

Gonzalo

On 05/12/2017 7:13 PM, Gonzalo Camarillo wrote:
> Hi,
> 
> I am using org-collector to generate agenda views. For example, the
> following block includes all items whose TODO keyword is "WAITING":
> 
> #+BEGIN: propview :conds ((string= TODO "WAITING")) :cols (ITEM EFFORT)
> 
> #+END:
> 
> I would like to add an additional condition based on the SCHEDULED
> property of items. I would like to list all items whose SCHEDULED
> property is less (earlier) or equal than today. How can I write such a
> condition?
> 
> To do the above using org-agenda-custom-commands, I use the following:
> 
>   tags "TODO=\"WAITING\"+SCHEDULED<=\"\""
> 
> I would like to do the same using org-collector instead.
> 
> 
> Additionally, how can I write a condition to select items without a TODO
> keyword? I try (string= TODO "") but it does not seem to work.
> 
> Thanks,
> 
> Gonzalo
> 



[O] org-collector - Date-based conditions

2017-12-05 Thread Gonzalo Camarillo
Hi,

I am using org-collector to generate agenda views. For example, the
following block includes all items whose TODO keyword is "WAITING":

#+BEGIN: propview :conds ((string= TODO "WAITING")) :cols (ITEM EFFORT)

#+END:

I would like to add an additional condition based on the SCHEDULED
property of items. I would like to list all items whose SCHEDULED
property is less (earlier) or equal than today. How can I write such a
condition?

To do the above using org-agenda-custom-commands, I use the following:

  tags "TODO=\"WAITING\"+SCHEDULED<=\"\""

I would like to do the same using org-collector instead.


Additionally, how can I write a condition to select items without a TODO
keyword? I try (string= TODO "") but it does not seem to work.

Thanks,

Gonzalo




Re: [O] org-collector not working

2017-01-10 Thread Charles Millar

Hi Malte,


On 01/02/2017 01:07 PM, Malte Deiseroth wrote:

Hello

The org-collector seems to be broken. I followed the instructions on:
http://orgmode.org/worg/org-contrib/org-collector.html

Instead of:
#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:

I get:

#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| ITEM | amount |
|--+|
|--+|
|  ||
#+END:

and instead of:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
|
"ITEM"
| "(+ 400 amount)" |
|-+--|
| "December Spending
:example:" |0 |
| "Week
One"
|0 |
| "Grocery Store [2008-12-01
Mon]"|   456.77 |
| "Athletic club [2008-12-02
Tue]"|475.0 |
| "Week Two
"
|0 |
| "Restaurant [2008-12-08
Mon]"   |   430.67 |
|-+--|
|
|  |
#+END:


I get:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM | (+ 400 amount) |
|--+|
| "** December Spending"   |  0 |
| "*** Week One"   |  0 |
| " Grocery Store [2008-12-01 Mo]" |  0 |
| " Athletic club [2008-12-02 Di]" |  0 |
| "*** Week Two"   |  0 |
| " Restaurant [2008-12-08 Mo]"|  0 |
|--+|
|  ||
#+END:

Basically all the columns/properties are always 0. I tried also with
other properties, but nothing worked.
I have nothing in the *Messages* or *Warnigns* buffer to post here.
I might be doing something wrong. Its the first time using org-collector
for me.
I'm using emacs 25.1.1. I believe org-mode and org-collector are shipped
by default with this.
Any help would be appreciated.

Cheers Malte



See the discussion at the list 
https://www.mail-archive.com/emacs-orgmode@gnu.org/msg104915.html.
Nicolas Goaziou pointed out that

 'snip ((string= SPENDTYPE "food"))
snip
Properties are returned upper-cased by `org-entry-properties'.

Charlie Millar
 





[O] org-collector not working

2017-01-09 Thread Malte Deiseroth
Hello

The org-collector seems to be broken. I followed the instructions on:
http://orgmode.org/worg/org-contrib/org-collector.html

Instead of:
#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:

I get:

#+BEGIN: propview :id "december" :conds ((string= spendtype "food"))
:cols (ITEM amount)
| ITEM | amount |
|--+|
|--+|
|  ||
#+END:

and instead of:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
|
"ITEM" 
| "(+ 400 amount)" |
|-+--|
| "December Spending  
:example:" |0 |
| "Week
One" 
|0 |
| "Grocery Store [2008-12-01
Mon]"|   456.77 |
| "Athletic club [2008-12-02
Tue]"|475.0 |
| "Week Two
"
|0 |
| "Restaurant [2008-12-08
Mon]"   |   430.67 |
|-+--|
|   
 
|  |
#+END:


I get:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM | (+ 400 amount) |
|--+|
| "** December Spending"   |  0 |
| "*** Week One"   |  0 |
| " Grocery Store [2008-12-01 Mo]" |  0 |
| " Athletic club [2008-12-02 Di]" |  0 |
| "*** Week Two"   |  0 |
| " Restaurant [2008-12-08 Mo]"|  0 |
|--+|
|  ||
#+END:

Basically all the columns/properties are always 0. I tried also with
other properties, but nothing worked.
I have nothing in the *Messages* or *Warnigns* buffer to post here.
I might be doing something wrong. Its the first time using org-collector
for me.
I'm using emacs 25.1.1. I believe org-mode and org-collector are shipped
by default with this.
Any help would be appreciated.

Cheers Malte






Re: [O] org-collector - propview display problems

2016-03-15 Thread dche
Many thanks, I am going to use org-collector again.

It would be great if org-collector could implement kind of regular 
expression in the research of string.
For example with the example provides for org-collector something like 
:conds ((string= SPENDTYPE "health|food")) 
to look for health or food
I don't even know if it possible and I don't have the skill in programming 
to implement such function. Just an expression of a wish. 

Thank you again.





Re: [O] org-collector - propview display problems

2016-03-14 Thread Charles Millar

Nicolas,

On 03/14/2016 08:36 AM, Nicolas Goaziou wrote:

Hello,

dche  writes:


I have just done the test and I have the following ouptut

#+BEGIN: propview :id "december" :conds ((string= SPENDTYPE "food")) :cols
(ITEM AMOUNT)
| ITEM   | AMOUNT |
|+|
| " Grocery Store [2008-12-01 lun.]" |  56.77 |
| " Restaurant [2008-12-08 lun.]"|  30.67 |
|+|
|||
#+END:

Which is nearly the same as the example provides :

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:


I don't know if it is possible to get rid of the stars for the ITEM
entries.

This is already the case in the development version.

Regards,


Please let me know what I am missing or if I am just plain nuts.

I copied the org-collector example into my scratchorg file. Before 
executing he first propview block, I killed the following entry


 Grocery Store [2008-12-01 Mon]
 :PROPERTIES:
 :amount: 56.77
 :spendtype: food
 :END:

I made sure that spendtype and amount in all other entries and in the 
propview blocks were upper cased.

I made sure that the first propview block had no results so it was just

#+BEGIN: propview :id "december" :conds ((string= SPENDTYPE "food")) 
:cols (ITEM AMOUNT)

#+END:

When executed (C-c C-c) the result still was

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols 
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 | - how possible if there is no 
entry??
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:

In the example is :id somehow "hardwired" into the expected results. 
Please note that I also entered, not copied,  the first propview block 
(without the results) character by character into the buffer, executed 
and the Grocery Store still showed up!


If I upper case ID, I get the expected results

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols 
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:

Should all options be upper cased as well? Or what should I read as to 
:id properties?


Charlie Millar



Re: [O] org-collector - propview display problems

2016-03-14 Thread Charles Millar

Nicolas,

On 03/14/2016 08:36 AM, Nicolas Goaziou wrote:

Hello,

dche  writes:


I have just done the test and I have the following ouptut

#+BEGIN: propview :id "december" :conds ((string= SPENDTYPE "food")) :cols
(ITEM AMOUNT)
| ITEM   | AMOUNT |
|+|
| " Grocery Store [2008-12-01 lun.]" |  56.77 |
| " Restaurant [2008-12-08 lun.]"|  30.67 |
|+|
|||
#+END:

Which is nearly the same as the example provides :

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:


I don't know if it is possible to get rid of the stars for the ITEM
entries.

This is already the case in the development version.

Regards,

Thank you for clarifying this. I just tried the example file again 
(after changing all properties to upper-case) and it now works as 
expected. (BTW I am using Org-mode version 8.3.4 
(release_8.3.4-655-g9fb077 @ 
/usr/local/share/emacs/site-lisp/org-mode/lisp/)


Charlie Millar



Re: [O] org-collector - propview display problems

2016-03-14 Thread Nicolas Goaziou
Hello,

dche  writes:

> I have just done the test and I have the following ouptut 
>
> #+BEGIN: propview :id "december" :conds ((string= SPENDTYPE "food")) :cols 
> (ITEM AMOUNT)
> | ITEM   | AMOUNT |
> |+|
> | " Grocery Store [2008-12-01 lun.]" |  56.77 |
> | " Restaurant [2008-12-08 lun.]"|  30.67 |
> |+|
> |||
> #+END:
>
> Which is nearly the same as the example provides :
>
> #+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
> (ITEM amount)
> | "ITEM"   | "amount" |
> |--+--|
> | "Grocery Store [2008-12-01 Mon]" |56.77 |
> | "Restaurant [2008-12-08 Mon]"|30.67 |
> |--+--|
> |  |  |
> #+END:
>
>
> I don't know if it is possible to get rid of the stars for the ITEM 
> entries.

This is already the case in the development version.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector - propview display problems

2016-03-14 Thread dche
Thank you.

I have just done the test and I have the following ouptut 


#+BEGIN: propview :id "december" :conds ((string= SPENDTYPE "food")) :cols 
(ITEM AMOUNT)
| ITEM   | AMOUNT |
|+|
| " Grocery Store [2008-12-01 lun.]" |  56.77 |
| " Restaurant [2008-12-08 lun.]"|  30.67 |
|+|
|||
#+END:


Which is nearly the same as the example provides :

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:


I don't know if it is possible to get rid of the stars for the ITEM 
entries. 
Thank you again. I will use org-collector again.

Regards




Re: [O] org-collector - propview display problems

2016-03-13 Thread Nicolas Goaziou
Hello,

dche  writes:

> With my actual configuration Org-mode 8.3.4 and GNU Emacs 24.3.1
> (i386-mingw-nt6.1.7601), I get the following output :
>
>
> #+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols 
>
> #+END:

It should be ((string= SPENDTYPE "food")).

> #+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"

Here: (ITEM (+ 400 AMOUNT))

Properties are returned upper-cased by `org-entry-properties'.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector - propview display problems

2016-03-03 Thread dche
Thank you.

In the first post I used the example proposed in the description of
org-collector that is accessible at this link. 


http://orgmode.org/worg/sources/org-contrib/org-collector-example.org


With this example org-collector is able to gather in a table with the use 
of propview in a #+BEGIN #+END block. To display the table, you have to use
C-c C-c in front of the #+BEGIN: instruction.

With the example proposed in the link  the following results are displayed  :

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
(ITEM amount)
| "ITEM"   | "amount" |
|--+--|
| "Grocery Store [2008-12-01 Mon]" |56.77 |
| "Restaurant [2008-12-08 Mon]"|30.67 |
|--+--|
|  |  |
#+END:




With my actual configuration Org-mode 8.3.4 and GNU Emacs 24.3.1
(i386-mingw-nt6.1.7601), I get the following output :


#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols 

#+END:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM   | (+ 400 amount) |
|+|
| "** December Spending" |  0 |
| "*** Week One" |  0 |
| " Grocery Store [2008-12-01 lun.]" |  0 |
| " Athletic club [2008-12-02 mar.]" |  0 |
| "*** Week Two" |  0 |
| " Restaurant [2008-12-08 lun.]"|  0 |
|+|
|||
#+END:

The org-collector function is previously loaded with (require 'org-collector)

Regards




Re: [O] org-collector - propview display problems

2016-03-03 Thread Nicolas Goaziou
Hello,

dche  writes:

> This function interested me in order to produce subset of data in tabular 
> with search criteria included in properties field. I hoped to
> use this kind of approach as a kind of database and possibly use one of 
> property field to include an information about a link to a file or the use 
> of attachment (if possible this way).
>
> This function is in contrib folder. Is this status that makes it not 
> supported ?

Some are supported by their author, others are not. I think this library
is not maintained anymore.

In any case, could you provide an ECM (with an emphasized "M")? I'll try
to have a look at it.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector - propview display problems

2016-03-02 Thread dche
This function interested me in order to produce subset of data in tabular 
with search criteria included in properties field. I hoped to
use this kind of approach as a kind of database and possibly use one of 
property field to include an information about a link to a file or the use 
of attachment (if possible this way).

This function is in contrib folder. Is this status that makes it not 
supported ?

Regards






Re: [O] org-collector - propview display problems

2016-03-01 Thread Charles Millar

Hi,

On 02/29/2016 01:04 PM, dche wrote:

Hello

I tried to use org-collector with the example propose
at this link http://orgmode.org/worg/org-contrib/org-collector.html

I would like to use propview as cited in example but whatever I do,
I get the outputs below.



* Example

#+BEGIN: propview :cols (ITEM amount)
| ITEM   | amount |
|+|
| "* Example"|  0 |
| "** December Spending" |  0 |
| "*** Week One" |  0 |
| " Grocery Store [2008-12-01 lun.]" |  0 |
| " Athletic club [2008-12-02 mar.]" |  0 |
| "*** Week Two" |  0 |
| " Restaurant [2008-12-08 lun.]"|  0 |
|+|
|||
#+END:

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols
(ITEM amount)
| ITEM | amount |
|--+|
|--+|
|  ||
#+END:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM   | (+ 400 amount) |
|+|
| "** December Spending" |  0 |
| "*** Week One" |  0 |
| " Grocery Store [2008-12-01 lun.]" |  0 |
| " Athletic club [2008-12-02 mar.]" |  0 |
| "*** Week Two" |  0 |
| " Restaurant [2008-12-08 lun.]"|  0 |
|+|
|||
#+END:

** December Spending
   :example:
:PROPERTIES:
:ID: december
:END:

*** Week One
 Grocery Store [2008-12-01 Mon]
  :PROPERTIES:
  :amount: 56.77
  :spendtype: food
  :END:
 Athletic club [2008-12-02 Tue]
  :PROPERTIES:
  :amount: 75.00
  :spendtype: health
  :END:
*** Week Two
 Restaurant [2008-12-08 Mon]
  :PROPERTIES:
  :amount: 30.67
  :spendtype: food
  :END:

The item is not extracted as expected (there are "*" that are also
displayed corresponding of the level of entries) and the extracted
field is zero whatever of the effective value of this field (here
amount).

This is test with 8.3.4 and GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601).



I believe this is the same problem or bug I reported in April 2015! 
Others have also brought attention it to this, but nothing has been done 
to fix it.


Charlie Millar



[O] org-collector - propview display problems

2016-03-01 Thread dche
Hello 

I tried to use org-collector with the example propose
at this link http://orgmode.org/worg/org-contrib/org-collector.html

I would like to use propview as cited in example but whatever I do,
I get the outputs below.



* Example

#+BEGIN: propview :cols (ITEM amount)
| ITEM   | amount |
|+|
| "* Example"|  0 |
| "** December Spending" |  0 |
| "*** Week One" |  0 |
| " Grocery Store [2008-12-01 lun.]" |  0 |
| " Athletic club [2008-12-02 mar.]" |  0 |
| "*** Week Two" |  0 |
| " Restaurant [2008-12-08 lun.]"|  0 |
|+|
|||
#+END:

#+BEGIN: propview :id "december" :conds ((string= spendtype "food")) :cols 
(ITEM amount)
| ITEM | amount |
|--+|
|--+|
|  ||
#+END:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match "example"
| ITEM   | (+ 400 amount) |
|+|
| "** December Spending" |  0 |
| "*** Week One" |  0 |
| " Grocery Store [2008-12-01 lun.]" |  0 |
| " Athletic club [2008-12-02 mar.]" |  0 |
| "*** Week Two" |  0 |
| " Restaurant [2008-12-08 lun.]"|  0 |
|+|
|||
#+END:

** December Spending
   :example:
   :PROPERTIES:
   :ID: december
   :END:

*** Week One
 Grocery Store [2008-12-01 Mon]
 :PROPERTIES:
 :amount: 56.77
 :spendtype: food
 :END:
 Athletic club [2008-12-02 Tue]
 :PROPERTIES:
 :amount: 75.00
 :spendtype: health
 :END:
*** Week Two 
 Restaurant [2008-12-08 Mon]
 :PROPERTIES:
 :amount: 30.67
 :spendtype: food
 :END:

The item is not extracted as expected (there are "*" that are also 
displayed corresponding of the level of entries) and the extracted
field is zero whatever of the effective value of this field (here 
amount).

This is test with 8.3.4 and GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601).



Regards







Re: [O] org-collector unable to handle macros

2015-09-28 Thread Aaron Ecay
Hi Nicolas,

2015ko irailak 19an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Aaron Ecay  writes:
> 
>> This looks like the same problem I reported (and provided a patch for) here:
>> .  Some orgtbl-*
>> functions can’t cope with macro (or macro-resembling) text, because they
>> use the exporter, which expects all macros to have valid definitions.
>> 
>> Hopefully this time the bug can actually get fixed, instead of becoming
>> bogged down in irrelevant aspects of the context in which it is
>> reported.
> 
> Fixed. Thank you.

Thanks.  I can confirm that the bug no longer manifests in the context I
reported (babel results).

-- 
Aaron Ecay



Re: [O] org-collector unable to handle macros

2015-09-24 Thread Achim Gratz
Nicolas Goaziou writes:
>> It seems that there is no table returned or the interpretation of the
>> returned data as a table fails.
>
> I just applied a patch that may fix these issues.

This bug is fixed, thank you.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] org-collector unable to handle macros

2015-09-23 Thread Achim Gratz
Nicolas Goaziou writes:
> Fixed. Thank you.

That commit 6d2ab4071960f8a7f20138291424b468722ab522 breaks three R
tests for me on Linux (not that other R tests do run correctly):

3 unexpected results:
   FAILED  test-ob-R/colnames-nil-header-argument
   FAILED  test-ob-R/colnames-no-header-argument
   FAILED  test-ob-R/colnames-yes-header-argument

It seems that there is no table returned or the interpretation of the
returned data as a table fails.

Test test-ob-R/colnames-nil-header-argument condition:
(user-error "Empty table - created default table")
   FAILED  130/599  test-ob-R/colnames-nil-header-argument
Test test-ob-R/colnames-no-header-argument condition:
(ert-test-failed
 ((should
   (equal '...
(org-babel-execute-src-block)))
  :form
  (equal
   (("col")
("a")
("b"))
   nil)
  :value nil :explanation
  (different-types
   (("col")
("a")
("b"))
   nil)))
   FAILED  131/599  test-ob-R/colnames-no-header-argument
Test test-ob-R/colnames-yes-header-argument condition:
(user-error "Empty table - created default table")
   FAILED  132/599  test-ob-R/colnames-yes-header-argument


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] org-collector unable to handle macros

2015-09-23 Thread Nicolas Goaziou
Hello,

Achim Gratz  writes:


> That commit 6d2ab4071960f8a7f20138291424b468722ab522 breaks three R
> tests for me on Linux (not that other R tests do run correctly):
>
> 3 unexpected results:
>FAILED  test-ob-R/colnames-nil-header-argument
>FAILED  test-ob-R/colnames-no-header-argument
>FAILED  test-ob-R/colnames-yes-header-argument
>
> It seems that there is no table returned or the interpretation of the
> returned data as a table fails.

I just applied a patch that may fix these issues.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector unable to handle macros

2015-09-19 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> This looks like the same problem I reported (and provided a patch for) here:
> .  Some orgtbl-*
> functions can’t cope with macro (or macro-resembling) text, because they
> use the exporter, which expects all macros to have valid definitions.
>
> Hopefully this time the bug can actually get fixed, instead of becoming
> bogged down in irrelevant aspects of the context in which it is
> reported.

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector unable to handle macros

2015-09-11 Thread Mark Edgington
Aaron Ecay  gmail.com> writes:

> 
> This looks like the same problem I reported (and provided a patch for) here:
> .  Some orgtbl-*
> functions can’t cope with macro (or macro-resembling) text, because they
> use the exporter, which expects all macros to have valid definitions.
> 
> Hopefully this time the bug can actually get fixed, instead of becoming
> bogged down in irrelevant aspects of the context in which it is
> reported.
> 

The link you provided doesn't seem to be a valid URL.  Can you check it, and
post a new one?



Re: [O] org-collector unable to handle macros

2015-09-11 Thread Nick Dokos
Mark Edgington  writes:

> Aaron Ecay  gmail.com> writes:
>
>> 
>> This looks like the same problem I reported (and provided a patch for) here:
>> .  Some orgtbl-*
>> functions can’t cope with macro (or macro-resembling) text, because they
>> use the exporter, which expects all macros to have valid definitions.
>> 
>> Hopefully this time the bug can actually get fixed, instead of becoming
>> bogged down in irrelevant aspects of the context in which it is
>> reported.
>> 
>
> The link you provided doesn't seem to be a valid URL.  Can you check it, and
> post a new one?

In a (probably vain) attempt to make life harder for spammers, gmane
mangles email addresses by changing the "@" sign (shift-2 on US
keyboards[fn:1]) to "  ". If you reverse that transformation on the
link above, you'll get to the article - which BTW can also be found at

http://article.gmane.org/gmane.emacs.orgmode/93840

Nick

Footnotes:

[fn:1]  Note that even though I typed it literally above, gmane
will most probably change it to the mangled form when you
see this.




Re: [O] org-collector unable to handle macros

2015-09-09 Thread Aaron Ecay
Hi Nicolas,

2015ko irailak 8an, Nicolas Goaziou-ek idatzi zuen:
> 
> Mark Edgington  writes:
> 
>> Can you explain what you mean about using CUSTOM_ID in the context of
>> org-collector?
> 
> :ID: is special property, which is usually set with `org-id-get-create'.
> Creating it by any other mean can introduce error during export.
> 
>> Maybe I misunderstood something. Do you think the reason that a table
>> can't be generated from my example code is that org-collector is
>> somehow trying to expand the macros when the table is generated?
> 
> I didn't check org-collector library, so I don't know the problem and
> didn't take time for serious debugging. I'm just trying to point out
> what seems to be a mistake in your ECM.

This looks like the same problem I reported (and provided a patch for) here:
.  Some orgtbl-*
functions can’t cope with macro (or macro-resembling) text, because they
use the exporter, which expects all macros to have valid definitions.

Hopefully this time the bug can actually get fixed, instead of becoming
bogged down in irrelevant aspects of the context in which it is
reported.

-- 
Aaron Ecay



Re: [O] org-collector unable to handle macros

2015-09-08 Thread Nicolas Goaziou
Mark Edgington  writes:

> Can you explain what you mean about using CUSTOM_ID in the context of
> org-collector?

:ID: is special property, which is usually set with `org-id-get-create'.
Creating it by any other mean can introduce error during export.

> Maybe I misunderstood something. Do you think the reason that a table
> can't be generated from my example code is that org-collector is
> somehow trying to expand the macros when the table is generated?

I didn't check org-collector library, so I don't know the problem and
didn't take time for serious debugging. I'm just trying to point out
what seems to be a mistake in your ECM.

Regards,



Re: [O] org-collector unable to handle macros

2015-09-08 Thread Mark Edgington
Nicolas Goaziou  nicolasgoaziou.fr> writes:

> 
> Mark Edgington  gmail.com> writes:
> 
> > On Aug 31, 2015 6:43 PM, "Nicolas Goaziou"  nicolasgoaziou.fr>
wrote:
> >>
> >> Hello,
> >>
> >> Mark Edgington  gmail.com> writes:
> >> >
> >> > Have you (or anyone else) been able to reproduce the problem given the
> >> > example which I provided?  Is this indeed a bug, or am I
> > misunderstanding
> >> > something?
> >>
> >>   :INCLASS:  ABC {{{c(stuff)}}} DEF
> >>
> >> looks incorrect. Macros are not expanded in node properties (with an
> >> exception for :EXPORT_SOMETHING: when #+SOMETHING is parsed).
> >
> > It is not intended to be expanded when generating the table, but the table
> > should have the macro in it, so that it gets expanded when the table is
> > exported.
> 
> OK. Then another problem:
> 
>   :ID: sched_table
> 
> ID properties are meant to be set with `org-id'. What about using
> CUSTOM_ID instead?

Hi Nicolas,

Can you explain what you mean about using CUSTOM_ID in the context of
org-collector?  Maybe I misunderstood something.  Do you think the reason
that a table can't be generated from my example code is that org-collector
is somehow trying to expand the macros when the table is generated?  I
assume that the correct behavior should be for it to *not* expand macros,
and just pass them through verbatim into the table-fields.

Regards,

Mark






Re: [O] org-collector unable to handle macros

2015-08-31 Thread Mark Edgington
Charles Millar  verizon.net> writes:

> This may be related to the problem or is the same that I reported in 
> April and May and again earlier this month when Bastien's requested 
> details in his August 4th message.

Have you (or anyone else) been able to reproduce the problem given the
example which I provided?  Is this indeed a bug, or am I misunderstanding
something?








Re: [O] org-collector unable to handle macros

2015-08-31 Thread Nicolas Goaziou
Hello,

Mark Edgington  writes:

> Charles Millar  verizon.net> writes:
>
>> This may be related to the problem or is the same that I reported in 
>> April and May and again earlier this month when Bastien's requested 
>> details in his August 4th message.
>
> Have you (or anyone else) been able to reproduce the problem given the
> example which I provided?  Is this indeed a bug, or am I misunderstanding
> something?

  :INCLASS:  ABC {{{c(stuff)}}} DEF

looks incorrect. Macros are not expanded in node properties (with an
exception for :EXPORT_SOMETHING: when #+SOMETHING is parsed).


Regards,

-- 
Nicolas Goaziou



Re: [O] org-collector unable to handle macros

2015-08-31 Thread Mark Edgington
On Aug 31, 2015 6:43 PM, "Nicolas Goaziou"  wrote:
>
> Hello,
>
> Mark Edgington  writes:
>
> > Charles Millar  verizon.net> writes:
> >
> >> This may be related to the problem or is the same that I reported in
> >> April and May and again earlier this month when Bastien's requested
> >> details in his August 4th message.
> >
> > Have you (or anyone else) been able to reproduce the problem given the
> > example which I provided?  Is this indeed a bug, or am I
misunderstanding
> > something?
>
>   :INCLASS:  ABC {{{c(stuff)}}} DEF
>
> looks incorrect. Macros are not expanded in node properties (with an
> exception for :EXPORT_SOMETHING: when #+SOMETHING is parsed).

It is not intended to be expanded when generating the table, but the table
should have the macro in it, so that it gets expanded when the table is
exported.


Re: [O] org-collector unable to handle macros

2015-08-31 Thread Nicolas Goaziou
Mark Edgington  writes:

> On Aug 31, 2015 6:43 PM, "Nicolas Goaziou"  wrote:
>>
>> Hello,
>>
>> Mark Edgington  writes:
>>
>> > Charles Millar  verizon.net> writes:
>> >
>> >> This may be related to the problem or is the same that I reported in
>> >> April and May and again earlier this month when Bastien's requested
>> >> details in his August 4th message.
>> >
>> > Have you (or anyone else) been able to reproduce the problem given the
>> > example which I provided?  Is this indeed a bug, or am I
> misunderstanding
>> > something?
>>
>>   :INCLASS:  ABC {{{c(stuff)}}} DEF
>>
>> looks incorrect. Macros are not expanded in node properties (with an
>> exception for :EXPORT_SOMETHING: when #+SOMETHING is parsed).
>
> It is not intended to be expanded when generating the table, but the table
> should have the macro in it, so that it gets expanded when the table is
> exported.

OK. Then another problem:

  :ID: sched_table

ID properties are meant to be set with `org-id'. What about using
CUSTOM_ID instead?


Regards,



Re: [O] org-collector unable to handle macros

2015-08-31 Thread Mark Edgington
> >>
> >>   :INCLASS:  ABC {{{c(stuff)}}} DEF
> >>
> >> looks incorrect. Macros are not expanded in node properties (with an
> >> exception for :EXPORT_SOMETHING: when #+SOMETHING is parsed).
> >
> > It is not intended to be expanded when generating the table, but the
table
> > should have the macro in it, so that it gets expanded when the table is
> > exported.
>
> OK. Then another problem:
>
>   :ID: sched_table
>
> ID properties are meant to be set with `org-id'. What about using
> CUSTOM_ID instead?

When using CUSTOM_ID, I get the following message (and the table generation
fails):

condition-case: (error Cannot find entry with :ID: sched_table)

Is this not the case for you?  I have enabled org-collector via M-x
customize-variable  org-modules.


[O] org-collector unable to handle macros

2015-08-28 Thread Mark Edgington
I have had problems getting org-collector.el to generate tables where the
content of the tables should include macros.  At some point in the past this
worked, but at this time (latest git version of org-mode), the following
example fails (unless you remove the macro from the property definition):

# comment-macro
#+MACRO: c 

* Notes
:PROPERTIES: 
:ID: sched_table
:COLUMNS:  %WEEKNUM(Week #) %DAY(Day) %INCLASS(In-class Content)
%READINGS(Readings) %PRECLASS(Pre-class Assignments / Homework)
:END:
** WEEK 1
*** DAY
:PROPERTIES:
:INCLASS:  ABC {{{c(stuff)}}} DEF
:DAY:  T
:WEEKNUM:  1
:END:
blah

* Schedule
# type C-c C-c on the #BEGIN line to attempt to generate the table
#+BEGIN: propview :id sched_table :defaultval  :conds ((not (string= DAY
))) :cols (WEEKNUM DAY INCLASS READINGS PRECLASS) :noquote t :colnames
(Week # Day In-class Content Readings Pre-class Assignments / Homework)

#+END:


Any help in resolving this problem would be appreciated!  Thanks.




Re: [O] org-collector unable to handle macros

2015-08-28 Thread Charles Millar
This may be related to the problem or is the same that I reported in 
April and May and again earlier this month when Bastien's requested 
details in his August 4th message.


org-collector does not work with org 8.3, but does with 8.2.10

Charlie Millar

On 08/28/2015 02:11 PM, Mark Edgington wrote:

I have had problems getting org-collector.el to generate tables where the
content of the tables should include macros.  At some point in the past this
worked, but at this time (latest git version of org-mode), the following
example fails (unless you remove the macro from the property definition):

# comment-macro
#+MACRO: c

* Notes
:PROPERTIES:
:ID: sched_table
:COLUMNS:  %WEEKNUM(Week #) %DAY(Day) %INCLASS(In-class Content)
%READINGS(Readings) %PRECLASS(Pre-class Assignments / Homework)
:END:
** WEEK 1
*** DAY
:PROPERTIES:
:INCLASS:  ABC {{{c(stuff)}}} DEF
:DAY:  T
:WEEKNUM:  1
:END:
blah

* Schedule
# type C-c C-c on the #BEGIN line to attempt to generate the table
#+BEGIN: propview :id sched_table :defaultval  :conds ((not (string= DAY
))) :cols (WEEKNUM DAY INCLASS READINGS PRECLASS) :noquote t :colnames
(Week # Day In-class Content Readings Pre-class Assignments / Homework)

#+END:


Any help in resolving this problem would be appreciated!  Thanks.








Re: [O] org-collector bug

2015-04-18 Thread Charles Millar
Spoke too soon. Went to a terminal, loaded emacs -q and then loaded 
org-ocllector.el. It worked as advertised. Then loaded emacs 
(normally) and org-collector.el did not yield expected results,


So I will check my .emacs

Charlie Millar

On 04/17/2015 06:43 PM, Charles Millar wrote:
I have attempted to use org-collector. Each time, including the 
example at
[Search domain orgmode.org] 
https://duckduckgo.com/?q=org%2Dcollector%20worg+site:orgmode.orgorgmode.org/worg/org-contrib/org-collector-example.html 
http://orgmode.org/worg/org-contrib/org-collector-example.html
all columns except ITEM evaluate to the default error. The ITEM column 
does evaluate as expected.


GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5)
of 2015-03-07 on binet, modified by Debian

Org: 8.3beta release_8.3beta-1030-g65bbb1

Charlie Millar








[O] org-collector bug

2015-04-17 Thread Charles Millar

I have attempted to use org-collector. Each time, including the example at
[Search domain orgmode.org] 
https://duckduckgo.com/?q=org%2Dcollector%20worg+site:orgmode.orgorgmode.org/worg/org-contrib/org-collector-example.html 
http://orgmode.org/worg/org-contrib/org-collector-example.html
all columns except ITEM evaluate to the default error. The ITEM column 
does evaluate as expected.


GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5)
of 2015-03-07 on binet, modified by Debian

Org: 8.3beta release_8.3beta-1030-g65bbb1

Charlie Millar






Re: [O] org-collector

2012-11-13 Thread Bastien
Ivanov Dmitry usr...@gmail.com writes:

 I have asked a question:

 http://stackoverflow.com/questions/13297691/emacs-org-mode-totals-table/13298288#13298288

 But nobody there knows the full answer. Any ideas?

Please restate the question so that we can understand it independantly
of stackoverflow -- this way we can keep consistent archives.

Thanks!

-- 
 Bastien



Re: [O] org-collector calculated rows?

2011-03-09 Thread Rehan Iftikhar
I have tried adding

 #+TBLFM: @$=vmean(I..II)

between the #+BEGIN and #+END lines (after generating a table), but
when I C-c C-c on #+BEGIN, the table refreshes and removes the #+TBLFM
line.

I am using org-mode 7.4. Any idea why my formula isn't working?

-Rehan

On Sat, Mar 5, 2011 at 12:48 AM, Nick Dokos nicholas.do...@hp.com wrote:
 Rehan Iftikhar rehan.iftik...@gmail.com wrote:

    * More Complex Example: displaying the mean of the Amount column
  for each week.
 

 I see that I misread this: the formula calculates the mean of all the entries,
 not the mean for each week. Having thought about it for about 10 seconds,
 I cannot think of a way to do that.

 Nick




-- 
-Rehan



Re: [O] org-collector calculated rows?

2011-03-09 Thread Nick Dokos
Rehan Iftikhar rehan.iftik...@gmail.com wrote:

 I have tried adding
 
  #+TBLFM: @$=vmean(I..II)
 
 between the #+BEGIN and #+END lines (after generating a table), but
 when I C-c C-c on #+BEGIN, the table refreshes and removes the #+TBLFM
 line.
 
 I am using org-mode 7.4. Any idea why my formula isn't working?
 

I don't know why the #+TBLFM line disappears: it does not in my case -
assuming that I've got org-collector loaded: since it's a contrib
package it's not loaded automatically for me and when I tried the
refresh before loading org-collector, *everything* disappeared: the
table and the formula. But once I got the package loaded correctly,
things worked as I described before: if only the formula is in there, it
gets wiped out, but if there is a table along with the formula, the
table gets refreshed and the formula is recalculated.

BTW, the formula is wrong: it should read

--8---cut here---start-8---
#+TBLFM: @$=vmean(@I..II)
--8---cut here---end---8---

and that also assumes that you are running a very recent version of org,
one that recognizes @ and $. But neither of these would explain why
the formula is wiped.

Nick

PS. I'm using Eric Schulte's standard example from the Worg site:

--8---cut here---start-8---
* Example

#+BEGIN: propview :id december :conds ((string= spendtype food)) :cols 
(ITEM amount)
| ITEM   | amount |
|--+--|
| Grocery Store [2008-12-01 Mon] |56.77 |
| Restaurant [2008-12-08 Mon]|30.67 |
| Grocery Store [2008-12-09 Tue] |56.76 |
|--+--|
|  |  |
#+TBLFM: @$=vmean(@I..II)
#+END:



#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match example
| ITEM   | (+ 400 amount) |
|--+--|
| December Spending  |0 |
| Week One   |0 |
| Grocery Store [2008-12-01 Mon] |   456.77 |
| Athletic club [2008-12-02 Tue] |475.0 |
| Week Two   |0 |
| Restaurant [2008-12-08 Mon]|   430.67 |
| Grocery Store [2008-12-09 Tue] |   456.76 |
|--+--|
|  |259.88571 |
#+TBLFM: @$=vmean(@I..II)
#+END:
#+TBLFM: @$ = vmean(@I..II)
** December Spending   :example:
   :PROPERTIES:
   :ID:   december
   :END:

*** Week One
 Grocery Store [2008-12-01 Mon]
 :PROPERTIES:
 :amount: 56.77
 :spendtype: food
 :END:
 Athletic club [2008-12-02 Tue]
 :PROPERTIES:
 :amount: 75.00
 :spendtype: health
 :END:
*** Week Two 
 Restaurant [2008-12-08 Mon]
 :PROPERTIES:
 :amount: 30.67
 :spendtype: food
 :END:
 Grocery Store [2008-12-09 Tue]
 :PROPERTIES:
 :amount: 56.76
 :spendtype: food
 :END:
--8---cut here---end---8---

 
 On Sat, Mar 5, 2011 at 12:48 AM, Nick Dokos nicholas.do...@hp.com wrote:
  Rehan Iftikhar rehan.iftik...@gmail.com wrote:
 
     * More Complex Example: displaying the mean of the Amount column
   for each week.
  
 
  I see that I misread this: the formula calculates the mean of all the 
  entries,
  not the mean for each week. Having thought about it for about 10 seconds,
  I cannot think of a way to do that.
 
  Nick
 
 
 
 
 -- 
 -Rehan
 



Re: [O] org-collector calculated rows?

2011-03-09 Thread Rehan Iftikhar
I updated to 7.5, recompiled, and now it works!

Thanks for the help!


On Wed, Mar 9, 2011 at 9:46 PM, Nick Dokos nicholas.do...@hp.com wrote:
 Rehan Iftikhar rehan.iftik...@gmail.com wrote:

 I have tried adding

  #+TBLFM: @$=vmean(I..II)

 between the #+BEGIN and #+END lines (after generating a table), but
 when I C-c C-c on #+BEGIN, the table refreshes and removes the #+TBLFM
 line.

 I am using org-mode 7.4. Any idea why my formula isn't working?


 I don't know why the #+TBLFM line disappears: it does not in my case -
 assuming that I've got org-collector loaded: since it's a contrib
 package it's not loaded automatically for me and when I tried the
 refresh before loading org-collector, *everything* disappeared: the
 table and the formula. But once I got the package loaded correctly,
 things worked as I described before: if only the formula is in there, it
 gets wiped out, but if there is a table along with the formula, the
 table gets refreshed and the formula is recalculated.

 BTW, the formula is wrong: it should read

 --8---cut here---start-8---
 #+TBLFM: @$=vmean(@I..II)
 --8---cut here---end---8---

 and that also assumes that you are running a very recent version of org,
 one that recognizes @ and $. But neither of these would explain why
 the formula is wiped.

 Nick

 PS. I'm using Eric Schulte's standard example from the Worg site:

 --8---cut here---start-8---
 * Example

 #+BEGIN: propview :id december :conds ((string= spendtype food)) :cols 
 (ITEM amount)
 | ITEM                           | amount |
 |--+--|
 | Grocery Store [2008-12-01 Mon] |    56.77 |
 | Restaurant [2008-12-08 Mon]    |    30.67 |
 | Grocery Store [2008-12-09 Tue] |    56.76 |
 |--+--|
 |                                  |          |
 #+TBLFM: @$=vmean(@I..II)
 #+END:



 #+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match example
 | ITEM                           | (+ 400 amount) |
 |--+--|
 | December Spending              |                0 |
 | Week One                       |                0 |
 | Grocery Store [2008-12-01 Mon] |           456.77 |
 | Athletic club [2008-12-02 Tue] |            475.0 |
 | Week Two                       |                0 |
 | Restaurant [2008-12-08 Mon]    |           430.67 |
 | Grocery Store [2008-12-09 Tue] |           456.76 |
 |--+--|
 |                                  |        259.88571 |
 #+TBLFM: @$=vmean(@I..II)
 #+END:
 #+TBLFM: @$ = vmean(@I..II)
 ** December Spending                                                   
 :example:
   :PROPERTIES:
   :ID:       december
   :END:

 *** Week One
  Grocery Store [2008-12-01 Mon]
     :PROPERTIES:
     :amount: 56.77
     :spendtype: food
     :END:
  Athletic club [2008-12-02 Tue]
     :PROPERTIES:
     :amount: 75.00
     :spendtype: health
     :END:
 *** Week Two
  Restaurant [2008-12-08 Mon]
     :PROPERTIES:
     :amount: 30.67
     :spendtype: food
     :END:
  Grocery Store [2008-12-09 Tue]
     :PROPERTIES:
     :amount: 56.76
     :spendtype: food
     :END:
 --8---cut here---end---8---


 On Sat, Mar 5, 2011 at 12:48 AM, Nick Dokos nicholas.do...@hp.com wrote:
  Rehan Iftikhar rehan.iftik...@gmail.com wrote:
 
     * More Complex Example: displaying the mean of the Amount column
   for each week.
  
 
  I see that I misread this: the formula calculates the mean of all the 
  entries,
  not the mean for each week. Having thought about it for about 10 seconds,
  I cannot think of a way to do that.
 
  Nick
 



 --
 -Rehan





-- 
-Rehan



Re: [O] org-collector calculated rows?

2011-03-05 Thread Nick Dokos
Rehan Iftikhar rehan.iftik...@gmail.com wrote:

 Hi Org list!
 
 For those of you familiar with org-collector (ie. propview dynamic
 block) is there already a way to include a calculated row?
 
 For example, in the demonstration of how to use org-collector @
 http://orgmode.org/worg/org-contrib/org-collector.html, I'd be
 interested in:
   * Simple Example: displaying the sum of the Amount column
   * More Complex Example: displaying the mean of the Amount column
 for each week.
 
 Does anything like this already exist?
 

You can do that, but you have to take some care. The following uses
formula syntax from very recent org-mode (e.g.  the last row, last
column designation @$ does not work in older versions and you'd have
to resort to the old, deprecated notation $LR2) but other than that it
should work with no problems in org-mode 7.x say (and probably older
versions as well).

I can add a formula to each of the tables to calculate
the sum in the first case and the mean in the second case.
Adding an item and then recalculating the tables by pressing
C-c C-c on each #+BEGIN line works fine.

The thing that does not quite work is initialization: you cannot start
with empty #+BEGIN/#+END sections, add the formula and then press C-c
C-c: that gives an error[fn:1]. But pressing C-c C-c first, thereby
populating the table, and *then* adding the formula works fine. C-c C-c
will not only repopulate the table but also recalculate the formula.

HTH,
Nick


--8---cut here---start-8---

* Example

#+BEGIN: propview :id december :conds ((string= spendtype food)) :cols 
(ITEM amount)
| ITEM   | amount |
|--+--|
| Grocery Store [2008-12-01 Mon] |56.77 |
| Restaurant [2008-12-08 Mon]|30.67 |
| Grocery Store [2008-12-09 Tue] |56.76 |
|--+--|
|  |144.2 |
#+TBLFM: @$ = vsum(@I..II)  
#+END:

#+BEGIN: propview :cols (ITEM (+ 400 amount)) :scope tree :match example
| ITEM   | (+ 400 amount) |
|--+--|
| December Spending  |0 |
| Week One   |0 |
| Grocery Store [2008-12-01 Mon] |   456.77 |
| Athletic club [2008-12-02 Tue] |475.0 |
| Week Two   |0 |
| Restaurant [2008-12-08 Mon]|   430.67 |
| Grocery Store [2008-12-09 Tue] |   456.76 |
|--+--|
|  |259.88571 |
#+TBLFM: @$ = vmean(@I..II)
#+END:

** December Spending   :example:
   :PROPERTIES:
   :ID:   december
   :END:

*** Week One
 Grocery Store [2008-12-01 Mon]
 :PROPERTIES:
 :amount: 56.77
 :spendtype: food
 :END:
 Athletic club [2008-12-02 Tue]
 :PROPERTIES:
 :amount: 75.00
 :spendtype: health
 :END:
*** Week Two 
 Restaurant [2008-12-08 Mon]
 :PROPERTIES:
 :amount: 30.67
 :spendtype: food
 :END:
 Grocery Store [2008-12-09 Tue]
 :PROPERTIES:
 :amount: 56.76
 :spendtype: food
 :END:
--8---cut here---end---8---

Footnotes:
[fn:1] The error I get is

Debugger entered--Lisp error: (error (wrong-type-argument stringp nil))
  signal(error ((wrong-type-argument stringp nil)))
  error(%s (wrong-type-argument stringp nil))
  (condition-case er (let ((cols (plist-get params :cols)) (inherit (plist-get 
params :inherit)) (conds (plist-get params :conds)) (match (plist-get params 
:match)) (scope (plist-get params :scope)) (content-lines (org-split-string 
(plist-get params :content) \n)) id table line pos) (save-excursion (when 
(setq id (plist-get params :id)) (cond ((not id) nil) ((eq id (quote global)) 
(goto-char (point-min))) ((eq id (quote local)) nil) ((setq idpos 
(org-find-entry-with-id id)) (goto-char idpos)) (t (error Cannot find entry 
with :ID: %s id (org-narrow-to-subtree) (setq table (org-propview-to-table 
(org-propview-collect cols conds match scope inherit))) (widen)) (setq pos 
(point)) (when content-lines (while (string-match ^# (car content-lines)) 
(insert (pop content-lines) \n))) (insert table) (insert \n|--) (org-cycle) 
(move-end-of-line 1) (message (format point-%d pos)) (while (setq line (pop 
content-lines)) (when (string-match ^# line) (insert \n line))) (got
 o-char pos) (org-table-recalculate (quote all))) (org-collector-error (widen) 
(error %s er)) (error (widen) (error %s er)))
  org-dblock-write:propview((:name propview :id december :conds ((string= 
spendtype food)) :cols (ITEM amount) :indentation-column 0 :content 
#(#+TBLFM: @$ = vsum(@I..II)  \n 0 29 (font-lock-fontified t org-category 
collector fontified t face org-meta-line) 29 30 (font-lock-fontified t 
org-category collector fontified 

Re: [O] org-collector calculated rows?

2011-03-05 Thread Nick Dokos
 Rehan Iftikhar rehan.iftik...@gmail.com wrote:
 
* More Complex Example: displaying the mean of the Amount column
  for each week.
  

I see that I misread this: the formula calculates the mean of all the entries,
not the mean for each week. Having thought about it for about 10 seconds,
I cannot think of a way to do that.

Nick



[O] org-collector calculated rows?

2011-03-03 Thread Rehan Iftikhar
Hi Org list!

For those of you familiar with org-collector (ie. propview dynamic
block) is there already a way to include a calculated row?

For example, in the demonstration of how to use org-collector @
http://orgmode.org/worg/org-contrib/org-collector.html, I'd be
interested in:
  * Simple Example: displaying the sum of the Amount column
  * More Complex Example: displaying the mean of the Amount column
for each week.

Does anything like this already exist?

-- 
-Rehan

-- 
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode