Commit Graph

827 Commits

Author SHA1 Message Date
Bastien Guerry 5c762bbdc6 Remove some autoloads and clean up code.
* org.el (turn-on-orgtbl): Moved here from org-table.el.
(org-clock-persistence-insinuate): Moved here from org-clock.el.
(org-update-all-dblocks, org-map-entries)
(org-require-autoloaded-modules, org-forward-element)
(org-backward-element, org-up-element)
(org-element-greater-elements, org-drag-element-backward)
(org-drag-element-forward, org-mark-element)
(org-narrow-to-element, org-transpose-element)
(org-unindent-buffer): Don't autoload.

* org-clock.el (org-clock-get-clocktable): Rename from
`org-get-clocktable'.
(org-clock-persistence-insinuate): Move to org.el.

* org-capture.el: Do no set `generated-autoload-file' locally.
Minor code clean up.

* org-agenda.el (org-agenda-list): Use
`org-clock-get-clocktable'.  Do no set
`generated-autoload-file' locally.

* org-table.el (org-table-iterate-buffer-tables): Minor
reformatting.
(turn-on-orgtbl): Move to org.el.

* org-html.el (org-export-htmlize-generate-css): Don't autoload.

* org-timer.el (org-timer-pause-or-continue, org-timer-stop):
Ditto.

* ob-tangle.el (org-babel-tangle-lang-exts): Ditto.

* ob-lob.el (org-babel-lob-ingest): Ditto.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling): Ditto.

* org-lparse.el (org-lparse-and-open, org-lparse-batch)
(org-lparse-to-buffer, org-replace-region-by)
(org-lparse-region): Ditto.

* org-mobile.el (org-mobile-create-sumo-agenda): Ditto.
2012-10-02 10:03:15 +02:00
Bastien Guerry e4c31cf98b Use generated-autoload-file: "org-loaddefs.el" as a local variable. 2012-10-02 08:50:46 +02:00
Bastien Guerry fe7f964b49 Merge branch 'maint' 2012-09-28 17:47:53 +02:00
Bastien Guerry 222eae4033 Fix error messages: don't use a dot at the end 2012-09-28 17:47:48 +02:00
Bastien Guerry 91a7e272b3 org-clock.el: Minor enhancements
* org-clock.el (org-clock-sound): Enhance docstring.
(org-notify): Use the parameter `play-sound' as argument for
`org-clock-play-sound'.
(org-clock-play-sound): New optional argument `clock-sound' to
override `org-clock-sound'.
2012-09-26 15:52:21 +02:00
Bastien Guerry 99453a16f5 Merge branch 'maint' 2012-09-21 16:31:55 +02:00
Levin Du 996a49dd44 org-clock.el (org-clock-in): Fix bug in setting the clock heading
* org-clock.el (org-clock-in): Fix bug in setting the clock
heading.

TINYCHANGE
2012-09-21 15:42:38 +02:00
Bastien Guerry f3202903d6 New option `org-use-last-clock-out-time-as-effective-time'
* org.el (org-use-last-clock-out-time-as-effective-time): New option.
(org-current-effective-time): Use the new option.

* org-clock.el (org-clock-get-last-clock-out-time): New
function.

When set to `t', this new option will take the time of the last clock out
timestamp and use it when changing/logging the todo state.

Thanks to Gaizka Villate who suggested this.
2012-09-19 11:36:32 +02:00
Stuart Hickinbottom 4f5bd2522e Fix org-clock evaluation startup hang on Windows
* lisp/org-clock.el (org-x11idle-exists-p): Only shell out when running
on X.

The definition of this variable currently executes "command" via the
shell during evaluation, irrespective of the platform on which
Org-mode is running. Unfortunately, on Windows, this matches the
"command.com" NT Virtual DOS Machine executable and so this gets
launched, but this is a shell and therefore sits there waiting for
user input and never returns. The net result is that Emacs will hang
on Windows when evaluating org-clock.el with the ntdvm.exe process
spinning at 100%.

The simple fix is to check that the platform is X before trying to
deal with the "x11idle" external process.

TINYCHANGE
2012-08-29 19:41:14 +02:00
Bastien Guerry a9b8778b0c Code clean-up: rename some agenda internals.
* org.el (org-agenda-prepare-buffers): Rename from
`org-prepare-agenda-buffers'.
(org-match-sparse-tree, org-map-entries): Use the new names.

* org-agenda.el (org-agenda-prepare-window): Rename from
`org-prepare-agenda-window'.
(org-agenda-prepare): Rename from `org-prepare-agenda'.
(org-agenda-run-series, org-agenda-prepare, org-timeline)
(org-agenda-list, org-search-view, org-todo-list)
(org-tags-view, org-agenda-list-stuck-projects, org-diary)
(org-agenda-to-appt): Use the new names.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-icalendar.el (org-export-icalendar): Ditto.

* org-clock.el (org-dblock-write:clocktable)
(org-dblock-write:clocktable): Ditto.

* org2rem.el (org2rem): Ditto.
2012-08-28 13:11:12 +02:00
Bastien Guerry 62064c73fc org-clock.el: Fix clock overlays bug
* org-clock.el (org-clock-put-overlay): Put the overlay on the
whole headline, not only on the last character.  This fixes a
bug with overlays on headlines ending with a bracketed link.

Thanks to Ryan Kaskel for reporting this.
2012-08-19 08:01:43 +02:00
Bastien Guerry 09743f48d6 Fix many small typos. 2012-08-13 05:59:44 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 002b700cb3 Use ̀org-looking-back' instead of `looking-back' to keep compat with XEmacs
* org-clock.el (org-clock-cancel): Use `org-looking-back'.

* org-pcomplete.el (org-thing-at-point): Ditto.

* org.el (org-timestamp-change): Ditto.
2012-08-10 15:02:45 +02:00
Bastien Guerry bc19977534 org-clock.el: Let C-u M-x org-clock-out RET now prompts for a state to switch to
* org-clock.el (org-clock-in): Call `org-clock-out' with the
new argument `switch-to-state' set to nil.  Fix docstring.
(org-clock-in-last): Prompt for a todo state to switch to when
called with three universal prefix arguments.  Don't display a
message when the clock is already running.  Update docstring.
(org-clock-out): New argument `switch-to-state'.  When this
argument is non-nil, prompt for a state to switch the clocked
out task to, overriding `org-clock-out-switch-to-state'.
2012-08-09 14:52:38 +02:00
Bastien Guerry de271e3751 Introduce a new special property CLOCKSUM_T for today's clocked time.
* org.el (org-special-properties): New special property
CLOCKSUM_T.
(org-entry-properties): Handle the new special property.

* org-colview.el (org-columns): Handle a new special property
CLOCKSUM_T.
(org-agenda-colview-summarize, org-agenda-colview-compute):
Ditto.

* org-clock.el (org-clock-sum-today): New function.
(org-clock-sum): New argument PROPNAME to set a custom text
property instead of :org-clock-minutes.

* org.texi (Special properties, Column attributes)
(Agenda column view): Document the new special property
CLOCKSUM_T.

Thanks to Brian Wood who asked a question wrt this.
2012-08-05 11:12:04 +02:00
Bastien Guerry 42d2552a83 Check for the existence of the x11idle command only once.
* org-clock.el (org-x11idle-exists-p): New variable.
(org-user-idle-seconds): Use it.
2012-07-28 11:53:05 +02:00
Bastien Guerry 0102b4b404 Revert "org-clock.el (org-user-idle-seconds): Simplify."
This reverts commit f398b9ee53.
2012-07-28 08:35:04 +02:00
Achim Gratz c2735e7c19 Re-apply (correctly): Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 07:06:25 +02:00
Achim Gratz 234df465ad Revert "Move org-element.el from contrib/lisp to lisp/."
This reverts commit abbea59611.
2012-07-28 07:02:21 +02:00
Bastien Guerry f398b9ee53 org-clock.el (org-user-idle-seconds): Simplify.
* org-clock.el (org-user-idle-seconds): Simplify.

Thanks to Nick Dokos for paving the way (all the way down).
2012-07-28 01:42:59 +02:00
Bastien Guerry abbea59611 Move org-element.el from contrib/lisp to lisp/.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.

* org-exp-blocks.el (org): Don't require org.  Add declarations.

* org-clock.el (org): Don't require org.

* ob-exp.el (org-list-forbidden-blocks): Add declarations.
2012-07-28 00:55:45 +02:00
Bastien Guerry 796b4ec43b org-clock.el: Set the marker for `org-clock-history' at a safer position.
* org-clock.el (org-clock-in): Set the marker for
`org-clock-history' at a safer position.

The clock marker stored in `org-clock-history' used to be at the
beginning of the heading.  When manually inserting content here,
the marker is not updated because it is *before* the point.  So
set the clock marker right after the first "*" of the headline
so that it will always be correctly updated.
2012-07-27 17:24:16 +02:00
Eric Schulte 556f725e5b "concat 'string" -> "concat"
Thanks to Achim for pointing out this careless oversight in my last
commit.

* lisp/org-clock.el (org-clock-special-range): "concat 'string" ->
  "concat"
  (org-clocktable-shift): "concat 'string" -> "concat"
2012-07-25 10:53:55 -06:00
Eric Schulte d7a8b6636a replacing cl concatenate with concat
* lisp/org-clock.el (org-clock-special-range): Replacing cl concatenate
  with concat.
  (org-clocktable-shift): Replacing cl concatenate with concat.
2012-07-25 09:24:11 -06:00
Nicolas Calderon Asselin db2bf2a818 Added checks to determine which idle time to use
* lisp/org-clock.el (org-clock-idle-time): Org-mode assumed that x11idle
  was an available command, and returned an idle time of 0 if it was not
  (never idle). Added checks so that org-idle-time will come from emacs'
  own current-idle-time if x11idle cannot be found or if it cannot
  retrieve the idle time from X11

TINYCHANGE
2012-07-24 17:10:10 +02:00
Bastien Guerry fea1b82bef Bind `org-clock-in-last' to C-c C-x C-x and ̀org-clock-cancel' to C-c C-x C-q.
* org.el (org-flag-drawer): Add a docstring.
(org-mode-map): Bind ̀org-clock-cancel' to "C-cC-xC-q" and
`org-clock-in-last' to "C-cC-xC-x".  This fixes a bug in the
previous keybinding for `org-clock-in-last', which would
override the one for `org-clock-in'.

* org-clock.el (org-clock-in-last): Prevent errors when there
is no clocking history.
(org-clock-cancel): Fix bug when checking against a clock log
in a folded drawer.

Thanks to Bernt Hansen who reported the problem.
2012-07-14 08:33:48 +02:00
Bastien Guerry 3ecd7a9ad0 Move `org-clock-out-time' to the right place.
Thanks to Achim Gratz for spotting the compiler warning.
2012-07-13 01:45:49 +02:00
Bastien Guerry 3528fc6b42 Implement continuous clocking. Small other improvements. Update documentation.
* org.el (org-mode-map): Add `C-c C-x C-I' as a keybinding for
`org-clock-in-last'.

* org-clock.el (org-clock-continuously): New option.
(org-clock-in): Three universal prefix arguments set
`org-clock-continuously' to `t' temporarily.
(org-clock-in-last): Fix call to `org-clock-select-task' and
support continuous clocking.
(org-clock-out-time): New variable.
(org-clock-out): set `org-clock-out-time' when clocking out.
Small docstring rewriting.
(org-clock-remove-empty-clock-drawer): Fix "invalid search
bound" bug when trying to delete empty logbook drawer.
(org-clock-cancel): If the clock log is gone, send a warning
instead of deleting the region that is supposed to contain it.

* org.texi (Clocking commands): New cindex.
(Clocking commands): Update documentation for `org-clock-in'.
Document `org-clock-in-last'.  Mention `org-clock-out' and
`org-clock-in-last' as commands that can be globally bound.
(Resolving idle time): Document continuous clocking.
2012-07-12 14:04:54 +02:00
Bastien Guerry d5aa0e0d73 Rename `org-indent-line-function' to `org-indent-line'.
* org.el (org-mode, org-add-log-setup)
(org-get-property-block, org-entry-put)
(org-property-next-allowed-value, org-return)
(org-indent-line): Rename `org-indent-line-function' to
`org-indent-line'.

* org-timer.el (org-timer-item): Ditto.

* org-table.el (org-table-store-formulas): Ditto.

* org-clock.el (org-clock-in, org-clock-find-position): Ditto.
2012-07-11 19:11:26 +02:00
Tim Howe f88679a399 org-clock: Customizable variable syntax fix
* org-clock.el (org-clocktable-defaults): Revert extra layer of quoting.

It appears the goal in 9b23f082 was to allow defaulting a plist member
to a variable; however the plist was being constructed with LIST and
therefore the `, combination was unnecessary.

TINYCHANGE
2012-07-10 11:15:22 +02:00
Bastien Guerry 9780de8b30 org-clock.el (org-clock-in-last): New command.
* org-clock.el (org-clock-in-last): New command.

This autoloaded command provides a way to clock in the last clocked
item stored in `org-clock-history' from any buffer.  This is handy
when you don't want to go back to your .org file to clock into the
last clocked task.
2012-07-06 12:54:43 +02:00
Bastien Guerry 8dd8540f55 org-clock.el (org-clock-in): Fix typo in docstring.
* org-clock.el (org-clock-in): Fix typo in docstring.
2012-07-06 12:34:36 +02:00
Bastien Guerry e32a4777df Merge branch 'maint' 2012-06-03 10:29:09 +02:00
Bastien Guerry 5968047924 Backport changes by Chong Yidong in Emacs trunk (revno 108457).
* org-clock.el (org-clock-string-limit)
(org-clock-modeline-total, org-clock-task-overrun-text)
(org-clock-mode-line-entry): Doc fix, "modeline" -> "mode line".
2012-06-03 10:28:46 +02:00
Achim Gratz 595d451280 use org-no-warnings macro for XEmacs compatibility
* lisp/org-agenda.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-bbdb.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-clock.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org.el: Replace with-no-warnings with org-no-warnings (defined
  in org-macs.el).
2012-05-19 09:48:57 +02:00
Bastien Guerry 7c513b3047 New option `org-clock-frame-title-format'.
* org-clock.el (org-frame-title-format-backup): New variable
to store the value of `frame-title-format' before `org-clock'
might replace it by `org-clock-frame-title-format'.
(org-clock-frame-title-format): New option.
(org-frame-title-string): Delete.
(org-clock-update-mode-line): Minor code reformatting.
(org-clock-in, org-clock-out, org-clock-cancel): Use
`org-clock-frame-title-format'.

See http://thread.gmane.org/gmane.emacs.orgmode/55477

Trying to update `frame-title-format' is tricky and error-prone, since
users can set up this variable in many different ways.  AFAIK there is
no equivalent to `global-mode-string' for setting the frame title, we
would use it otherwise.

The user can still configure `org-clock-frame-title-format' the way he
wants.
2012-05-05 14:21:13 +02:00
Bastien Guerry 005576f0b6 org-clock.el (org-clock-get-clock-string): Add a space.
* org-clock.el (org-clock-get-clock-string): Add a space.
2012-05-05 11:30:58 +02:00
Bastien Guerry c306dbe388 org-clock.el: Fix bug in `org-clocktable-write-default'.
* org-clock.el (org-clocktable-write-default): Temporarily
disable `delete-active-region' so that we don't accidently
delete an active region when exporting a subtree/region.

Thanks to Mike McLean for the detailed bug report.
2012-04-29 01:18:35 +02:00
Bastien Guerry 008689cc79 org-clock.el: Use `executable-find' instead of `org-program-exists'.
* org-clock.el (org-program-exists): Remove.
(org-show-notification, org-clock-play-sound): Use
`executable-find' instead of `org-program-exists'.

Thanks to Sébastien Vauban for pointing this.
2012-04-28 23:43:10 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

* org-colview.el:
(org-dblock-write:columnview, org-dblock-write:columnview):
Ditto.

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Bastien Guerry ef956d7181 When clocking, Don't modify `frame-title-format' if it is a string.
* org-clock.el (org-clock-out, org-clock-cancel)
(org-clock-in): Don't modify `frame-title-format' if it is a
string.

Thanks to Mike McLean for reporting this and to Matt Lundin for
pointing at the problem in the code.
2012-04-22 09:01:28 +02:00
Bastien Guerry 80cc1ccd9e org-clock.el (org-program-exists): Fix docstring.
* org-clock.el (org-program-exists): Fix docstring.

Thanks to Sébastien Vauban for reporting this.
2012-04-21 12:10:51 +02:00
Bastien Guerry 41939cb04b org-clock.el (org-program-exists): Fix docstring.
* org-clock.el (org-program-exists): Fix docstring.

Thanks to Sébastien Vauban for reporting this.
2012-04-20 13:20:42 +02:00
Bastien Guerry d89823a75b org-clock.el: New option `org-clock-file-time-cell-format'.
* org-clock.el (org-clock-file-time-cell-format): New option.
(org-clocktable-write-default): Use it.
2012-04-20 13:06:46 +02:00
Adam Spiers 1685087f5f org.el: Display a message when no clock is active.
* org-clock.el (org-clock-modify-effort-estimate): Display a
message when no clock is currently active.

TINYCHANGE
2012-04-20 12:41:11 +02:00
George Kettleborough 37fafb7b9e Option for clock and timer to be displayed in frame-title
* org-clock.el: New option `org-clock-clocked-in-display' to control
whether the current clock is displayed in the mode line and/or frame
title.

* org-timer.el: New option `org-timer-display' to control whether
the current timer is displayed in the mode line and/or frame title.

This allows the clock and timer to be displayed in the frame title instead of,
or as well as, the mode line.  This is useful for people with limited space in
the mode line but with ample space in the frame title.
2012-04-20 11:56:34 +02:00
Bastien Guerry 8c4ccab028 Merge branch 'hotfix' 2012-04-11 01:14:39 +02:00
Bastien Guerry 56bd9dc552 org-clock.el: Rename `org-task-overrun*' to `org-clock-task-overrun*'.
* org-clock.el (org-clock-task-overrun-text)
(org-task-overrun, org-clock-get-clock-string)
(org-clock-update-mode-line)
(org-clock-notify-once-if-expired): Rename `org-task-overrun'
and `org-task-overrun-text' to `org-clock-task-overrun' and
`org-clock-task-overrun-text' respectively.
(org-task-overrun-text): New alias.
2012-04-11 01:14:21 +02:00
Bastien Guerry bdd922e3f7 Add :version to org-clock.el options. 2012-04-03 13:27:34 +02:00
Bastien Guerry 7d64e883b0 org-clock.el (org-show-notification): Use `fboundp' instead of `featurep' and the additional `require'.
* org-clock.el (org-show-notification): Use `fboundp' instead
of `featurep' and the additional `require'.

Thanks to Peter Münster for reporting this.
2012-04-02 16:52:16 +02:00
Bastien Guerry 42d60368a3 Merge branch 'hotfix-7.8.06' 2012-04-02 08:07:57 +02:00
Bastien Guerry 3658686f59 Fix name of dynamically bound variable in org-clock.el. 2012-04-02 08:07:52 +02:00
Bastien Guerry e3913a2ab5 Merge branch 'hotfix-7.8.06' 2012-04-02 00:53:37 +02:00
Bastien Guerry 5c38bf0ef7 Fix copyright and authors lines. 2012-04-02 00:53:28 +02:00
Bastien Guerry 967783215b Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org.el
2012-03-31 11:04:40 +02:00
Bastien Guerry b46fa17a97 Fix global dynamic variables in org-clock.el.
Thanks to Martyn Jago for this patch.
2012-03-30 22:43:03 +02:00
Bastien Guerry 8ab92f8b55 Delete trailing whitespaces in core files. 2012-03-28 02:05:36 +02:00
Bastien Guerry 7686a81c14 New option to format the total time cells.
* org-clock.el (org-clock-in-prepare-hook): New option to
format the total time cells.
(org-clocktable-write-default): Use the new option.
2012-03-28 00:49:55 +02:00
Bastien Guerry eb7f7159c9 Merge branch 'hotfix-7.8.06' 2012-03-23 13:42:29 +01:00
Ilya Shlyakhter 532a1ac40a Tags/properties matcher: Fixed issues with todo-only matches
lisp/org.el (org-scan-tags): Require todo-only argument, and document
that it should be the same one set by make-org-tags-matcher.
Fix documentation to explain that todo-only is really
not-done-todo-only.

(org-make-tags-matcher): If todo part of matcher starts with /!,
matcher now always checks that the TODO keyword is present and
is a not-done state.  This matters e.g. for org-map-entries
which unlike org-scan-tags does not do its own separate todo-only
filtering.  Added docs to explain matcher dependencies.

(org-map-entries): Make sure todo-only is correctly passed from
org-make-tags-matcher to org-scan-tags.

* lisp/org-clock.el: (org-clock-get-table-data): Make sure todo-only
does not leak when it is set by make-org-tags-macher.

* lisp/org-crypt.el: (org-encrypt-entries, org-decrypt-entries): Make
sure todo-only is correctly passed from org-make-tags-matcher to
org-scan-tags.

* contrib/lisp/contacts.el: (org-contacts-filter) : Make sure todo-only
is correctly passed from org-make-tags-matcher to org-scan-tags.
2012-03-23 13:42:06 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Carsten Dominik d23ce33583 Clocking work time: faster filtering of clock entries by trusting org-scanner-tags
* lisp/org-clock.el (org-clock-get-table-data): Bind org-scanner-tags
to tags-list and org-trust-scanner-tags to t while evaluating the
matcher, since the matcher is always evaluated at the current entry.

TINYCHANGE
2012-03-16 17:35:19 +01:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Bernt Hansen df0a988a92 Fix J in agenda when clock out hook clocks in again
* org-clock.el (org-clock-out): Do not delete the current clocking task
when org-clock-out-hook clocks in another task

My clock out hook keeps the clock running by automatically clocking in
a new task (the parent task, or the default task).  This sets a new
clocking task which was then clobbered at the end of org-clock-out
so that J in the agenda would return

    "No running clock, use `C-c C-x C-j' to jump to the most recent one"

We now detect that another task is clocked in and skip clearing the
org-clock-current-task variable used by the agenda to determine if
the clock is currently running.
2012-02-12 19:44:23 +01:00
David Maus c9a510cf8e Moved `org-in-clocktable-p' from org-clock.el to org.el
* org-clock.el (org-in-clocktable-p): Moved to org.el.
* org.el (org-in-clocktable-p): New function. Moved from org-clock.el

Fixes a bug reported by suvayu ali in
<CAMXnza2W9VSJ2d-dDmsByNmTVgxnt1Onp=J5S=TsFEi8MOVNtg@mail.gmail.com>.

`org-context' depends on the function but org.el does not depend on
org-clock.el.
2012-02-08 20:09:48 +01:00
Bastien Guerry a7c6f70ab1 Revert "Remove file restrictions when generating clock report data"
This reverts commit 7a73e155a3.
2012-01-19 16:19:42 +01:00
Bernt Hansen 7a73e155a3 Remove file restrictions when generating clock report data
This may need more work for dynamic blocks used in files.
2012-01-11 16:42:38 +01:00
Bastien Guerry fadca5e8eb Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-01-10 11:56:15 +01:00
Bastien Guerry f6d7b32bf2 Fix trailing whitespaces. 2012-01-04 16:20:04 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Carsten Dominik 746bd50327 Fix clock regexps
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Remove erraneous space in regexp

Patch by Joe Vornehm Jr.

TINYCHANGE
2011-12-31 09:05:11 +01:00
Dave Abrahams 4a8be63ac6 org-clock.el: Check the clock buffer is existing when clocking out.
* org-clock.el (org-clock-out-if-current): Check the clock
buffer is existing.

TINYCHANGE
2011-12-11 18:25:58 +01:00
Bernt Hansen 0151120b1b Fix marker in no buffer error for task state change in an indirect buffer
* lisp/org-clock.el (org-clock-out-if-current): Fix marker in no buffer error
  for task state change in an indirect buffer

org-clock-out-when-current was enhanced in 098cf35 (Clock: Clock out
when done also in indirect buffers, 2009-03-23) to handle indirect
buffers.

This enhancement uses (buffer-base-buffer (org-clocking-buffer)) but
when not clocking (org-clocking-buffer) returns nil - so
buffer-base-buffer returns the base buffer of the current buffer which
is never nil.  This leads to marker in no buffer errors trying to stop
the clock when it is not running.

Now we explicitly check up front that the clock is running before
any other conditions that lead to stopping the clock.
2011-12-11 18:22:06 +01:00
Roberto Huelga a39328cddf Make the function `org-program-exists' work on osx.
* org-clock.el (org-program-exists): Make the function
compatible with darwin systems.
2011-12-11 13:50:36 +01:00
Bastien Guerry fcdeeb9101 Fix typos fixed in Emacs trunk.
* org-freemind.el (org-freemind-write-mm-buffer): Fix typo.

* org-colview.el (org-columns-edit-value) (org-columns-next-allowed-value):
  Fix typos.

* org-bibtex.el (org-bibtex-autogen-keys): Fix typo.

* org-clock.el (org-clock-special-range): Fix typo.

Thanks to Paul Eggert for these fixes.
2011-11-28 15:11:52 +01:00
Carsten Dominik 278d5afa2f Allow time stampes without day name
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Make space after date optional.
* lisp/org.el (org-set-regexps-and-options):
(org-ts-regexp):
(org-ts-regexp-both):
(org-ts-regexp1):
(org-ctrl-c-ctrl-c): Make `C-c C-c' on date fix the time stamp

* doc/org.texi (Creating timestamps): Document the effect of `C-c C-c'
on a timestamp.
2011-11-09 18:55:27 +01:00
Bastien Guerry cdbf7ed876 Revert "Move three functions and add appropriate require/declarations."
This reverts commit 8c3ecbe39a.
2011-08-19 22:11:15 +02:00
Bastien Guerry 9f337ee06c org-clock.el: remove `org-clocktable-sort-clock-data'.
This function by Max Mikhanosha was added accidently.  We are
waiting for the FSF to process Max copyright assignement to get
this function in org-mode.

Thanks to Achim Gratz for spotting at this.
2011-08-18 09:00:20 +02:00
Bastien Guerry 8c3ecbe39a Move three functions and add appropriate require/declarations.
* org-clock.el (org-duration-string-to-minutes)
(org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
Move from org.el.
2011-08-17 16:08:02 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
David Maus 545bfddeea Provide edebug specifications for macros
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-18 09:42:11 +02:00
Bastien Guerry d406defd61 org-clock.el: Fix bug in `org-clock-timestamps-change'. 2011-07-09 23:54:49 +02:00
Bastien Guerry fd12e700b0 Minor code cleanup. 2011-07-09 18:12:18 +02:00
Bastien Guerry f65e63d094 Fix tiny spelling mistake. 2011-07-09 17:38:59 +02:00
Bastien Guerry db731a9715 Allow synchronous update of timestamps in CLOCK log.
* org.el (org-shiftcontrolup, org-shiftcontroldown): New
commands to use `org-clock-timestamps-change'.

* org-clock.el (org-clock-timestamps-change)
(org-clock-timestamps-down, org-clock-timestamps-up)
(org-at-clock-log-p): New functions to let the user update
clock log timestamps while keeping the same clock duration.

Thanks to Rainer Stengele for this idea.
2011-07-09 17:38:21 +02:00
Bastien Guerry 65b64bea53 org-clock.el: new hook to remove empty clock drawer.
* org-clock.el (org-clock-remove-empty-clock-drawer): New
function to remove empty clock drawer.
(org-clock-out-hook): Add the new function as a hook.
2011-07-09 15:20:31 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Achim Gratz d37223562d Introduce CLOCK_INTO_DRAWER property like the existing LOG_INTO_DRAWER
* lisp/org.el (defcustom org-log-into-drawer): correct typo
* lisp/org-clock.el: new function org-clock-into-drawer to change
  the location of clock events based on properties CLOCK_INTO_DRAWER
  or, as fallback, LOG_INTO_DRAWER, like it is already possible for
  state change logs.
* lisp/org-clock.el (org-clock-jump-to-current-clock): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval
* lisp/org-clock.el (org-clock-find-position): add statement
  to let clause to bind org-clock-into-drawer to result of function
  eval, change let to let* since the binding is used later in the
  same clause
* doc/org.texi: document that both CLOCK_INTO_DRAWER and
  LOG_INTO_DRAWER can be used to override the contents of variable
  org-clock-into-drawer (or if unset, org-log-into-drawer)
* doc/org.texi: @xref->@pxref
2011-06-27 12:12:23 +02:00
Niels Giesen 1de29a0059 Fix reported file time for clock reports
Fix the format specification for clock tables.

Niels writes:

Bernt was right in that there were more arguments to format than the
format string specified. I guess I must not have noticed that there was
a call to format (all the other times properties columns are 'maybe
inserted' go directly to `insert-before-markers'), and I must have
forgotten to test the multifile case (I never used multifile clock
reports myself).

However, to keep the layout of the table consistent the *File time*
cells should be in the Headline column. Attached patch fixes this by
putting the (empty) properties cells *before* the *File time* cell.
2011-06-10 13:56:02 +02:00
Carsten Dominik 7c6323ef09 Add param :properties to list properties in clocktable
* doc/org.texi (The clock table): Document the :properties and :inherit-props
arguments for the clocktable.
* lisp/org-clock.el (org-clocktable-write-default): Implement adding property
columns to the clock table.

Patch by Niels Giesen.
2011-05-31 14:20:14 +02:00
Carsten Dominik af730fec0a Get rid of some compiler warnings 2011-05-11 10:10:24 +02:00
Carsten Dominik 02441ed433 Implement clock consistency check functionality for agenda
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): New option.
(org-agenda-list): Handle display change to clock check.
(org-agenda-get-progress): Show only clock entries if we are doing the
consistency check.
(org-agenda-show-clocking-issues): New function.
(org-agenda-check-clock-gap): New function.
(org-agenda-view-mode-dispatch): Offer consistency check.
(org-agenda-log-mode): Handle switch to clock only display.
(org-agenda-set-mode-name): Show lighter for Clockcheck.
* lisp/org.el (org-hh:mm-string-to-minutes): Accept an integer argument
and return it unchanged.
* doc/org.texi (Agenda commands): Document clock consistency checks.
* doc/orgcard.tex: Document key for clock consistency check.
2011-04-24 17:17:25 +02:00
Bastien Guerry 8d0c034047 `org-clock-report': use :scope sutree when inserting from within a subtree.
* org-clock.el (org-clock-report): change the scope of the
inserted clock report depending on whether the point is within
a subtree (:scope subtree) or not (:scope file).
2011-03-23 15:11:59 +01:00
Bastien Guerry 5a351a23e8 org-clock.el: localize the "Clock summary at" string.
* org-clock.el (org-clock-clocktable-language-setup): Add a
string.
(org-clocktable-write-default): Use the new localized string
in `org-clock-clocktable-language-setup'.
2011-03-17 11:22:00 +01:00
Bernt Hansen 0f301d133b Allow clocking in new tasks inserted before the current clocking task
* lisp/org-clock.el (org-clock-in): Allow clocking in new tasks inserted
  before the current clocking task

org-clock-in now checks that the name of the task you are clocking in
also matches org-clock-current-task.  This allows us to insert a new
task in front of the current clocking task (with M-S-RET on the
heading of the current clocking task) and then clock in the new task.

Previously this just stated that clocking continues in the old task
since the marker point now matches the new task.

A side-effect of this change is that changing the current clocking
task headline and clocking in again will now close the current clock
and open a new entry as well as update the name of the current
clocking task in the modeline.
2011-03-10 10:21:19 +01:00
Bernt Hansen d008facdab Allow setting default clocking task to current clocking task
* lisp/org-clock.el (org-clock-in): Set default clocking task when already clocking the task

The default clocking task can now be set to the current clocking task.
Previously this just threw an error stating the clock continues in the
current clocking task.  The double prefix now forces setting the
default clocking task instead of forcing the user to clock out and
back in again just to set the default clocking task to the current
clocking task.
2011-03-10 10:20:40 +01:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Lawrence Mitchell 75a1b98cfb Support modifiers in effort durations (was: Re: Does Effort support hours only?)
Luke Crook wrote:
> Is it possible to specify estimated effort in something other
> than hours (0.5, or 0:30)?

> For example 1w, 1m, 2d etc?

Here's a cleaned up patch that allows user-specified modifiers
for effort strings.  The new variable `org-effort-durations'
lists modifiers, and their mapping to minutes (words, as well as
single-letter modifiers, are supported).  The default value is:

(("h" . 60)
 ("d" . 480) ; 8 hours
 ("w" . 2400) ; five days
 ("m" . 9600) ; 4 weeks
 ("y" . 96000)) ; 40 weeks

But you can change this.

Old effort strings (HH:MM) are still interpreted correctly.  See
the docstrings of `org-effort-durations' and
`org-duration-string-to-minutes' for more details.

>From a0e24b14755eb4087d9c47bb4eea11eb9151efcf Mon Sep 17 00:00:00 2001
From: Lawrence Mitchell <wence@gmx.li>
Date: Fri, 18 Feb 2011 11:01:46 +0000
Subject: [PATCH] Allow human-readable effort durations
To: emacs-orgmode@gnu.org

* lisp/org.el (org-effort-durations): New variable.
* lisp/org.el (org-duration-string-to-minutes): New function.
* lisp/org-agenda.el (org-agenda-filter-effort-form)
(org-format-agenda-item): Use it.
* lisp/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-modify-effort-estimate, org-clock-get-clock-string): Use it.

Specifying large effort durations in hours and minutes is difficult.
Is 130:25 more than two weeks effort?  More than three?  This patch
allows specification of an effort duration as a friendly string.  For
example 2w 5d is two weeks and five days of effort.  Existing H:MM
entries will still be recognised correctly.
2011-03-06 18:27:14 +01:00
Reiner Steib 3c19ab2092 * org-clock.el (org-clock-display): docstring fiw.
* org-clock.el (org-clock-display): tell to use
`org-clock-remove-overlays' to remove the display.
2011-02-26 16:29:59 +01:00
Nicolas Goaziou 97de64cfc3 org-clock: take full adjacent list when wraping clocks into a drawer
* lisp/org-clock.el (org-clock-find-position): if a list was adjacent
  to some clocks and a drawer was going to be created, only the first
  element of the list would make it into the drawer.
2011-02-25 18:50:29 +01:00
Bastien Guerry 93a8fc9849 Fix bug in org-clock-report.
* org-clock.el (org-clocktable-write-default): Bugfix: falls
back on `org-export-default-language' when no :lang parameter
is set.

Also fix various typo in comments.
2011-02-22 16:24:15 +01:00
Bastien Guerry 17351b924f org-clock.el: require 'org-exp to set `org-export-default-language'.
Thanks to Matt Lundin for reporting this.
2011-02-17 17:38:57 +01:00
Bastien Guerry 4db5a1edcf `org-clock-clocktable-language-setup': added spanish translation.
Thanks to Juan Pechiar for providing the translation.
2011-02-16 00:48:05 +01:00
Bastien Guerry 0382a62303 `org-clock-clocktable-language-setup': Fix translation. 2011-02-15 18:27:36 +01:00
Niels Giesen 5f7c880c4d `org-clock-clocktable-language-setup': add dutch strings.
* lisp/org-clock.el (org-clock-clocktable-language-setup): Add list of
dutch strings.
2011-02-14 22:02:45 +01:00
Bastien Guerry 9b23f082ea lisp/org-clock.el: allow to set the language through a new :lang parameter.
* org-clock.el (org-clock-clocktable-language-setup): New
custom variable.
(org-clocktable-defaults): Set the default language.
(org-clocktable-write-default): Use the new variable.
2011-02-13 13:57:06 +01:00
Julien Danjou 84d7165d74 org: remove org-invisible-p
I just found a left over in org-list.el. :)

Updated patch attached.

>From bf6c65a42e04d4753c58795442a479685bb5f318 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Wed, 26 Jan 2011 11:14:11 +0100
Subject: [PATCH] org: remove org-invisible-p

* org.el: Remove org-invisible-p: outline-invisible-p is
available in Emacs 22 and in recent XEmacs 21. Replace in
various files.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-26 18:26:46 +01:00
Benjamin Drieu 4cfea25f24 New hook for clock selection
* lisp/org-clock.el (org-clock-before-select-task-hook): New hook.
(org-clock-select-task): Run new hook.

Hi Org-moders,

I am often frustrated because I clock a lot of things and some of them
are repeated (i.e, coffee, read mails, etc.).  So when I want to clock
time I spend drinking coffee, the best I found was to search for a
headline matching "Coffee".  Or to tag frequent clocks and do some
agenda research on this tag.  Too long.  :-)

So here is a solution for this need : to add a shortcut property to
entries I would like to "bookmark" and insert matching entries in the
org-clock-select-task menu.  This can be done with :

* TODO Pause and drink coffee
  :PROPERTIES:
  :SHORTCUT: p
  :END:

then C-u C-c C-x C-i p.  And voil, "Pause and drink coffee" is clocked!

Here is a patch that adds a hook into org-clock-select-task and a module
that adds the shortcut feature.  I tried to be the least intrusive
possible, if this proves to be useful, the hook trick might not be
needed.

Benj

TINYCHANGE
2011-01-25 06:53:35 +01:00
Carsten Dominik ca733df0d4 Move the category property refresh to org-get-category where possible
* lisp/org.el (org-get-category): New optional argument FORCE-REFRESH.
Automatically refresh if the property is not there.
(org-entry-properties): Remove refresh - this is now done in
org-get-category.
* lisp/org-clock.el (org-clock-insert-selection-line): Let `org-get-category'
do the property refresh.
* lisp/org-archive.el (org-archive-subtree): Force a refresh of
category properties.

Based on a patch by Julien Danjou.
2011-01-03 13:12:42 +01:00
Carsten Dominik 55d664e6d3 Revert "Always return refreshed category"
This reverts commit f5bb1b7dbf.
2010-12-24 17:32:22 +01:00
Julien Danjou f5bb1b7dbf Always return refreshed category
* org-icalendar.el (org-print-icalendar-entries): Do not manually
  refresh categories.

* org-clock.el (org-clock-insert-selection-line): Do not manually
  refresh categories.

* org.el (org-get-category): Refresh categories if no category found.
(org-entry-properties): Do not manually refresh categories.
(org-prepare-agenda-buffers): Do not manually refresh categories.

It seems a very bad thing to call manually for a category refresh. It
seems better to try to refresh if we do not have a category.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-23 08:42:32 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Carsten Dominik 94c19c82b7 Make compiler happy
* lisp/org-clock.el (org-quarter-to-date): Define variables.
(org-clock-special-range): Defin variables.  Use org-floor*.
(org-clocktable-write-default): Define tcol.
* lisp/org-compat.el (org-floor*): New function.
* lisp/org-complete.el: Declare external functions and variables.
2010-12-03 10:20:41 +01:00
Carsten Dominik 61b2247631 Fix % formula in clock tables
* lisp/org-clock.el (org-clocktable-write-default): Fix the % formula.

Bug reported by Joost Helberg.
2010-12-03 09:50:38 +01:00
Carsten Dominik 12b153ed8b Implement clocktables for quarters
* lisp/org-clock.el (org-day-of-week): New function.
(org-quarter-to-date): New function.
(org-clock-special-range): Implement quarters.

Patch by Erwin Vrolijk
2010-11-29 11:27:47 +01:00
Achim Gratz c906a75e48 org-clock.el: fix regex to recognize indented clock tables
* lisp/org-clock.el (org-get-clocktable)
  previous patch incorrectly required whitespace in front of #+BEGIN: and #+END:

TINYCHANGE - This patch is in the public domain.
2010-11-20 12:26:02 +01:00
Achim Gratz fee2c2c8da org-clock.el: fix regex to recognize indented clock tables
* lisp/org-clock.el (org-get-clocktable):
(org-in-clocktable-p):
(org-clocktable-shift):
(org-clocktable-steps): Fix regexp to allow for indented clock tables

 #+BEGIN: and #+END: were expected only at the first column in some
   places.
 #BEGIN: and #END: were erroneously recognized inside normal lines in
   other instances.
 always allow whitespace after #BEGIN: and #END:, not just a single space

TINYCHANGE - This patch is in the public domain.
2010-11-16 10:22:57 +01:00
Bastien Guerry 0fd5ec58c6 org-clock.el: fix small typos and a small bug.
* org-clock.el (org-dblock-write:clocktable): fix double
reference to `link' in let construct.
(org-clock-clocktable-formatter): Fix typo in docstring.
(org-clocktable-write-default): Fix typo in docstring.
2010-11-11 17:43:52 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Carsten Dominik d96c998019 Fix issue with narrowing and links in clocktables
* lisp/org-clock.el (org-clocktable-write-default): Better handling of
narrowing.

Liang Wang writes:

> After I upgrade orgmode to latest version, clock report shows link
> text literally.
>
> For example,
>
>   [[file:/home/liang/gtd/todo.org::Task...
>
> Unfortunately, in this way, I can not see what this task actually is.
> I have to temporarily disable link in clock report.
2010-11-06 16:16:49 -04:00
Carsten Dominik 1197b73769 Minor fixes 2010-11-02 09:24:06 +01:00
Carsten Dominik 350b75be63 Rewrite of the clock table code
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.

* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
2010-11-02 08:47:23 +01:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Carsten Dominik fd7b3e9717 Revert "Fix bug with :maxlevel 0 in clock tables"
This reverts commit 5801fa6c63.
2010-10-28 08:09:46 +02:00
Carsten Dominik 8e12716f68 Fix bug when computing clock tables.
* lisp/org-clock.el (org-dblock-write:clocktable): Fix bug
when computing clock tables.

Ouch, bad bug.  Resetting the clock file time was always
happening in the same file, not in the different files
visited by the summer.
2010-10-26 17:17:15 +02:00
Carsten Dominik 5801fa6c63 Fix bug with :maxlevel 0 in clock tables
* lisp/org-clock.el (org-dblock-write:clocktable): Pass file minutes
up to caller even if no table is generated.

Rainer Stengele writes:

> 1. Without maxlevbel I get I get
>
> #+BEGIN: clocktable :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:07]
>
> | File              | L | Timestamp           | Headline       |     Time |        |        |
> |-------------------+---+---------------------+----------------+----------+--------+--------|
> |                   |   | Timestamp           | *Total time*   | *327:51* |        |        |
> ...
>
>
>
> with :maxlevel 0 I get
>
>
> #+BEGIN: clocktable :maxlevel 0 :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:11]
>
> | File | L | Timestamp | Headline     | Time     |
> |------+---+-----------+--------------+----------|
> |      |   | Timestamp | *Total time* | *232:17* |
> |------+---+-----------+--------------+----------|
> #+END:
>
>
> I would like to get the same results!
> Is ":maxlevel 0" intended to not include the sublevel clocks?
2010-10-26 13:27:20 +02:00
Bernt Hansen 344785bd8c Fix dangling clocks created by org-clock-out-hook clocking in again
This is a fixup patch to commit
17c71a40c6.  The org-clock-clocking-in
variable needs to be set when we are clocking out - in case the clock
out hook clocks-in again.  This fixes a bug that creates dangling
clock entries.
2010-10-03 11:47:15 -04:00
Bernt Hansen 17c71a40c6 Revert "Update modeline with effort and task name on re-clock-in"
This reverts commit 4a4fbf1b8c.

Clocking in the currently clocking task was leaving open clock entries
which is incorrect.  Updating the modeline is less important than
keeping correct clocking data.
2010-10-03 17:27:39 +02:00
David Maus 82b7d0bf07 Properly declare function to silence byte compiler
* org-clock.el (notifications-notify): Properly declare function to
silence byte compiler.
2010-09-07 20:03:30 +02:00
Bastien Guerry e13843ef65 Keep byte compiler happy. 2010-09-05 22:59:07 +02:00
Bastien Guerry fea907285c org-show-notification: use notifications.el when available.
notifications.el is a new package from Julien Danjou, available
in Emacs 24.1.  From etc/NEWS:

,----
| ** notifications.el provides an implementation of the Desktop
| Notifications API.  It requires D-Bus for communication.
`----
2010-09-02 23:51:22 +02:00
Manish Sharma 2cf6136523 Allow "#" and "%" in tags
Patch largely from Manish, missing points added by Carsten
2010-08-31 08:25:20 +02:00
Magnus Henoch b2861749d0 Fix :step day for agenda clockreport
I just tried adding :step day to
org-agenda-clockreport-parameter-plist, but then hitting R in the
agenda caused a crash, since org-clocktable-steps expects ts and te to
be strings, though in fact they are Gregorian day numbers.

This patch fixes the problem for me.  It's quite ugly, so I don't
expect it to be committed in its current form :) but I hope it serves
as inspiration for someone to figure out the right way to solve this.

* lisp/org-clock.el (org-clocktable-steps): Allow ts and te to be
day numbers.

TINYCHANGE
2010-08-27 16:27:38 +02:00
Bastien Guerry 5b8e10aaed Bugfix in org-clock-set-current.
Don't try to get the filename as it break `org-clock-set-current' when
trying to clock in from an indirect capture buffer.
2010-08-13 10:36:16 +02:00
Bastien Guerry a7a842457d Rebind org-agenda-clock-goto to `J' in the agenda.
* org-agenda.el (org-agenda-clock-goto): Use `\C-c\C-x\C-j' for
`org-clock-goto' and `J' for `org-agenda-clock-goto'.  If the heading
currently clocked in is not listed in the agenda, display this entry
in another buffer.  If there is no running clock, display a help
message.

* org-clock.el (org-clock-set-current): append the filename after the
heading.
2010-08-11 16:10:14 +02:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Philip Rooke 254740cb9c Correct some docstrings
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
2010-07-15 19:04:38 +02:00
Carsten Dominik 1fc1dc389b Make sure the clock history only points to base buffers 2010-06-24 07:39:10 +02:00
Carsten Dominik b27c1c5113 Fix whitespace problems 2010-06-07 08:35:10 +02:00
Carsten Dominik 5b68cf4c4f Allow to skip steps in clock reports that have zero time
* 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.
2010-05-22 08:18:20 +02:00
Bernt Hansen 1405953456 Set `org-clock-clocking-in' to t before `org-clock-out' 2010-05-20 18:15:03 -04:00
Carsten Dominik 2daea07630 Fix Bernt's previous patch 2010-05-17 13:56:17 +02:00
Carsten Dominik 696c2bf869 Add running clock only to report if time scope is right
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.
2010-05-17 11:36:09 +02:00
John Wiegley 99afb931b2 (org-resolve-clocks): Changed meaning of an argument 2010-05-16 22:12:14 +02:00
John Wiegley 3128e93340 Discovered clocks were not matching up with active clock 2010-05-16 22:11:59 +02:00
John Wiegley 6a360dbf4a Enhanced functionality of the clock resolver
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.
2010-05-16 22:11:45 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik 7389ecea03 Fix permissions 2010-05-01 21:57:50 +02:00
Carsten Dominik 110b175ef9 Remove (debug) 2010-05-01 06:35:23 +02:00
Carsten Dominik 23a1f40e3a Fix more typos 2010-05-01 06:30:02 +02:00
Carsten Dominik 5faad3ce87 Make sure clock mode line display is removed when there is not clock
Patch by Sebastian Rose.
2010-04-26 00:02:49 +02:00
Carsten Dominik c59da3a3dd Add tags matching to clock tables
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
2010-04-23 21:24:19 +02:00
Carsten Dominik e0ca9a5bdf More work on simplifying compatibility code 2010-04-21 09:18:12 +02:00
Bastien Guerry e60353004c Modify `org-clock-set-current' to just return the headline itself, strip
the TODO keyword, the priority cookie and the tags.
2010-04-19 12:57:34 +02:00
Carsten Dominik bb0ef787b7 Require calendar already on top level in org.el 2010-04-18 16:50:13 +02:00
Carsten Dominik b934169526 Get rid of some compiler warnings 2010-04-18 16:49:58 +02:00
Carsten Dominik f45e6a28b1 Use the normal overlay API, not Org's one 2010-04-18 16:49:58 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Carsten Dominik 6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00
Carsten Dominik a589c7a22e Release 6.35f 2010-04-08 10:36:32 +02:00
Carsten Dominik 50e5924d8a Release 6.35e 2010-04-07 16:33:52 +02:00
Carsten Dominik f722763f8a Release 6.35d 2010-04-07 16:26:42 +02:00
Carsten Dominik d65ed03be6 Update copyright notices and fix wrong version tags 2010-04-07 16:26:10 +02:00
Carsten Dominik cafbe1d038 Release 6.35c 2010-04-07 08:58:25 +02:00
Carsten Dominik b213c0f31e Release 6.35b 2010-04-07 07:54:14 +02:00
Carsten Dominik 08d0d2fa20 Release 6.35 2010-04-06 09:16:36 +02:00
Carsten Dominik 8fdf80bb5b Fix whitespace and compiler wanings 2010-04-01 13:11:54 +02:00
Bernt Hansen d21b9155eb Typo: left-over -> leftover
Since this is not an exposed variable we can rename it so that it is spelled
correctly.
2010-03-28 22:10:24 -04:00
Bernt Hansen c7bc245ef5 Reveal after goto
Occasionally when jumping to the last task we end up inside
a folded region.  This just reveals the headline to make
editing easier.
2010-03-28 22:10:24 -04:00
Carsten Dominik a5ebc8d3ae Refactor some functions in clocking
Patch by Bernt Hansen
2010-03-09 17:10:15 +01:00
Carsten Dominik 93c721fabf Clock: Allow to add the current clock when preparing a report
This is dependent on the new variable
`org-clock-report-include-clocking-task', default nil.

Patch by Bernt Hansen.
2010-02-27 13:21:31 +01:00
Bastien Guerry 30ffaca5aa Added org-clock-current-task which stores the last clocked in entry.
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.
2010-02-24 16:28:43 +01:00
Bernt Hansen 33740c5833 Fix clock-in with effort and percent complete cookie
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.
2010-02-20 18:06:19 +01:00
Carsten Dominik 1bb65e22d9 Format links in the clock line
Patch by Kiwon Um.
2010-01-26 23:01:59 +01:00
Carsten Dominik 3a2c616655 Fix typos 2010-01-26 22:39:21 +01:00
Carsten Dominik 7f0995dcab Show clock overruns in mode line
Patch by Richard Riley.
2010-01-23 10:41:13 +01:00
Carsten Dominik 2e53d9b137 Remove comma after means in many docstrings
Stephen Eglen says these commas should not be there.
2010-01-21 16:15:40 +01:00
Carsten Dominik 06e74afce3 Version number to 6.34trans 2010-01-20 10:13:21 +01:00
Carsten Dominik a1709ba641 Release 6.34c 2010-01-18 00:10:11 +01:00
Carsten Dominik d2dc39a67b Automatically clock out when switching to specified state
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.
2010-01-15 18:21:36 +01:00
Carsten Dominik 2f2f9441d4 Release 6.34b 2010-01-14 23:06:55 +01:00
Carsten Dominik c077142241 Release 6.34a 2010-01-12 08:53:44 +01:00
Carsten Dominik 288c724335 Release 6.34 2010-01-10 10:57:53 +01:00
Carsten Dominik 275b6627a6 Release 3.34 2010-01-10 10:54:52 +01:00
Bernt Hansen 4a4fbf1b8c Update modeline with effort and task name on re-clock-in
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.
2009-12-30 15:25:57 -05:00
Carsten Dominik 29d9457200 Stop generating superfluous clock entries
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.
2009-12-30 15:25:57 -05:00
John Wiegley c5146a8972 Fixes to the way org-idle-time is handled
A let needed to be let*, and current-idle-time always returns nil on
some systems, so for darwin and x11, those idle time values are always
preferred.
2009-12-25 18:02:48 -05:00
Carsten Dominik a66c1a3609 Amend previous patch 2009-12-03 13:45:12 +01:00
Carsten Dominik 16750683ea Solve some XEmacs incompatibilities
Reports and some patches by Richard Klinda
2009-12-03 09:17:30 +01:00
Carsten Dominik b48dd133dc Revert "Stop generating superfluous clock entries"
This reverts commit 364054fa77.

Conflicts:

	lisp/ChangeLog
2009-11-27 23:28:04 +01:00
Carsten Dominik 661a8855d3 Revert "Fix clocking to allow again selection of a task in the history"
This reverts commit c59c2b791d.
2009-11-27 23:25:47 +01:00
Carsten Dominik 5e41177c2e Revert "Revert "Fix clocking to allow again selection of a task in the history""
This reverts commit 702708463f.
2009-11-27 23:23:16 +01:00
Carsten Dominik 702708463f Revert "Fix clocking to allow again selection of a task in the history"
This reverts commit c59c2b791d.
2009-11-27 23:22:23 +01:00
Carsten Dominik c59c2b791d Fix clocking to allow again selection of a task in the history 2009-11-27 16:26:11 +01:00
Carsten Dominik 364054fa77 Stop generating superfluous clock entries
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
2009-11-27 08:09:10 +01:00
Carsten Dominik 50645b5699 Fix bug when old clock task list contains bad pointers 2009-11-23 21:04:31 +01:00
Carsten Dominik 62a7301a5e Push release number to 6.33trans 2009-11-20 20:20:31 +01:00
Carsten Dominik 24061fddd1 Release 6.33f 2009-11-20 15:15:05 +01:00
Carsten Dominik 37e9b1c51f Release 6.33e 2009-11-20 13:58:31 +01:00
Carsten Dominik 24a49967f1 Release 6.33d 2009-11-20 12:34:50 +01:00
Carsten Dominik c7371cc7fe Push version number to 6.33trans 2009-11-15 09:46:43 +01:00
Carsten Dominik 6bc6379dfe Release 6.33c 2009-11-15 08:00:52 +01:00
Carsten Dominik 6c977c41c3 Release 6.33b 2009-11-14 16:25:31 +01:00
Carsten Dominik b8a6721a68 Release 6.33a 2009-11-13 23:22:18 +01:00
Carsten Dominik 5ca6635993 Push version number to 6.33a 2009-11-13 22:54:22 +01:00
John Wiegley 1affd3bbb6 Check whether org-clock-into-string is a string 2009-11-13 05:08:55 -05:00
Carsten Dominik 82ee0cc583 Release 6.33 2009-11-13 07:10:51 +01:00
Bernt Hansen 0042080e4c Fix spelling and grammar 2009-11-12 07:39:29 -05:00
Carsten Dominik 9f6102f9e7 Fix clock issues related to with-current-buffer
Patch by Bernt Hansen
2009-11-09 22:58:34 +01:00
Carsten Dominik 471c244866 Handle notifications with percent characters
`message' accepts a printf format string, and that can go wrong if you
want to show a string, but the string contains a percent character!
2009-11-07 00:43:27 +01:00
Carsten Dominik 7c0a16e256 Use with-current-buffer instead of save-excursion set-buffer where possible
Patch by Stefan Monnier
2009-11-05 22:59:18 +01:00
John Wiegley cec499dc6f Fix to idle-time notice in the minibuffer 2009-11-05 02:07:41 -05:00
Carsten Dominik 5a24f6c9d2 Keep compiler happy 2009-11-03 10:35:05 +01:00
Carsten Dominik 5b65dc2bdf Expand file name in org-clock-sound before using it 2009-11-02 22:07:08 +01:00
John Wiegley 5da5814efa Fixed display of idle time in read-char prompt 2009-10-31 18:12:08 -04:00
Carsten Dominik 58562167b4 Version number to 6.32trans 2009-10-27 18:23:19 +01:00
Carsten Dominik e0949896f7 Release 6.32b 2009-10-27 18:22:28 +01:00
Carsten Dominik 037b685d50 Push version number to 6.32trans 2009-10-27 09:25:30 +01:00
Carsten Dominik fcd2ef541f Release 6.32 2009-10-26 08:57:21 +01:00
Carsten Dominik 2fa2cbaa2c Keep compiler happy and fix issue with musing the mobile agenda
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.
2009-10-26 07:59:53 +01:00
John Wiegley 511bcc9e81 org-clock-auto-clock-resolution is now a tri-state 2009-10-25 18:19:04 -04:00
Carsten Dominik 4c3bc6482d Only save clock stuff if it has been loaded as well
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:
2009-10-25 07:48:05 +01:00
Carsten Dominik f74f8ca2ab Fix problems in the interaction of John's and James' clock restore code
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).
2009-10-24 15:02:01 +02:00
John Wiegley d3a779b748 Allow display of fractional times with C-c C-x C-d 2009-10-23 22:23:32 -04:00
Carsten Dominik 9072f54582 Make updating the mibileorg.org checksum safe 2009-10-22 16:30:00 +02:00
James TD Smith 0410d6460c Add an X11 equivalent to org-mac-idle-seconds.
This needs a small C program (in UTILITIES/x11idle.c) to work.
2009-10-22 15:09:34 +02:00
John Wiegley c248cc69b2 Fix to the way idle time is reported in prompts 2009-10-22 06:22:36 -04:00
John Wiegley a0acb478a9 Changed when clock auto-resolution comes into play
Clocking in on another task while an active clock is running no longer
invokes the auto-resolution logic.
2009-10-22 05:00:13 -04:00
John Wiegley 9b36ab0ca9 Fixed an incorrect variable reference 2009-10-20 17:19:00 -04:00
Carsten Dominik 79031ab5ab Keep compiler happy 2009-10-20 13:24:55 +02:00
John Wiegley 4d3960cd11 Add var to disable clock resolution on clock in
(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.
2009-10-19 17:07:48 -04:00
John Wiegley abfc6babca Added feature for resolving clocks due to idleness
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.
2009-10-18 23:43:43 -04:00
Carsten Dominik a45e7d88c7 Use `org-float-time' instead of `time-to-seconds' in John's patch 2009-10-17 17:55:59 +02:00
John Wiegley 8490a6c1d5 Added `M-x org-resolve-clocks' command
(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.
2009-10-17 05:09:40 -04:00
John Wiegley d3f994e01b Added functions for determining the user's idle time
(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).
2009-10-17 03:51:32 -04:00
John Wiegley defe6c3838 Added several new utility functions to org-clock
(org-find-open-clocks): New function that returns a list of all open
clocks in the given FILE.  Note that each clock it returns is a cons
cell of the format (MARKER . START-TIME).  This "clock" value is used by
several of the new clock module utility functions.

(org-is-active-clock): New inline function which tests whether the given
clock value is the same as the currently active clock.  Returns non-nil
if this is the case.

(org-with-clock-position): New macro that evaluates FORMS with point in
the buffer and at the position of the given clock.  Changes to the
current clock are global.

(org-with-clock): New macro that evaluates FORMS with point in the
buffer and at the position of the given clock.  However, changes to the
current clock are local and have no effect on the user's active clock.
This allows, for example, far any clock to be cancelled without
cancelling the active clock.

(org-clock-clock-in): New inline function that switches the active clock
to the given clock.  If either the argument RESUME, or the global
`org-clock-in-resume', are non-nil, it will resume a clock that was
previously left open.

(org-clock-clock-out): New inline function that clocks out the given
clock value without affecting the currently active clock.

(org-clock-clock-cancel): New inline function that cancels the given
clock value without affecting the currently active clock.
2009-10-17 03:51:32 -04:00
John Wiegley cc039d9016 Add new parameter to the `org-clock-out' command
(org-clock-out): Accept new third parameter `at-time', which permits a
clock to be clocked out at a specific time.  Note that no attempt is
made to verify that the clock out time is later than the clock in time.
2009-10-17 03:51:32 -04:00
John Wiegley b6594a03df Prevent mode-line timers from being duplicated
(org-clock-in): Before creating `org-clock-mode-line-timer', check to
make sure an older timer is not currently running.
2009-10-17 03:51:32 -04:00
Carsten Dominik 785da1420a Remove some duplicate words from docstrings
Patch by Juanma Barranquero.
2009-10-04 08:36:18 +02:00
Carsten Dominik edc5e73ba9 Fix that bug again 2009-10-02 10:59:37 +02:00
Carsten Dominik d82366ee01 Fix bug in org-clock.el 2009-10-02 10:58:12 +02:00
Carsten Dominik 3ce0a4a9e2 Fix position error when clocking in while buffer is narrowed
Bernt Hansen writes:

> If you narrow to subtree when there is a following task the narrowed
> buffer has a blank line at the end.  If you are on this line and
> clock-in it starts the clock for the _following_ task (outside the
> narrowed subtree) and not the task you are looking at.
>
> I stumbled across this today because the following task was already
> over the estimated limit when I clocked it in - which triggered my
> alarm sound.
>
> ,----[ test.org ]
> | #+STARTUP:
> | * TODO One
> | * TODO Two
> `----
>
> ,----[ minimal.emacs ]
> | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
> | (add-to-list 'auto-mode-alist
> |              '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
> | (require 'org-install)
> |
> | (global-set-key "\C-cl" 'org-store-link)
> | (global-set-key "\C-ca" 'org-agenda)
> | (global-set-key "\C-cb" 'org-iswitchb)
> `----
>
> Key sequence to reproduce:
>
> $ emacs -q -l minimal.emacs test.org
>
> | Key                           | Notes                         |
> |-------------------------------+-------------------------------|
> | C-n                           | Go to first task '* TODO One' |
> | M-x org-narrow-to-subtree RET | Narrow to subtree             |
> | C-n                           | Move to last blank line       |
> | C-c C-x C-i                   | Clock in (next) task          |
> |-------------------------------+-------------------------------|
>
> -Bernt
>
> Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
> of 2008-11-09 on raven, modified by Debian
> Package: Org-mode version 6.31trans (release_6.31.8.g7485)
2009-10-02 08:40:02 +02:00
Carsten Dominik 8d2cbde0c9 Fix typos 2009-10-02 08:30:18 +02:00
Carsten Dominik 4020e2a8c4 Fix bug in canceling clocks
Peter Frings writes:

> Clocking in on any task (C-c C-x C-i) and cancelling afterwards (C-c C-x
> C-x) results in the following backtrace:
> ,----
> | Debugger entered--Lisp error: (wrong-type-argument markerp org-clock-marker)
> |   move-marker(org-clock-marker nil)
> |   org-clock-cancel()
> |   call-interactively(org-clock-cancel nil nil)
> `----
> Culprit are two erroneous quotes in front of org-clock-marker in org-clock-el. The patch (output
> of git diff -u on a clean checkout) fixes the problem:
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index e279898..91a4bcb 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -818,8 +818,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
>     (set-buffer (marker-buffer org-clock-marker))
>     (goto-char org-clock-marker)
>     (delete-region (1- (point-at-bol)) (point-at-eol)))
> -  (move-marker 'org-clock-marker nil)
> -  (move-marker 'org-clock-hd-marker nil)
> +  (move-marker org-clock-marker nil)
> +  (move-marker org-clock-hd-marker nil)
>   (setq global-mode-string
> 	(delq 'org-mode-line-string global-mode-string))
>   (force-mode-line-update)
2009-10-01 20:01:01 +02:00
Carsten Dominik 6b0a251eea Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
Carsten Dominik 1b37d5e07c Release 6.31a 2009-10-01 09:13:58 +02:00
Carsten Dominik c11e0b44ae Release 6.31 2009-09-30 16:03:17 +02:00
Carsten Dominik cbafbe5f08 Make default clocktable properties configurable
Jeff Kowalczyk writes:

> I frequently use clocktables, and always use scope: subtree. The
> default scope is file.
>
> If it doesn't exist already (I didn't find it with grep), an org
> customization variable for this preference would be very helpful.
2009-09-17 07:35:23 +01:00
Carsten Dominik 291a6db848 Release number back to 6.30trans 2009-09-04 10:39:01 +02:00
Carsten Dominik 12ab55ca43 Release 6.30d 2009-09-03 13:53:46 +02:00
Carsten Dominik adfa87282d Push version number to 6.30trans 2009-09-03 08:10:36 +02:00
Carsten Dominik 63e1714288 Release 6.30c 2009-09-02 14:40:56 +02:00
Carsten Dominik 1152565013 Avoid using time-to-seconds 2009-09-02 14:37:47 +02:00
Carsten Dominik fc332703bf Release 6.30b 2009-09-02 11:33:10 +02:00
Carsten Dominik 1d04b205e6 Release 6.30a 2009-09-02 09:00:23 +02:00
Carsten Dominik db70cdb13b Release 6.30 2009-09-01 06:09:23 +02:00
Carsten Dominik 6bddc14c20 New effort-setting commands
To set the effort property without going to column view.
2009-08-29 20:21:15 +02:00
Bastien Guerry c34ca53f2f org-notify: bugfix by Bernt Hansen. 2009-08-26 11:28:25 +08:00
Bastien Guerry 754694dd4b Use org-notify to show a notification and possibly play a sound. 2009-08-24 02:44:29 +08:00
Carsten Dominik 0af5133334 Mark running clock in the agenda.
If the entry currently being clocked is present in the agenda, mark it.
2009-08-07 11:00:16 +02:00
Carsten Dominik bfdd3d3fd3 Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
Carsten Dominik 0864163024 Release 6.29c 2009-08-06 06:26:23 +02:00
Carsten Dominik d6b37ddbea Release 6.29b 2009-08-05 12:34:30 +02:00
Carsten Dominik 1c25048e48 Release 6.29a 2009-08-04 23:54:22 +02:00
Carsten Dominik d67a9be8a2 Release 6.29 2009-08-04 23:06:39 +02:00
Carsten Dominik 2eecb4c43c Fix white-space errors 2009-08-03 17:30:30 +02:00
Bastien Guerry 1a79ec6e31 Bugfix: recognize timestamps with an abbreviated format for days.
Emacs recently (when?) changed the abbreviated format for days.
The clock was confused when trying to mach this format.  This patch
by Nicolas Goaziou fixes it.
2009-07-29 13:44:52 +08:00
Bastien Guerry 7a1a62d2f2 Udate the docstring of org-show-notification. 2009-07-27 01:11:51 +08:00
Bastien Guerry 402448cb4c Code cleanup. 2009-07-26 21:00:52 +08:00
Bastien Guerry aed038294a Fix typo. 2009-07-26 20:59:49 +08:00
Bastien Guerry 575192b4a4 Code cleanup. 2009-07-26 20:58:35 +08:00
Bastien Guerry 593022a66e Add a new :timestamp option for clock reports.
Using :timetamp t as an option in a clock report now allows
insertion of the timestamp for the clocked entry.  Timestamps
are searched for in this order: SCHEDULING, TIMESTAMP, DEADLINE
and TIMESTAMP_IA.
2009-07-26 06:05:09 +08:00
Bastien Guerry 12a9381803 Add and use a new option: org-show-notification-handler
This option lets the user customize the notification mechanism.
For example, she might want to use todochiku.el.

This option defaults to nil, hence doesn't change the previous
behavior: if the program notify-send is installed on the system,
use it, and falls back on using (message [notification]) if not.
2009-07-23 17:33:52 +02:00
Bastien Guerry fa7e23ec39 Add org-clock-in-prepare-hook. Doc update.
This hook is called in org-clock-in earlier than the existing
org-clock-in-hook.  This is useful for functions that need to
modify the Effort property, for example.
2009-07-17 09:02:56 +02:00
Carsten Dominik 7087902788 Fix bug in org-narrow-to-subtree, which could lead to clock errors
Bernt Hansen writes:

> I have a monthly repeated task (Archive tasks) that has lots of
> old clock time on it currently but has never been marked DONE
> since the creation of the property LAST_REPEAT_TIME.  If this
> task is clocking when Emacs exits and you restart emacs and
> answer Yes to continue the clock - the modeline has the total
> time for the parent task (151:04 instead of the total time for
> this task (5:04).  If I clock the task in again the modeline is
> correct.
2009-07-08 14:29:18 +02:00
Carsten Dominik e16c5b7b64 Fix typos 2009-07-06 22:30:39 +02:00
Carsten Dominik f648323253 Push version number to 6.28trans 2009-06-26 17:26:50 +02:00
Carsten Dominik cd4e52a5ef Release 6.28d 2009-06-26 17:23:27 +02:00
Carsten Dominik 00ddc4dba7 Release 6.28c 2009-06-26 09:27:50 +02:00
Carsten Dominik e7ffcc1d4d Release 6.28b 2009-06-25 09:01:20 +02:00
Carsten Dominik 7906427aa6 Release 6.28 2009-06-25 08:59:59 +02:00
Carsten Dominik 03efd877bc Clock: Add more hooks
This commit add four hooks to the clocking code.

Patch by Benjamin Andresen.
2009-06-21 17:26:52 +02:00
Carsten Dominik 7c3aba2d3a Magnus Henoch writes:
>  I just discovered that org-clock-in displays the clocked-in task
>  in the mode line, so that I can click it and go back to the Org
>  file, which I really like.  I changed it to switch to the window
>  in which I click, by prepending "@" to the interactive spec of
>  org-clock-goto.
2009-06-19 14:03:34 +02:00
Carsten Dominik a5f080361a Clock: Manipulating effort strings, and a mode line menu
Clicking on the clock in the mode line now pops up a menu with
clocking options.

A new command `C-c C-x C-e' allows to set or change the effort
estimate of the task currently being clocked.  This is mainly useful
when using an alert notification when the task should be finished.

Based on a patch by Konstantin Antipin.
2009-06-17 07:40:22 +02:00
Carsten Dominik 951125da8d intermediate 2009-06-16 09:42:05 +02:00
Bernt Hansen fab7da2d7c Fix typo in org-clock-get-clocked-time 2009-06-09 23:02:09 +02:00
Bernt Hansen e0f9c00f10 Do not issue the 'task should be finished by now' message if the clock is stopped
This patch prevents the org-clock-sound notification and the

   "Task'BLAH' should be finished by now."

message when the termination time is reached and the clock is not
running.

Before this patch spurious notifications and messages were generated when
clocking in a task with estimated effort time remaining.  After clocking
out the task the remaining minutes would tick by and then the sound
and message that the task should be finished were generated - even though
you are not working on it anymore.
2009-06-09 23:02:01 +02:00
Bernt Hansen 7f9e53d6b1 Initialize org-clock-notification-was-shown on clock-in
This makes org-clock-sound a little more well-behaved.  The clock
sound was only being issued if you were already clocking a task that
was under its limit, and changed to clocking something else.  Now each
time you clock in a new task it checks the estimated effort limit and
issues the org-clock-sound if the limit is exceeded.

This patch issues the org-clock-sound whenever you clock in a task
that is already over its estimated effort amount.  This allows you to
use the estimated effort as a limit for the amount of time to spend on
a task.  Each time you clock in the task you'll be notified that you
are over the limit.  This is great for tasks where you want to limit
the amount of time spent (per day, since last repeat) and is a
reminder to go work on something else instead.
2009-06-09 23:01:34 +02:00
Carsten Dominik 379b24cc63 Fix whitespace issues 2009-06-08 08:00:46 +02:00
Carsten Dominik 855f85b46f New face for clock in mode line. 2009-06-06 08:13:40 +02:00
Carsten Dominik 90c38a0045 Clock: Improve messages 2009-06-02 17:10:23 +02:00
Carsten Dominik a5dc9456dd New option `org-clock-out-switch-to-state'.
Can be used to change the TODO state when clocking out.
2009-06-02 17:01:11 +02:00
Carsten Dominik 8a2247454c Bug fix 2009-06-02 16:36:16 +02:00
Carsten Dominik 1db461321a Keep compiler happy 2009-06-02 14:49:38 +02:00
Carsten Dominik ee4bcda0e9 Clock: More control about what time is shown in mode line while clocking
This commit changes which time is shown in the mode line while
clocking.  Normally this will now be the total time ever clocked on
this task and its children.

However, when the task is a repeating one, only the time since the
last reset of the task will be shown.  The time of the last reset is
now recorded in a LAST_REPEAT property.

You can also set the CLOCK_MODELINE_TOTAL property to the value
"current" to only show the current clocking instance.  Or it may be
the value "today", to only add up the time spent today on this task.
Other possible values are "repeat", "all", or "auto".

Finally, you can set your default for this property with
`org-clock-modeline-total'.
2009-06-02 13:47:50 +02:00
Carsten Dominik 5ce1c5708f Clocking: Fix bug in the new cocking code
The cursor could move while collecting the total time for the current
subtree.
2009-05-28 19:49:11 +02:00
Carsten Dominik 19748886eb Tables: Allow #+TBLFM to be indented 2009-05-28 17:44:12 +02:00
Carsten Dominik 2b6a3ac71d Clock notification: Cleaning up some issues 2009-05-28 13:24:23 +02:00
krick e17fdc3aa9 Merge branch 'origin' into clock-effort-notify 2009-05-28 11:17:13 +02:00
krick 59c6574c05 org-clock-sound could be
* nil. No sound played.
* any string, that is not a file. Make a beep
* file name. Emacs tries to play it with aplay, if available.
  If not, use standard emacs play-sound-file function.
2009-05-28 01:10:27 +02:00
krick 8c3ffc6259 Remove setq of the org-clock-sound here :) 2009-05-27 08:49:51 +02:00
krick 3c2099c29b Show total clocked time in mode line.
(Instead time since last start)
2009-05-26 23:30:38 +02:00
Carsten Dominik ae7b8f6b12 Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
krick 7c2930e96b In case we set effort estimate on the currently clocked item,
show notification when time is up.
 * Linux only: If libnotify is used - the standard notification
   system in linux, then show notification with it.
   Note: Additional package libnotify-bin should be installed.
Additionally, use beep if variable org-clock-sound is set.
 * If aplay (alsa player) is available, interpret org-clock-sound as
   path to the file, which should be played.
2009-05-25 22:01:34 +02:00
krick d4b85109dd Show estimated effort in the mode-line if it is set.
* Set org-clock-effort variable in org-clock-in function.
* If org-clock-effort is not nil, show estimated effort in the mode-line.
2009-05-25 16:54:03 +02:00
Carsten Dominik 0421dead4b Release 6.27a 2009-05-25 16:04:45 +02:00
Carsten Dominik b681c7b26e Release 6.27 2009-05-23 08:22:04 +02:00
Carsten Dominik 88673a8724 Clock history: Second try to get fontification right. 2009-05-05 14:44:05 +02:00
Carsten Dominik e1f6e949ed Clock history: Present all tasks fontified
Bernt Hansen requested this.
2009-05-05 10:23:47 +02:00
Carsten Dominik 69e6d249aa Push version number to 6.26trans 2009-04-22 09:08:13 +02:00
Carsten Dominik 73854f435d Release 6.26d 2009-04-22 06:42:17 +02:00
Carsten Dominik 38b5a9e704 Clock: New variable to allow finding a recent task with `org-clock-goto' 2009-04-22 06:41:15 +02:00
Carsten Dominik 595e9603ac Release 6.26c 2009-04-21 20:26:27 +02:00
Carsten Dominik 654e629ed9 Clock: Make `C-c C-x C-j' jump to most recently clocked task as well.
If there is no running clock, this command will go to the most
recently clocked task.
2009-04-21 20:25:30 +02:00
Carsten Dominik e0cd12716a Release 6.26b 2009-04-21 10:21:36 +02:00
Bernt Hansen a04237d4f4 Revert "Jump to selected clock task when starting the clock"
This reverts commit 61dfa0c67f.

This wasn't such a great idea after all.  There is one case where
this is really annoying - if you are in the middle of displaying
an agenda view with lots of filters active and you change what you
are clocking it jumps away and you lose the agenda view.

This one case makes hitting a dedicated function key that runs
org-clock-goto more desireable.
2009-04-21 06:10:30 +02:00
Carsten Dominik b8a5f1a7fc Release 6.26a 2009-04-19 22:31:36 +02:00
Carsten Dominik ba66d2c8ae Release 6.26 2009-04-19 08:38:49 +02:00
Bernt Hansen 61dfa0c67f Jump to selected clock task when starting the clock
Move the point to the selected task when clocking in using the clock
history.  I find I'm always going to the currently clocked task after
picking it off of the menu and this saves one small step.

This could be optionally controlled by a variable.
2009-04-16 06:02:13 +02:00
Carsten Dominik 08b81dbb1d Minor fix 2009-04-14 12:40:25 +02:00
Carsten Dominik 633e8cdd90 Clock: Fix bugs when resuming the clock.
Adam Elliot writes:

>  Automatically resuming the clock after an Emacs restart
>  fails under the following cases:
>
>  1. If org-log-states-order-reversed set to t (default), and
>     a state change line precedes the clock line to resume.
>     Error message is "Cannot restart clock because task does
>     not contain unfinished clock".
>
[...]
>  2. If org-log-states-order-reversed set to nil.  Error
>     message is the same.  Reason: point is placed *after*
>     last clock line and so fails looking-at test.
>

This commit fixes the problem, in a slightly different way
than Adam proposed.  Instead of trying to fix the old way to
find the position of the clock, we now simple search the
entry if there is an unfinished clock and go there.  Since
new clocks are added before older ones, this should be a
safe bet.
2009-04-14 09:50:05 +02:00
Carsten Dominik ef2ee3df5d Version number pushed to 6.25trans 2009-04-07 18:43:42 +02:00
Carsten Dominik eef47f820f Release 6.25d 2009-04-05 15:29:45 +02:00
Carsten Dominik e2eebc83a1 Release 6.25c 2009-04-05 08:45:39 +02:00
Carsten Dominik 5624263d97 Release 6.25b 2009-04-03 19:18:41 +02:00
Carsten Dominik 1426f8bcfd Release 6.25a 2009-04-02 18:24:52 +02:00
Carsten Dominik aeb5cb98d6 Release 6.25 2009-04-01 16:00:39 +02:00
Carsten Dominik 098cf35983 Clock: Clock out when done also in indirect buffers
Chris Randle writes:

>  I have one giant Org-mode file for everything. I frequently use
>  `C-c C-x b' to take the current node and show it in a new frame
>  with narrow subtree so that I can concentrate on just that region
>  of my file. Rather like hoist in GrandView, if anyone remembers
>  that.
>
>  My Org Manual (6.24b) says "The indirect buffer...will contain
>  the entire buffer, but will be narrowed to the current
>  tree. Editing the indirect buffer will also change the original
>  buffer, but without affecting visibility in that buffer.
>
>  I've noticed that, when working in the new frame, changing the
>  TODO state of any item within the frame to DONE (when it is the
>  currently clocked in item) does not stop the clock. Going back to
>  my main frame and doing the same thing there on the same item
>  does stop the clock.
>
>  I haven't altered `org-clock-out-when-done', and Emacs reports
>  its value as t.

This was caused by the fact that markers seem to point to the
base buffer always, so we need to check if the current buffer's
base buffer is equal to the marker buffer.
2009-03-23 21:02:23 +01:00
Carsten Dominik 76ac6dce68 Bugfix: Fix indentation problems
David Maus writes:

>  When I start to clock a headline (C-c C-x C-i) that does not have a
>  LOGBOOK drawer orgmode inserts one but removes the indentation of the
>  first line below the headline:
>
>  Example:
>
>  * TODO Do something
>   Do this, do that etc.
>
>  after C-c C-x C-i becomes
>
>  * TODO Do something
>   :LOGBOOK:
>   CLOCK: [2009-03-20 Fr 19:03]--[2009-03-20 Fr 19:03] =>  0:00
>   :END:
>  Do this, do that etc.

Fixed with this commit, a patch written by Peter Jones.
2009-03-21 18:24:51 +01:00
Carsten Dominik 722fc9a490 Version number to 6.24trans 2009-03-14 08:03:10 +01:00
Carsten Dominik c8b6a9cc60 Release 6.24c 2009-03-12 12:51:17 +01:00
Carsten Dominik 680d8cb440 Release 6.24b 2009-03-10 17:50:17 +01:00
Carsten Dominik 7e8a387184 Release 6.24a 2009-03-09 05:37:09 +01:00
Carsten Dominik 20828f3176 Release 6.24 2009-03-05 21:11:18 +01:00
Carsten Dominik 0850b14c8f Clocktable: Use inactive time stamps for stepwise table
Adam Elliott writes:

>  When run in day-step mode, the clocktable header line for each day's
>  table contains an active timestamp.  I figure it should be an inactive
>  timestamp, since otherwise I get a junk entry in the agenda each day
>  (whatever heading was previous to the clocktable).
>
>  I'm talking about the output from a spec such as the following:
>
>  #+BEGIN: clocktable :block thisweek :step day

This commit is the patch Adam sent in.
2009-03-05 16:11:57 +01:00
Carsten Dominik 721dae7dd5 Bugfix: Better indentation for new clock/logbook drawers 2009-03-02 06:41:29 +01:00