emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Christopher Causer <ml-emacs-orgmode@chyc.co.uk>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: clock-table and hooking that into org-capture file+olp+datetree
Date: Tue, 02 Feb 2021 00:15:09 -0500	[thread overview]
Message-ID: <87sg6fxd7m.fsf@kyleam.com> (raw)
In-Reply-To: <1a9a61b4-a5f9-471b-80e5-1c52902b392d@www.fastmail.com>

Christopher Causer writes:

> One snag I hit that I feel I should mention is what I believe to be a
> mistake in the documentation[1]. I was scratching my head as why
> org-clocktable-defaults wasn't working, but it was only when I brought
> up the inline documentation that I see that this probably is some
> vestigial variableand it has since moved to
> org-clock-clocktable-default-properties.

Despite their confusingly similar names as well as
org-clock-clocktable-default-properties not being documented in the
manual, they serve distinct purposes as far as I understand.
org-clock-clocktable-default-properties is about which properties are
inserted as part of the BEGIN line, while org-clocktable-defaults is the
set of defaults that are used when the value is not taken from the BEGIN
line.

For example, here's the result of calling
org-dynamic-block-insert-dblock and selecting "clocktable" with the
built-in values for both these options:

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :maxlevel 2
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:08]
  | Headline     | Time   |
  |--------------+--------|
  | *Total time* | *2:00* |
  |--------------+--------|
  | one          | 2:00   |
  #+END:

Redoing that after

  (setq org-clock-clocktable-default-properties '(:fileskip0 nil))

it looks like this

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :fileskip0 nil
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:10]
  | Headline     | Time   |
  |--------------+--------|
  | *Total time* | *2:00* |
  |--------------+--------|
  | one          | 2:00   |
  #+END:

Notice the ":fileskip0 nil" in the BEGIN line.

And redoing it once more with

  (setq org-clocktable-defaults
        (plist-put org-clocktable-defaults :link t))

on top

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :fileskip0 nil
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:11]
  | Headline     | Time   |
  |--------------+--------|
  | *Total time* | *2:00* |
  |--------------+--------|
  | [[file:/tmp/scratch.org::*one][one]]          | 2:00   |
  #+END:

Notice that `:link t' has an effect, but it's not inserted in the BEGIN
line.


      reply	other threads:[~2021-02-02  5:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 22:32 clock-table and hooking that into org-capture file+olp+datetree Christopher Causer
2021-01-30  8:40 ` Christopher Causer
2021-01-30 12:53   ` Richard Lawrence
2021-01-30 16:32     ` Christopher Causer
2021-01-30 17:09       ` Richard Lawrence
2021-01-30 22:40         ` Christopher Causer
2021-02-02  5:15           ` Kyle Meyer [this message]

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=87sg6fxd7m.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ml-emacs-orgmode@chyc.co.uk \
    /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).