This patch makes some straightforward corrections to a number of
docstrings. Each change is normally to:
- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
and tips given in the Elisp manual
No attempt is made to provide missing docstrings or document arguments.
Cheers,
Phil
* org-clock.el (org-dblock-write:clocktable): Return total time.
(org-clocktable-steps): Skip step when time is zero and the
:stepskip0 property is set.
Rainer Stengele writes:
> Creating clocktables for each day of a month is an excellent feature
> in org! Problem for me is that many resulting tables have a total
> time of 0:00. The problem is not really the zero time I spent but the
> appearance of the tables with zero total time.
>
> Is there a possibility to skip getting such tables? Rational: I do
> not need to show my boss or customer days where I spent 0:00 time on
> the project.
Now you can set :stepskip0 to achieve this.
Patch by Bernt Hansen:
> When org-clock-report-include-clocking-task is set we always add the
> current clocking task to the clock report. This is incorrect if you
> are looking at an agenda clock report for a time range that does not
> include the current clocking task (e.g. yesterday or last week).
>
> Now we only include the current clocking task if the clock report
> date range includes the current clocking task start time.
i/q/C-g Ignore this question; the same as keeping all the idle time.
k/K Keep X minutes of the idle time (default is all). If this
amount is less than the default, you will be clocked out
that many minutes after the time that idling began, and then
clocked back in at the present time.
g/G Indicate that you \"got back\" X minutes ago. This is quite
different from 'k': it clocks you out from the beginning of
the idle period and clock you back in X minutes ago.
s/S Subtract the idle time from the current clock. This is the
same as keeping 0 minutes.
C Cancel the open timer altogether. It will be as though you
never clocked in.
j/J Jump to the current clock, to make manual adjustments.
For all these options, using uppercase makes your final state
to be CLOCKED OUT.
Adam Elliott writes:
> I have attached a git patch against master that implements a new
> parameter to clock tables, "tags". This parameter is a tags-query as a
> string and is used to filter the headlines which are consulted when
> building the clock table.
>
> In my search of the archives to see if this feature already existed, I
> found a reference here:
> http://article.gmane.org/gmane.emacs.orgmode/17304
> suggesting it was difficult. The patch is not so large, though, so
> perhaps I am missing something.
>
> My rationale in implementing this feature was to keep track of the
> occasional task item that is not billable, yet still makes sense to
> include in the overall project structure. Of course I could just avoid
> clocking the task item, or manually delete clock lines before generating
> a report, but this feature reduces the chance for error; no doubt there
> are other workflows enabled with this feature as well. I don't make
> significant use of tags myself, but I know many do.
>
> In order to maintain a sensible report, headlines that don't match the
> tag filter may be included if they have descendants that do. Any time
> clocked directly on non-matching headlines, however, is excluded.
>
> Specifying even a simple filter noticeably slows down clock table
> generation for non-toy reports, particularly for clock table reports
> with :step. If there is no filter, though, there is no degradation in
> performance.
>
> Tag filter syntax is the standard one, as described at:
> http://orgmode.org/manual/Matching-tags-and-properties.html
> Only tags are considered at the moment, although I suspect querying
> against all properties would be possible (if even slower).
>
> Examples:
>
> * development
> CLOCK: => 1:00
> *** task 1
> CLOCK: => 1:00
> *** task 2 :must:
> ***** task 2a
> CLOCK: => 1:00
> ***** task 2b :mustnot:
> CLOCK: => 1:00
>
> Note I am using an unconventional but legal(ish) clock format for
> brevity. Clock tables are also pruned to only relevant lines.
>
> [1] #+BEGIN: clocktable
> | | *Total time* | *4:00* | | |
> |---+--------------+--------+------+------|
> | 1 | development | 4:00 | | |
> | 2 | task 1 | | 1:00 | |
> | 2 | task 2 | | 2:00 | |
> | 3 | task 2a | | | 1:00 |
> | 3 | task 2b | | | 1:00 |
>
> [2] #+BEGIN: clocktable :tags "must"
> | | *Total time* | *2:00* | | |
> |---+--------------+--------+------+------|
> | 1 | development | 2:00 | | |
> | 2 | task 2 | | 2:00 | |
> | 3 | task 2a | | | 1:00 |
> | 3 | task 2b | | | 1:00 |
>
> [3] #+BEGIN: clocktable :tags "-mustnot"
> | | *Total time* | *3:00* | | |
> |---+--------------+--------+------+------|
> | 1 | development | 3:00 | | |
> | 2 | task 1 | | 1:00 | |
> | 2 | task 2 | | 1:00 | |
> | 3 | task 2a | | | 1:00 |
>
> [4] #+BEGIN: clocktable :tags "must-mustnot"
> | | *Total time* | *1:00* | | |
> |---+--------------+--------+------+------|
> | 1 | development | 1:00 | | |
> | 2 | task 2 | | 1:00 | |
> | 3 | task 2a | | | 1:00 |
>
> [5] #+BEGIN: clocktable :tags "must+mustnot"
> | | *Total time* | *1:00* | | |
> |---+--------------+--------+------+------|
> | 1 | development | 1:00 | | |
> | 2 | task 2 | | 1:00 | |
> | 3 | task 2b | | | 1:00 |
>
> As you can see, in examples 2, 4, and 5, the time clocked on
> "development" itself is being removed. Example 2 illustrates the effect
> of tag inheritance.
>
> Adam
The `org-clock-set-current' and `org-clock-delete-current' functions
handle this variable. The variable only stores the last clocked in
entry, not the history of clocked in tasks.
Fixes Lisp error: (error "Not enough arguments for format string") when the
task to be clocked in has both a % in the heading due to the [%] cookie and an effort.
The variable `org-clock-out-when-done' can now also be a list of
states. When the TODO state of a task changes to one of these states,
the clock will stop running in that task.
This extension of the logic was a proposal by Ricard Riley.
Skip clocking out when we are clocking in the same task that
is currently clocking but go through the normal clock-in
setup so a modified task name or effort property is
updated in the modeline.
Avoid closing the currently clocking entry when clocking in the same task
again. Leave the clock entry open until some other task is clocked in.
This allows us to clock in tasks with hooks that are called frequently without
generating lots of short sequential clock entries for the same task.
Avoid closing the currently clocking entry when clocking in the same task
again. Leave the clock entry open until some other task is clocked in.
This allows us to clock in tasks with hooks that are called frequently without
generating lots of short sequential clock entries for the same task.
Patch by Bernt Hansen.
Modified by Carsten
Richard Moreland writes:
> (setq org-agenda-custom-commands
> '(("X" agenda "" nil ("agenda.html"))))
> ;; This seems to break org-mobile-push?
> ;;(setq org-agenda-exporter-settings
> ;; '((org-agenda-add-entry-text-maxlines 5)
> ;; (htmlize-output-type 'font)))
>
> I have the lines above in my .emacs file. When I uncomment the 3
> commented lines, org-mobile-push just hangs after OVERVIEW.
>
> I don't understand exactly what is going on, but if I hit C-g or
> C-c enough I can regain control, but the sync never finishes.
Kai Tetzlaff writes:
> i noticed that when using the org-mode clock persistence, the
> stored clock data gets deleted when i start emacs and exit again
> without turning on org-mode in between.
>
> When looking at org-clock-persistence-insinuate it looks like
> org-clock load will only run after org-mode gets started whereas
> org-clock-save will always be called when exiting emacs:
>
> (defun org-clock-persistence-insinuate ()
> "Set up hooks for clock persistence"
> (add-hook 'org-mode-hook 'org-clock-load)
> (add-hook 'kill-emacs-hook 'org-clock-save))
>
> Not running org-mode-hook (i.e. not starting org-mode) thus does
> not load clock data but org-clock-save overwrites any prviously
> saved data when exiting emacs.
>
> An easy fix for that would be to just add org-clock-load to e.g.
> emacs-startup-hook. But this will only work if the code in
> org-clock-load does not depend on any org-mode initialization
> code (or would require loading org-mode).
>
> So org-clock-save should probably check if org-clock-load has
> been running during the current emacs session (or if clock
> persistence was just enabled) and only then save clock data when
> exiting emacs. I tried to add this to the code in org-clock-save:
Now the recommendation is to use clock persistence only for the
history, and to use John's code for resolving a clock that has been
idle (either because the user stopped working or exited Emacs).
(org-clock-disable-clock-resolution): New customization variable that
disable automatic clock resolution on clock in.
(org-clock-in): If `org-clock-disable-clock-resolution' is set, do not
automatically resolve anything. This is does not affect idle-time
resolution, however, if `org-clock-idle-time' is set.
See the new manual section on "Resolving idle time".
(org-clock-resolve-clock): If keeping or subtracting time results in a
clock out at a time in the past, and if the resolution occurred due to
idleness or invoking `M-x org-resolve-clocks', remember that past moment
in time. On the next clock in, the user will be prompted to see if they
want to back-date their new clock to then.
(org-clock-resolve): Do not jump the user to the location of a dangling
clock if the resolution is occuring due to an idle timeout. In that
case there is typically only one dangling clock, the active one, and
there is no value gained by shuffling their windows around to show it to
them. Being prompted to resolve an idle clock should be as inobtrusive
as possible.
(org-resolve-clocks-if-idle): New function that resolves only the
currently active clock if the user has exceeded the time returned by
`org-user-idle-seconds', based on the value of `org-clock-idle-time'.
(org-clock-in): If, after resolving clocks,
(org-clock-out): Cancel the `org-clock-idle-timer' on clock out.
(org-clock-resolve-clock): New function that resolves a clock to a
specific time, closing or resuming as need be, and possibly even
starting a new clock.
(org-clock-resolve): New function used by `org-resolve-clocks' that sets
up for the call to `org-clock-resolve-clock'. It determines the time to
resolve to based on a single-character selection from the user to either
keep time, subtract away time or cancel the clock.
(org-resolve-clocks): New user command which resolves dangling clocks --
that is, open but not active -- anywhere in the file list returned by
`org-files-list'.
(org-clock-in): Automatically resolve dangling clocks whenever a user
clocks in.
(org-clock-cancel): If the user cancels the solely clock in a LOGBOOK,
remove the empty drawer.
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle. Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time. If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).
(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).