Re: Feature request: "task table" (similar to clock table)

2023-01-25 Thread Marcin Borkowski


On 2023-01-25, at 03:37, Max Nikulin  wrote:

> On 25/01/2023 03:09, Marcin Borkowski wrote:
 https://mbork.pl/2023-01-09_TODO_stats_table
>
> Sorry for a too late response. The feature is documented in the
> manual, see info "(org) Dynamic Blocks"
> https://orgmode.org/manual/Dynamic-Blocks.html

Ah, thanks!  I missed this.  (A long time ago I read almost all of the
Org manual, but I could have forgotten or omitted this.)

> Perhaps a close feature that might allow to return list that is
> converted to table by org-babel is "#+call:", see info "(org)
> Evaluating Code Blocks"
> https://orgmode.org/manual/Evaluating-Code-Blocks.html

Indeed.

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-24 Thread Max Nikulin

On 25/01/2023 03:09, Marcin Borkowski wrote:

https://mbork.pl/2023-01-09_TODO_stats_table


Sorry for a too late response. The feature is documented in the manual, 
see info "(org) Dynamic Blocks" 
https://orgmode.org/manual/Dynamic-Blocks.html


Perhaps a close feature that might allow to return list that is 
converted to table by org-babel is "#+call:", see info "(org) Evaluating 
Code Blocks" https://orgmode.org/manual/Evaluating-Code-Blocks.html





Re: Feature request: "task table" (similar to clock table)

2023-01-24 Thread Marcin Borkowski


On 2023-01-24, at 10:59, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> https://mbork.pl/2023-01-09_TODO_stats_table
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7ad77965467602ced2cb8f3cded023882dc229a2

Thanks!

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-24 Thread Ihor Radchenko
Marcin Borkowski  writes:

> https://mbork.pl/2023-01-09_TODO_stats_table

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=7ad77965467602ced2cb8f3cded023882dc229a2

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



Re: Feature request: "task table" (similar to clock table)

2023-01-23 Thread Marcin Borkowski


On 2023-01-03, at 19:29, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I see.  I think I'll go another route then - in fact, I already started,
>> see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)
>
> That will also work.
>
> But why `plist-get' + `org-element-at-point-no-context'?
>
> You can instead use `org-element-property' + `org-element-at-point'.
> `org-element-property' will be resilient against internal AST
> representation changes and `org-element-at-point' will make use of
> caching.

FYI: here is my finished code:

https://mbork.pl/2023-01-09_TODO_stats_table
https://mbork.pl/2023-01-23_TODO_stats_table_with_parameters

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-03 Thread Marcin Borkowski


On 2023-01-03, at 19:29, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I see.  I think I'll go another route then - in fact, I already started,
>> see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)
>
> That will also work.
>
> But why `plist-get' + `org-element-at-point-no-context'?
>
> You can instead use `org-element-property' + `org-element-at-point'.
> `org-element-property' will be resilient against internal AST
> representation changes and `org-element-at-point' will make use of
> caching.

Yes, thanks - I saw your comment.  I will amend the post today.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2023-01-03 Thread Ihor Radchenko
Marcin Borkowski  writes:

> I see.  I think I'll go another route then - in fact, I already started,
> see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)

That will also work.

But why `plist-get' + `org-element-at-point-no-context'?

You can instead use `org-element-property' + `org-element-at-point'.
`org-element-property' will be resilient against internal AST
representation changes and `org-element-at-point' will make use of
caching.

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



Re: Feature request: "task table" (similar to clock table)

2023-01-03 Thread Marcin Borkowski


On 2022-12-27, at 08:48, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> If you have interest, going through org-colview.el code would be
>>> helpful. It is a bit messy and deserves more cleaning and commenting.
>>
>> Since org-colview is pretty long, I decided to look into the manual
>> instead.  But I couldn't make the column view to do what I wanted, i.e.,
>> count the TODO, DONE etc. items in various subtrees.  (What I want is
>> more or less "select status, count(*) group by status" for every level-1
>> tree.)  And I don't see the equivalent of "count()" among the possible
>> "summary types": https://orgmode.org/manual/Column-attributes.html.
>
> You will likely need to implement a new summary type and add it to
> org-columns-summary-types

I see.  I think I'll go another route then - in fact, I already started,
see https://mbork.pl/2023-01-02_Computing_Org_mode_TODO_stats :-)

Thanks,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Ihor Radchenko
Marcin Borkowski  writes:

>> If you have interest, going through org-colview.el code would be
>> helpful. It is a bit messy and deserves more cleaning and commenting.
>
> Since org-colview is pretty long, I decided to look into the manual
> instead.  But I couldn't make the column view to do what I wanted, i.e.,
> count the TODO, DONE etc. items in various subtrees.  (What I want is
> more or less "select status, count(*) group by status" for every level-1
> tree.)  And I don't see the equivalent of "count()" among the possible
> "summary types": https://orgmode.org/manual/Column-attributes.html.

You will likely need to implement a new summary type and add it to
org-columns-summary-types

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



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Marcin Borkowski


On 2022-12-26, at 09:26, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>>> https://orgmode.org/manual/Capturing-column-view.html
>>> https://orgmode.org/manual/Column-attributes.html
>>
>> Good point, I forgot about those.  But: is it possible for the column
>> view to just include the summary (like "100 headlines, including 10
>> TODOs and 30 DONEs"), without the headlines themselves?
>
> AFAIK, no. But it just boils down to keeping the top-level item with
> summary columns.
>
> If you have interest, going through org-colview.el code would be
> helpful. It is a bit messy and deserves more cleaning and commenting.

Since org-colview is pretty long, I decided to look into the manual
instead.  But I couldn't make the column view to do what I wanted, i.e.,
count the TODO, DONE etc. items in various subtrees.  (What I want is
more or less "select status, count(*) group by status" for every level-1
tree.)  And I don't see the equivalent of "count()" among the possible
"summary types": https://orgmode.org/manual/Column-attributes.html.

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Ihor Radchenko
Marcin Borkowski  writes:

>> https://orgmode.org/manual/Capturing-column-view.html
>> https://orgmode.org/manual/Column-attributes.html
>
> Good point, I forgot about those.  But: is it possible for the column
> view to just include the summary (like "100 headlines, including 10
> TODOs and 30 DONEs"), without the headlines themselves?

AFAIK, no. But it just boils down to keeping the top-level item with
summary columns.

If you have interest, going through org-colview.el code would be
helpful. It is a bit messy and deserves more cleaning and commenting.

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



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Marcin Borkowski


On 2022-12-26, at 09:05, Ihor Radchenko  wrote:

> Marcin Borkowski  writes:
>
>> I've been using clock tables for some time now, and they are very
>> useful.  However, it has just occurred to me that I'd really appreciate
>> another feature - a "task table".  By this, I mean a table (generated
>> much like a clock table) with a summary of all tasks in a given
>> file/subtree/etc.: how many of them there are, how many are in any
>> state, maybe how many have scheduled times and/or deadlines, how many
>> are past their deadline...
>
> https://orgmode.org/manual/Capturing-column-view.html
> https://orgmode.org/manual/Column-attributes.html

Good point, I forgot about those.  But: is it possible for the column
view to just include the summary (like "100 headlines, including 10
TODOs and 30 DONEs"), without the headlines themselves?

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: Feature request: "task table" (similar to clock table)

2022-12-26 Thread Ihor Radchenko
Marcin Borkowski  writes:

> I've been using clock tables for some time now, and they are very
> useful.  However, it has just occurred to me that I'd really appreciate
> another feature - a "task table".  By this, I mean a table (generated
> much like a clock table) with a summary of all tasks in a given
> file/subtree/etc.: how many of them there are, how many are in any
> state, maybe how many have scheduled times and/or deadlines, how many
> are past their deadline...

https://orgmode.org/manual/Capturing-column-view.html
https://orgmode.org/manual/Column-attributes.html

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



Feature request: "task table" (similar to clock table)

2022-12-25 Thread Marcin Borkowski
Hi fellow Orgers,

I've been using clock tables for some time now, and they are very
useful.  However, it has just occurred to me that I'd really appreciate
another feature - a "task table".  By this, I mean a table (generated
much like a clock table) with a summary of all tasks in a given
file/subtree/etc.: how many of them there are, how many are in any
state, maybe how many have scheduled times and/or deadlines, how many
are past their deadline...

Now, question 1: is there any feature in Org mode to make C-c C-c do
something when the point is on a line e.g. matching certain regex?  This
way I could extend Org mode to do that myself.

I peeked around and found out `org-ctrl-c-ctrl-c-hook', so that's that.
Pretty nice!  Although some functions allowing stuff like "substitute
the results for the block that follows" etc. might be also nice.

Question 2: am I the only one who would like to see such a feature?
Would someone like to code it?  (I /might/ be tempted to do that, but
it's kinf difficult: while I signed FSF papers some time ago, I've
changed jibs since then and I suppose I'd need to got through some more
paperwork to fix that; also, I'm not sure whether I really want to, and
whether my employer would be willing to let me.)

TIA,

-- 
Marcin Borkowski
http://mbork.pl