emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-clock-report on headings and subheadings or for the whole file?
Date: Tue, 15 Nov 2022 01:38:47 +0000	[thread overview]
Message-ID: <87wn7xdmjc.fsf@localhost> (raw)
In-Reply-To: <87h6z2c8pf.fsf@mat.ucm.es>

[-- 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>

  reply	other threads:[~2022-11-15  1:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn7xdmjc.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=oub@mat.ucm.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).