Commit Graph

603 Commits

Author SHA1 Message Date
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