emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-collector - propview display problems
@ 2016-02-29 18:04 dche
  2016-03-02  1:30 ` Charles Millar
  0 siblings, 1 reply; 11+ messages in thread
From: dche @ 2016-02-29 18:04 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-collector - propview display problems
  2016-02-29 18:04 org-collector - propview display problems dche
@ 2016-03-02  1:30 ` Charles Millar
  2016-03-02 14:11   ` dche
  0 siblings, 1 reply; 11+ messages in thread
From: Charles Millar @ 2016-03-02  1:30 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-collector - propview display problems
  2016-03-02  1:30 ` Charles Millar
@ 2016-03-02 14:11   ` dche
  2016-03-03 11:06     ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: dche @ 2016-03-02 14:11 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-collector - propview display problems
  2016-03-02 14:11   ` dche
@ 2016-03-03 11:06     ` Nicolas Goaziou
  2016-03-03 13:15       ` dche
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2016-03-03 11:06 UTC (permalink / raw)
  To: dche; +Cc: emacs-orgmode

Hello,

dche <dchechin92@gmail.com> 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

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

* Re: org-collector - propview display problems
  2016-03-03 11:06     ` Nicolas Goaziou
@ 2016-03-03 13:15       ` dche
  2016-03-13 19:41         ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: dche @ 2016-03-03 13:15 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-collector - propview display problems
  2016-03-03 13:15       ` dche
@ 2016-03-13 19:41         ` Nicolas Goaziou
  2016-03-14  9:26           ` dche
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2016-03-13 19:41 UTC (permalink / raw)
  To: dche; +Cc: emacs-orgmode

Hello,

dche <dchechin92@gmail.com> 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

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

* Re: org-collector - propview display problems
  2016-03-13 19:41         ` Nicolas Goaziou
@ 2016-03-14  9:26           ` dche
  2016-03-14 12:36             ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: dche @ 2016-03-14  9:26 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-collector - propview display problems
  2016-03-14  9:26           ` dche
@ 2016-03-14 12:36             ` Nicolas Goaziou
  2016-03-14 15:08               ` Charles Millar
                                 ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2016-03-14 12:36 UTC (permalink / raw)
  To: dche; +Cc: emacs-orgmode

Hello,

dche <dchechin92@gmail.com> 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

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

* Re: org-collector - propview display problems
  2016-03-14 12:36             ` Nicolas Goaziou
@ 2016-03-14 15:08               ` Charles Millar
  2016-03-14 17:57               ` Charles Millar
  2016-03-15  9:09               ` dche
  2 siblings, 0 replies; 11+ messages in thread
From: Charles Millar @ 2016-03-14 15:08 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas,

On 03/14/2016 08:36 AM, Nicolas Goaziou wrote:
> Hello,
>
> dche <dchechin92@gmail.com> 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

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

* Re: org-collector - propview display problems
  2016-03-14 12:36             ` Nicolas Goaziou
  2016-03-14 15:08               ` Charles Millar
@ 2016-03-14 17:57               ` Charles Millar
  2016-03-15  9:09               ` dche
  2 siblings, 0 replies; 11+ messages in thread
From: Charles Millar @ 2016-03-14 17:57 UTC (permalink / raw)
  To: dche, emacs-orgmode

Nicolas,

On 03/14/2016 08:36 AM, Nicolas Goaziou wrote:
> Hello,
>
> dche <dchechin92@gmail.com> 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

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

* Re: org-collector - propview display problems
  2016-03-14 12:36             ` Nicolas Goaziou
  2016-03-14 15:08               ` Charles Millar
  2016-03-14 17:57               ` Charles Millar
@ 2016-03-15  9:09               ` dche
  2 siblings, 0 replies; 11+ messages in thread
From: dche @ 2016-03-15  9:09 UTC (permalink / raw)
  To: emacs-orgmode

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.

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

end of thread, other threads:[~2016-03-15  9:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 18:04 org-collector - propview display problems dche
2016-03-02  1:30 ` Charles Millar
2016-03-02 14:11   ` dche
2016-03-03 11:06     ` Nicolas Goaziou
2016-03-03 13:15       ` dche
2016-03-13 19:41         ` Nicolas Goaziou
2016-03-14  9:26           ` dche
2016-03-14 12:36             ` Nicolas Goaziou
2016-03-14 15:08               ` Charles Millar
2016-03-14 17:57               ` Charles Millar
2016-03-15  9:09               ` dche

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).