emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* problem with columnview and the match option
@ 2021-10-17 20:10 Uwe Brauer
  2021-10-18  0:49 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Brauer @ 2021-10-17 20:10 UTC (permalink / raw)
  To: emacs-orgmode

Hi

Please look at this example

#+begin_src lisp
* Sheets                                                           :noexport:
  :PROPERTIES:
  :COLUMNS:  %10SSheet(Sheet Nr) %10Ex(Exercise Nr)  %17Date(Date) %7STATUS(Status){X/}
  :ID2:       Sheet1
  :END:

** DONE G1                                                               :H1:G1:
    :PROPERTIES:
    :ID:       G1
    :User1:    John
    :email1: john@gmail.com
    :Start:    <2021-02-16 mar>
    :End:      <2021-05-24 lun>
    :STATUS:   [ ]
    :ST1:      [ ]
    :Sheet:    H1
    :Ex:       E1
    :END:

** DONE G2                                                            :H1:G2:
    :PROPERTIES:
    :ID:       G2
    :Usuario1: Jane
    :email1:   jane@gmail.com
    :Start:    <2020-07-26 Sun>
    :End:      <2020-11-22 dom>
    :STATUS:   [X]
    :ST1:      [X]
    :Sheet:    H1
    :Ex:       E3
    :END:

** TODO  G3                                                           :G3:H2:
    :PROPERTIES:
    :Id:       G3
    :Usuario1: Fritz
    :Start:    <2020-07-26 Sun>
    :End:      <2020-11-22 dom>
    :ST2:      [X]
    :STATUS:   [X]
    :Sheet:     H2
    :Ex:       E2
    :END:


    - State "TODO"       from "WAIT"       [2021-10-17 dom 08:30]
    - State "WAIT"       from "DONE"       [2021-10-16 sáb 21:55]


** All groups
#+BEGIN: columnview :hlines 2 :match "H1"   :maxlevel 2 :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
| Status | Group | Exercise | Sheet | Status |
|--------+-------+----------+-------+--------|
|        |       |          |       | [1/2]  |
|--------+-------+----------+-------+--------|
| DONE   | G1    | E1       | H1    | [ ]    |
|--------+-------+----------+-------+--------|
| DONE   | G2    | E3       | H1    | [X]    |
|--------+-------+----------+-------+--------|
| TODO   | G3    | E2       | H2    |        |
#+END
I don't understand why the line 
| TODO   | G3    | E2       | H2    |        | 
appears in the table, it does not fit condition

I deleted the maxlevel condition


#+BEGIN: columnview :hlines 2 :match "H1"    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
| Status | Group | Exercise | Sheet | Status |
|--------+-------+----------+-------+--------|
| DONE   | G1    | E1       | H1    | [ ]    |
|--------+-------+----------+-------+--------|
| DONE   | G2    | E3       | H1    | [X]    |
#+END

But now the row

|        |       |          |       | [1/2]  |

Is missing. I am confused, I thought maybe exclude-tags could help

#+BEGIN: columnview :hlines 2 :exclude-tags  (H2)    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
| Status | Group | Exercise | Sheet | Status |
|--------+-------+----------+-------+--------|
|        |       |          |       | [1/2]  |
|--------+-------+----------+-------+--------|
| DONE   | G1    | E1       | H1    | [ ]    |
|--------+-------+----------+-------+--------|
| DONE   | G2    | E3       | H1    | [X]    |
|--------+-------+----------+-------+--------|
| TODO   | G3    | E2       | H2    |        |
#+END

But not really, help would be appreciated.


#+end_src



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

* Re: problem with columnview and the match option
  2021-10-17 20:10 problem with columnview and the match option Uwe Brauer
@ 2021-10-18  0:49 ` Ihor Radchenko
  2021-10-18  7:00   ` Uwe Brauer
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2021-10-18  0:49 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> writes:

> ** All groups
> #+BEGIN: columnview :hlines 2 :match "H1"   :maxlevel 2 :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
> | Status | Group | Exercise | Sheet | Status |
> |--------+-------+----------+-------+--------|
> |        |       |          |       | [1/2]  |
> |--------+-------+----------+-------+--------|
> | DONE   | G1    | E1       | H1    | [ ]    |
> |--------+-------+----------+-------+--------|
> | DONE   | G2    | E3       | H1    | [X]    |
> |--------+-------+----------+-------+--------|
> | TODO   | G3    | E2       | H2    |        |
> #+END
> I don't understand why the line 
> | TODO   | G3    | E2       | H2    |        | 
> appears in the table, it does not fit condition

Try on latest master ;)

> I deleted the maxlevel condition
>
>
> #+BEGIN: columnview :hlines 2 :match "H1"    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
> | Status | Group | Exercise | Sheet | Status |
> |--------+-------+----------+-------+--------|
> | DONE   | G1    | E1       | H1    | [ ]    |
> |--------+-------+----------+-------+--------|
> | DONE   | G2    | E3       | H1    | [X]    |
> #+END
>
> But now the row
>
> |        |       |          |       | [1/2]  |
>
> Is missing. I am confused, I thought maybe exclude-tags could help

This is expected. The first heading does not match the condition.

> #+BEGIN: columnview :hlines 2 :exclude-tags  (H2)    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
> | Status | Group | Exercise | Sheet | Status |
> |--------+-------+----------+-------+--------|
> |        |       |          |       | [1/2]  |
> |--------+-------+----------+-------+--------|
> | DONE   | G1    | E1       | H1    | [ ]    |
> |--------+-------+----------+-------+--------|
> | DONE   | G2    | E3       | H1    | [X]    |
> |--------+-------+----------+-------+--------|
> | TODO   | G3    | E2       | H2    |        |
> #+END
>
> But not really, help would be appreciated.

Add quotes around H2:

#+BEGIN: columnview :hlines 2 :exclude-tags  ("H2")    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"

Best,
Ihor


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

* Re: problem with columnview and the match option
  2021-10-18  0:49 ` Ihor Radchenko
@ 2021-10-18  7:00   ` Uwe Brauer
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Brauer @ 2021-10-18  7:00 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2693 bytes --]

>>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> ** All groups
>> #+BEGIN: columnview :hlines 2 :match "H1" :maxlevel 2
>> :skip-empty-rows t :indent nil :format "%5TODO(Status) %5Id(Group)
>> %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"
>> | Status | Group | Exercise | Sheet | Status |
>> |--------+-------+----------+-------+--------|
>> |        |       |          |       | [1/2]  |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G1    | E1       | H1    | [ ]    |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G2    | E3       | H1    | [X]    |
>> |--------+-------+----------+-------+--------|
>> | TODO   | G3    | E2       | H2    |        |
>> #+END
>> I don't understand why the line 
>> | TODO   | G3    | E2       | H2    |        | 
>> appears in the table, it does not fit condition

> Try on latest master ;)

Works! Thanks 😅 

>> I deleted the maxlevel condition
>> 
>> 
>> #+BEGIN: columnview :hlines 2 :match "H1" :skip-empty-rows t :indent
>> nil :format "%5TODO(Status) %5Id(Group) %5Ex(Exercise)
>> %5Sheet(Sheet) %7ST1(Status){X/}"
>> | Status | Group | Exercise | Sheet | Status |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G1    | E1       | H1    | [ ]    |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G2    | E3       | H1    | [X]    |
>> #+END
>> 
>> But now the row
>> 
>> |        |       |          |       | [1/2]  |
>> 
>> Is missing. I am confused, I thought maybe exclude-tags could help

> This is expected. The first heading does not match the condition.

Ok.
>> #+BEGIN: columnview :hlines 2 :exclude-tags (H2) :skip-empty-rows t
>> :indent nil :format "%5TODO(Status) %5Id(Group) %5Ex(Exercise)
>> %5Sheet(Sheet) %7ST1(Status){X/}"
>> | Status | Group | Exercise | Sheet | Status |
>> |--------+-------+----------+-------+--------|
>> |        |       |          |       | [1/2]  |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G1    | E1       | H1    | [ ]    |
>> |--------+-------+----------+-------+--------|
>> | DONE   | G2    | E3       | H1    | [X]    |
>> |--------+-------+----------+-------+--------|
>> | TODO   | G3    | E2       | H2    |        |
>> #+END
>> 
>> But not really, help would be appreciated.

> Add quotes around H2:

> #+BEGIN: columnview :hlines 2 :exclude-tags  ("H2")    :skip-empty-rows t :indent nil :format  "%5TODO(Status) %5Id(Group) %5Ex(Exercise) %5Sheet(Sheet) %7ST1(Status){X/}"

Great it even allows a list as in :exclude-tags  ("H2" "H3"). That is
what I am looking for

Thanks a lot

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

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

end of thread, other threads:[~2021-10-18  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 20:10 problem with columnview and the match option Uwe Brauer
2021-10-18  0:49 ` Ihor Radchenko
2021-10-18  7:00   ` Uwe Brauer

Code repositories for project(s) associated with this 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).