all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-clock-report on headings and subheadings or for the whole file?
@ 2022-11-12  8:01 Uwe Brauer
  2022-11-13  5:01 ` Ihor Radchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-12  8:01 UTC (permalink / raw)
  To: emacs-orgmode


Hi 

I just started to use logbooks and clocks. One of my org files looks
like this

* TODO Condition about symmetry  
  :LOGBOOK:
  CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
  CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
  CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
  CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
  :END:


* TODO $A^0$ condition
  :LOGBOOK:
  CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
  :END:

Now org-clock-report inserts a table for the lookbook of each heading.


    1. Either I can make one of the heading a subheading, and then I
       would like to now how to make a report for heading and subheading.

    2. Or I leave it as it is and want a report for every heading.

I am aware  of 
https://emacs.stackexchange.com/questions/41393/merging-clock-logs-together-in-org-mode

But prefer not to touch the structure of the file.

Any idea how to insert a table for all logbooks? 

Thanks and regards

Uwe Brauer



-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/



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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-12  8:01 org-clock-report on headings and subheadings or for the whole file? Uwe Brauer
@ 2022-11-13  5:01 ` Ihor Radchenko
  2022-11-13  7:08   ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-13  5:01 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

> I just started to use logbooks and clocks. One of my org files looks
> like this
>
> * TODO Condition about symmetry  
>   :LOGBOOK:
>   CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
>   CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
>   CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
>   CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
>   :END:
>
>
> * TODO $A^0$ condition
>   :LOGBOOK:
>   CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
>   :END:
>
> Now org-clock-report inserts a table for the lookbook of each heading.
>
>
>     1. Either I can make one of the heading a subheading, and then I
>        would like to now how to make a report for heading and subheading.
>
>     2. Or I leave it as it is and want a report for every heading.

Could you please elaborate what you want to achieve?

I am getting

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 Sun 12:58]
| Headline                 | Time     |
|--------------------------+----------|
| *Total time*               | *2h 33min* |
|--------------------------+----------|
| Condition about symmetry | 2h 30min |
| $A^0$ condition           | 0h 3min  |
#+END:

with Total time aggregating all the clock entries.
Isn't it what you want?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-13  5:01 ` Ihor Radchenko
@ 2022-11-13  7:08   ` Uwe Brauer
  2022-11-13  7:18     ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-13  7:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> I just started to use logbooks and clocks. One of my org files looks
>> like this
>> 
>> * TODO Condition about symmetry  
>> :LOGBOOK:
>> CLOCK: [2022-11-11 16:40]--[2022-11-11 17:32] =>  0:52
>> CLOCK: [2022-11-11 13:58]--[2022-11-11 14:05] =>  0:07
>> CLOCK: [2022-11-11 11:22]--[2022-11-11 11:27] =>  0:05
>> CLOCK: [2022-11-11 09:55]--[2022-11-11 11:21] =>  1:26
>> :END:
>> 
>> 
>> * TODO $A^0$ condition
>> :LOGBOOK:
>> CLOCK: [2022-11-11 17:40]--[2022-11-11 17:43] =>  0:03
>> :END:
>> 
>> Now org-clock-report inserts a table for the lookbook of each heading.
>> 
>> 
>> 1. Either I can make one of the heading a subheading, and then I
>> would like to now how to make a report for heading and subheading.
>> 
>> 2. Or I leave it as it is and want a report for every heading.

> Could you please elaborate what you want to achieve?

> I am getting

> #+BEGIN: clocktable :scope file :maxlevel 2
> #+CAPTION: Clock summary at [2022-11-13 Sun 12:58]

> | Headline                 | Time     |
> |--------------------------+----------|
> | *Total time*               | *2h 33min* |
> |--------------------------+----------|
> | Condition about symmetry | 2h 30min |
> | $A^0$ condition           | 0h 3min  |
> #+END:

> with Total time aggregating all the clock entries.
> Isn't it what you want?


Yes, *but* I obtain


#+BEGIN: clocktable :scope subtree :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 08:06]
| Headline       | Time   |
|----------------+--------|
| *Total time*   | *0:03* |
|----------------+--------|
| $A^0$ condition | 0:03   |
#+END:

Which is *not* what I want.

So I am wondering why I obtain something different from you

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-13  7:08   ` Uwe Brauer
@ 2022-11-13  7:18     ` Uwe Brauer
  2022-11-13  7:43       ` Ihor Radchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-13  7:18 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: Ihor Radchenko, emacs-orgmode

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









> Yes, *but* I obtain

> #+BEGIN: clocktable :scope subtree :maxlevel 2
> #+CAPTION: Clock summary at [2022-11-13 08:06]

> | Headline       | Time   |
> |----------------+--------|
> | *Total time*   | *0:03* |
> |----------------+--------|
> | $A^0$ condition | 0:03   |
> #+END:

> Which is *not* what I want.

> So I am wondering why I obtain something different from you

I realized that I have 
#+BEGIN: clocktable :scope subtree :maxlevel 2

While you have

#+BEGIN: clocktable :scope file :maxlevel 2

But I don't know where shall I change the setting, the documentation of 

,----
| org-clock-report (found in org-mode-map), which
| is an autoloaded interactive compiled Lisp function in ‘org-clock.el’.
| 
| It is bound to H-r.
| 
| (org-clock-report &optional ARG)
| 
| Update or create a table containing a report about clocked time.
| 
| If point is inside an existing clocktable block, update it.
| Otherwise, insert a new one.
| 
| The new table inherits its properties from the variable
| ‘org-clock-clocktable-default-properties’.  The scope of the
| clocktable, when not specified in the previous variable, is
| ‘subtree’ when the function is called from within a subtree, and
| ‘file’ elsewhere.
| 
| When called with a prefix argument, move to the first clock table
| in the buffer and update it.
`----

But I don't understand why org assumes that I call that function from a subtree.


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-13  7:18     ` Uwe Brauer
@ 2022-11-13  7:43       ` Ihor Radchenko
  2022-11-13  7:48         ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-13  7:43 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

> I realized that I have 
> #+BEGIN: clocktable :scope subtree :maxlevel 2
>
> While you have
>
> #+BEGIN: clocktable :scope file :maxlevel 2
>
> But I don't know where shall I change the setting, the documentation of 
>
> ,----
> | org-clock-report (found in org-mode-map), which
> ...
> But I don't understand why org assumes that I call that function from a subtree.

I had point before first heading and typed M-x org-clock-report.
You probably had point at or inside a heading.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-13  7:43       ` Ihor Radchenko
@ 2022-11-13  7:48         ` Uwe Brauer
  2022-11-14  4:40           ` Ihor Radchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-13  7:48 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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


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

> I had point before first heading and typed M-x org-clock-report.
> You probably had point at or inside a heading.


Correct, I did since I found it «logical» to have that table at the end of the file, but now I understand the problem with this. Thanks 

Ok, but I think it would not be bad to add this information to the docstring of org-clock-report!? It is not that intuitive.


BTW when I move one heading to a subheading the table reads 

#+BEGIN: clocktable :scope file :maxlevel 2
#+CAPTION: Clock summary at [2022-11-13 08:46]
| Headline             | Time   |      |
|----------------------+--------+------|
| *Total time*         | *2:33* |      |
|----------------------+--------+------|
| Symmetric            | 2:33   |      |
| \_  $A^0$ condition   |        | 0:03 |
#+END:

Is there any way to avoid \   in the tanble

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-13  7:48         ` Uwe Brauer
@ 2022-11-14  4:40           ` Ihor Radchenko
  2022-11-14  7:10             ` Uwe Brauer
  2022-11-14  7:15             ` Uwe Brauer
  0 siblings, 2 replies; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-14  4:40 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

> Correct, I did since I found it «logical» to have that table at the end of the file, but now I understand the problem with this. Thanks 
>
> Ok, but I think it would not be bad to add this information to the docstring of org-clock-report!? It is not that intuitive.

This information is already in the docstring

    The new table inherits its properties from the variable
    org-clock-clocktable-default-properties.  The scope of the
    clocktable, when not specified in the previous variable, is
    subtree when the function is called from within a subtree, and
    file elsewhere.

Or do you think it can be expressed better?

> BTW when I move one heading to a subheading the table reads 
>
> #+BEGIN: clocktable :scope file :maxlevel 2
> #+CAPTION: Clock summary at [2022-11-13 08:46]
> | Headline             | Time   |      |
> |----------------------+--------+------|
> | *Total time*         | *2:33* |      |
> |----------------------+--------+------|
> | Symmetric            | 2:33   |      |
> | \_  $A^0$ condition   |        | 0:03 |
> #+END:
>
> Is there any way to avoid \   in the tanble

:indent nil

See 8.4.2 The clock table

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-14  4:40           ` Ihor Radchenko
@ 2022-11-14  7:10             ` Uwe Brauer
  2022-11-15  1:38               ` Ihor Radchenko
  2022-11-14  7:15             ` Uwe Brauer
  1 sibling, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-14  7:10 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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

>>> "IR" == Ihor Radchenko <yantar92@posteo.net> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> Correct, I did since I found it «logical» to have that table at the end of the file, but now I understand the problem with this. Thanks 
>> 
>> Ok, but I think it would not be bad to add this information to the docstring of org-clock-report!? It is not that intuitive.

> This information is already in the docstring

>     The new table inherits its properties from the variable
>     org-clock-clocktable-default-properties.  The scope of the
>     clocktable, when not specified in the previous variable, is
>     subtree when the function is called from within a subtree, and
>     file elsewhere.

> Or do you think it can be expressed better?

It is the term *subtree* that I find confusing.


* Introduction
** Details

<-- that is for me within a subtree

* Introduction
* Details

<-- that is for me within a tree

So why not

The scope of the clocktable, when not specified in the previous
variable, is subtree when the function is called from within a subtree
or tree and file elsewhere. So if you want a clocktable for the whole
file, you should call the function before the first heading.


Or something like this


>> BTW when I move one heading to a subheading the table reads 
>> 
>> #+BEGIN: clocktable :scope file :maxlevel 2
>> #+CAPTION: Clock summary at [2022-11-13 08:46]
>> | Headline             | Time   |      |
>> |----------------------+--------+------|
>> | *Total time*         | *2:33* |      |
>> |----------------------+--------+------|
>> | Symmetric            | 2:33   |      |
>> | \_  $A^0$ condition   |        | 0:03 |
>> #+END:
>> 
>> Is there any way to avoid \   in the tanble

> :indent nil

Thanks



-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-14  4:40           ` Ihor Radchenko
  2022-11-14  7:10             ` Uwe Brauer
@ 2022-11-14  7:15             ` Uwe Brauer
  2022-11-15  1:40               ` Ihor Radchenko
  1 sibling, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-14  7:15 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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


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


> :indent nil

> See 8.4.2 The clock table

Ok I read this, but I cannot see how to configure the default behavior of the clocktable


So in my case it is inserted the only thing that can be changed is the
scope, but other options I have to add or modify manually after I
inserted a table, right?


#+BEGIN: clocktable :scope subtree :maxlevel 2
#+CAPTION: Clock summary at [2022-11-14 08:14]
| Headline                     | Time   |
|------------------------------+--------|
| *Total time*                 | *0:31* |
|------------------------------+--------|
| Nonlinear                    | 0:31   |
#+END:

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-14  7:10             ` Uwe Brauer
@ 2022-11-15  1:38               ` Ihor Radchenko
  2022-11-15  7:12                 ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-15  1:38 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

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

>> This information is already in the docstring
>
>>     The new table inherits its properties from the variable
>>     org-clock-clocktable-default-properties.  The scope of the
>>     clocktable, when not specified in the previous variable, is
>>     subtree when the function is called from within a subtree, and
>>     file elsewhere.
>
>> Or do you think it can be expressed better?
>
> It is the term *subtree* that I find confusing.
>
>
> * Introduction
> ** Details
>
> <-- that is for me within a subtree
>
> * Introduction
> * Details
>
> <-- that is for me within a tree
>
> So why not
>
> The scope of the clocktable, when not specified in the previous
> variable, is subtree when the function is called from within a subtree
> or tree and file elsewhere. So if you want a clocktable for the whole
> file, you should call the function before the first heading.

What about the attached patch?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-clock-report-Improve-docstring.patch --]
[-- Type: text/x-patch, Size: 1518 bytes --]

From a5dff6d46044db868dd95f6b57c28dffb202c308 Mon Sep 17 00:00:00 2001
Message-Id: <a5dff6d46044db868dd95f6b57c28dffb202c308.1668476319.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Tue, 15 Nov 2022 09:35:47 +0800
Subject: [PATCH] org-clock-report: Improve docstring

* lisp/org-clock.el (org-clock-report): Clarify :scope when called
from inside a heading or before first heading.  Separate :scope
description into a separate paragraph.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87h6z2c8pf.fsf@mat.ucm.es
---
 lisp/org-clock.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 9dacc050d..604b5481c 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2146,10 +2146,12 @@ (defun org-clock-report (&optional arg)
 Otherwise, insert a new one.
 
 The new table inherits its properties from the variable
-`org-clock-clocktable-default-properties'.  The scope of the
-clocktable, when not specified in the previous variable, is
-`subtree' when the function is called from within a subtree, and
-`file' elsewhere.
+`org-clock-clocktable-default-properties'.
+
+The scope of the clocktable, when not specified in the previous
+variable, is `subtree' of the current heading when the function is
+called from inside heading, and `file' elsewhere (before the first
+heading).
 
 When called with a prefix argument, move to the first clock table
 in the buffer and update it."
-- 
2.35.1


[-- Attachment #3: Type: text/plain, Size: 224 bytes --]


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-14  7:15             ` Uwe Brauer
@ 2022-11-15  1:40               ` Ihor Radchenko
  2022-11-15  7:21                 ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-15  1:40 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>
>> :indent nil
>
>> See 8.4.2 The clock table
>
> Ok I read this, but I cannot see how to configure the default behavior of the clocktable

8.4.2 The clock table:

       The ‘#+BEGIN’ line contains options to define the scope, structure,
    and formatting of the report.  Defaults for all these options can be
    configured in the variable ‘org-clocktable-defaults’.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-15  1:38               ` Ihor Radchenko
@ 2022-11-15  7:12                 ` Uwe Brauer
  2022-11-16  1:27                   ` Ihor Radchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2022-11-15  7:12 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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


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

> What about the attached patch?

Sounds good to me
> From a5dff6d46044db868dd95f6b57c28dffb202c308 Mon Sep 17 00:00:00 2001
> Message-Id: <a5dff6d46044db868dd95f6b57c28dffb202c308.1668476319.git.yantar92@posteo.net>
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Tue, 15 Nov 2022 09:35:47 +0800
> Subject: [PATCH] org-clock-report: Improve docstring

> * lisp/org-clock.el (org-clock-report): Clarify :scope when called
> from inside a heading or before first heading.  Separate :scope
> description into a separate paragraph.

> Reported-by: Uwe Brauer <oub@mat.ucm.es>
> Link: https://orgmode.org/list/87h6z2c8pf.fsf@mat.ucm.es
> ---
>  lisp/org-clock.el | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index 9dacc050d..604b5481c 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -2146,10 +2146,12 @@ (defun org-clock-report (&optional arg)
>  Otherwise, insert a new one.
 
>  The new table inherits its properties from the variable
> -`org-clock-clocktable-default-properties'.  The scope of the
> -clocktable, when not specified in the previous variable, is
> -`subtree' when the function is called from within a subtree, and
> -`file' elsewhere.
> +`org-clock-clocktable-default-properties'.
> +
> +The scope of the clocktable, when not specified in the previous
> +variable, is `subtree' of the current heading when the function is
> +called from inside heading, and `file' elsewhere (before the first
> +heading).
 
>  When called with a prefix argument, move to the first clock table
>  in the buffer and update it."
> -- 
> 2.35.1

-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-15  1:40               ` Ihor Radchenko
@ 2022-11-15  7:21                 ` Uwe Brauer
  0 siblings, 0 replies; 14+ messages in thread
From: Uwe Brauer @ 2022-11-15  7:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Uwe Brauer, emacs-orgmode

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


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

> 8.4.2 The clock table:

>        The ‘#+BEGIN’ line contains options to define the scope, structure,
>     and formatting of the report.  Defaults for all these options can be
>     configured in the variable ‘org-clocktable-defaults’.


thanks
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

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

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

* Re: org-clock-report on headings and subheadings or for the whole file?
  2022-11-15  7:12                 ` Uwe Brauer
@ 2022-11-16  1:27                   ` Ihor Radchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Ihor Radchenko @ 2022-11-16  1:27 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

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

>> Uwe Brauer <oub@mat.ucm.es> writes:
>
>> What about the attached patch?
>
> Sounds good to me

Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=21413d358

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2022-11-16  1:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-12  8:01 org-clock-report on headings and subheadings or for the whole file? Uwe Brauer
2022-11-13  5:01 ` Ihor Radchenko
2022-11-13  7:08   ` Uwe Brauer
2022-11-13  7:18     ` Uwe Brauer
2022-11-13  7:43       ` Ihor Radchenko
2022-11-13  7:48         ` Uwe Brauer
2022-11-14  4:40           ` Ihor Radchenko
2022-11-14  7:10             ` Uwe Brauer
2022-11-15  1:38               ` Ihor Radchenko
2022-11-15  7:12                 ` Uwe Brauer
2022-11-16  1:27                   ` Ihor Radchenko
2022-11-14  7:15             ` Uwe Brauer
2022-11-15  1:40               ` Ihor Radchenko
2022-11-15  7:21                 ` Uwe Brauer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.