Commit Graph

796 Commits

Author SHA1 Message Date
Nicolas Goaziou 3566a3eeee org-clock: Fix `org-clock-display' called with `C-u C-u C-u'
* lisp/org-clock.el (org-clock-display): Compute H and M when
  necessary.
2018-01-08 15:22:33 +01:00
Nicolas Goaziou 9c675b0727 org-clock: Small fixes
* lisp/org-clock.el (org-clock-display-default-range): Improve
  docstring.  Add :safe keyword.
(org-clock-display): Fix comparison function.
2018-01-08 14:59:53 +01:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05:00
Nicolas Goaziou 76ee7b7cdd org-clock: Allow CLOCK_MODELINE_TOTAL inheritance
* lisp/org-clock.el (org-clock-get-sum-start): Allow
  CLOCK_MODELINE_TOTAL inheritance.
2018-01-03 22:54:28 +01:00
Nicolas Goaziou bac8d25441 org-clock: Fix timezone in `org-clock-get-sum-start'
* lisp/org-clock.el (org-clock-get-sum-start): Remove timezone
  argument from `encode-time'.

Reported-by: Ihor Radchenko <ihor_radchenko@mymail.sutd.edu.sg>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00499.html>
2017-12-22 19:19:49 +01:00
Nicolas Goaziou 2faaacfeeb Revert the whole time zone mess
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-seconds): Remove optional ZONE argument.
(org-2ft):
(org-check-before-date):
(org-check-after-date):
(org-check-dates-range):
(org-parse-time-string):
* lisp/org-clock.el (org-clock-get-sum-start):
(org-clock-out):
(org-clock-timestamps-change):
(org-clock-sum):
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes): Apply change.
* testing/lisp/test-org-clock.el (org-test-clock-create-clock):
(test-org-clock/clocktable/scope):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Apply change.  Simplify tests to avoid daylight saving time issue.
2017-12-03 08:57:37 +01:00
Charles A. Roelli 18af0f88d7 Backport commit 98288ecaf from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Fix an issue when
compiling on macOS 10.6 with a western time zone (a continuation of
Bug#27736).

Further workaround for faulty localtime() under macOS 10.6
98288ecaffbc0947ec3193088172ea85ad5e42a5
Charles A. Roelli
Wed Nov 8 20:51:48 2017 +0100
2017-11-13 22:07:59 -05:00
Georgiy Tugai 07f939f419 org-clock: Fix clock report sometimes ignoring hours before :wstart
* lisp/org-clock (org-clocktable-steps): Fix weekly-step clock report
  ignoring hours between start of period and start of week, when start
  of period is on a day of week numerically less than start of week.

  Clock report now always inserts a "week" starting at the start of
  the period, if necessary; all following weeks start on the start of
  the week as expected.

TINYCHANGE
2017-10-08 10:53:39 +02:00
Charles A. Roelli 24ea1b136a Backport commit bd49b6f1b from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Only execute
'decode-time' on times later than year -2**31 under macOS 10.6.
See Bug#27706.

Workaround for faulty localtime() under macOS 10.6
bd49b6f1b39cffeaf6098bc7b0182552683b1c07
Charles A. Roelli
Sun Oct 1 19:07:22 2017 +0200
2017-10-01 20:46:11 -04:00
Nicolas Goaziou 4fdac06ef1 org-clock: Fix compilation error
Reported-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00623.html>
2017-09-29 22:01:29 +02:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00
Nicolas Goaziou 748bfee34a org-clock: Remove interactive from `org-clock-select-task'
* lisp/org-clock.el (org-clock-select-task): Remove `interactive'.

This function is not meant to be called interactively.  Use
`org-clock-goto' with a prefix argument instead.
2017-08-14 11:17:44 +02:00
Galen Menzel 3359e05e82 Implement `org-decode-time' for backward compatibility
* lisp/org-compat.el (org-decode-time): New function.
* lisp/org-clock.el (org-clock-get-sum-start): Use new function.

Emacs 24's `decode-time' doesn't accept two arguments.
2017-08-11 15:07:45 +02:00
Nicolas Goaziou 2bc39af847 Merge branch 'maint' 2017-08-07 13:30:19 +02:00
Nicolas Goaziou b561c8b7ef org-clock: Fix typo in last commit
* lisp/org-clock.el (org-clock-get-sum-start): Fix typo.
2017-08-07 13:29:52 +02:00
Nicolas Goaziou 5c1d9c53f0 Merge branch 'maint' 2017-08-07 13:27:39 +02:00
Nicolas Goaziou 43a1d5e920 org-clock: Fix `org-clock-get-sum-start'
* lisp/org-clock.el (org-clock-get-sum-start): Return time as UTC.

Reported-by: Josh Moller-Mara <jmm@CNS.NYU.EDU>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00128.html>
2017-08-07 13:25:20 +02:00
Nicolas Goaziou 569b7d105c Merge branch 'maint' 2017-08-05 15:38:13 +02:00
Nicolas Goaziou 7e241af591 org-clock: Fix regression in `org-clock-sum'
* lisp/org-clock.el (org-clock-sum): Fix regression introduced in
  112c5ba479.  Small refactoring.

Reported-by: Josh Moller-Mara <jmm@cns.nyu.edu>
http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00117.html
2017-08-05 15:35:37 +02:00
Nicolas Goaziou 27e5beaa64 org-clock: Do not inhibit logging with `org-clock-out-switch-to-state'
* lisp/org-clock.el (org-clock-out): Do not inhibit logging.

Logging is not inhibited when using `org-clock-in-switch-to-state'.

Reported-by: Рома Рудаков <phentagram@gmail.com>
http://lists.gnu.org/archive/html/emacs-orgmode/2017-07/msg00473.html
2017-07-28 14:50:36 +02:00
Nicolas Goaziou 6b9f9e9aff Merge branch 'maint' 2017-07-24 09:42:50 +02:00
Nicolas Goaziou d9713fe3ca org-clock: Fix :tend with a time zone
* lisp/org-clock.el (org-clocktable-steps): Do not force UTC
  for :tend.

Reported-by: Dale Sedivec <dale@codefu.org>
2017-07-24 09:40:58 +02:00
Nicolas Goaziou 163c84f2ee Merge branch 'maint' 2017-07-10 10:58:42 +02:00
Nicolas Goaziou 60eda8e4ec org-clock: Fix :tstart :tend parsing with time zones
* lisp/org-clock (org-clocktable-steps): Fix :tstart :tend parsing
  with time zones.

The regression was introduced in 112c5ba479.

Reported-by: Dale Sedivec <dale@codefu.org>
2017-07-10 10:56:56 +02:00
Nicolas Goaziou 97a1a49895 Fix failing tests in non-daylight saving time zones
* lisp/org.el (org-time-string-to-time): Remove optional POS and
  BUFFER arguments.  Accept new optional ZONE argument.
(org-time-string-to-seconds): Accept optional ZONE argument.
(org-check-before-date):
(org-check-after-date):
(org-check-dates-range):
(org-goto-calendar):
* lisp/ob-gnuplot.el (org-time-string-to-time):
* lisp/org-agenda.el (org-agenda-get-blocks):
* lisp/org-clock.el (org-clock-timestamps-change):
* lisp/org-list.el (org-time-string-to-seconds): Use UTC for time
  difference and time comparison.

* testing/lisp/test-org-clock.el (org-test-clock-create-clock): Use
  UTC for time differences.
2017-07-07 18:23:10 +02:00
Nicolas Goaziou e90b643b05 Merge branch 'maint' 2017-06-21 22:35:28 +02:00
Nicolas Goaziou 112c5ba479 org-clock: Remove daylight saving time offset in duration
* lisp/org-clock.el (org-clock-out):
(org-clock-sum):
(org-clocktable-steps):
(org-clock-update-time-maybe): Use UTC to compute time differences.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/scope):
  Update test.
2017-06-21 22:32:57 +02:00
Kaushal Modi 62ce814130 Merge branch 'maint' 2017-06-15 09:03:35 -04:00
Kaushal Modi 3bcfed071d Fix breakage due to outline-invisible-p defn change in emacs 26+
* lisp/org.el (org-invisible-p): New function.  Restore the behavior
of outline-invisible-p prior to the following commint on emacs master
<http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9cc59ffbbb2f20fbbf1c72d2e0c9dc47c7906a99>.

* lisp/org.el (org-cycle-internal-local)
(org-clean-visibility-after-subtree-move, org-goto)
(org-get-location, org-move-subtree-down, org-copy-subtree)
(org-paste-subtree, org-next-link, org-mark-ring-goto)
(org-todo, org-deadline, org-schedule, org-set-tags)
(org-truely-invisible-p, org-invisible-p2)
(org-forward-heading-same-level, org-forward-paragraph)
(org-backward-paragraph, org-down-element)
(org-bookmark-jump-unhide, org-mark-jump-unhide):
* lisp/org-list.el (org-insert-item):
* lisp/org-crypt.el (org-encrypt-entry, org-decrypt-entry):
* lisp/org-clock.el (org-clock-load):
* lisp/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag)
(org-archive-set-tag):
* contrib/lisp/org-drill.el (org-drill-hide-subheadings-if): Use
org-invisible-p instead of outline-invisible-p.

Reference:
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00230.html>
2017-06-15 08:10:47 -04:00
Nicolas Goaziou 0cbb877217 Merge branch 'maint' 2017-05-30 08:57:01 +02:00
Nicolas Goaziou 400cd95bba org-clock: Fix german translations
* lisp/org-clock.el (org-clock-clocktable-language-setup): Fix german
  translations.

Suggested-by: Jens Lange <jens.lange.de@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113714>
2017-05-30 08:56:25 +02:00
Nicolas Goaziou 3c911e802b Merge branch 'maint' 2017-05-27 18:14:46 +02:00
Nicolas Goaziou 75e9fdac6c org-clock: Fix number of time columns in clock table
* lisp/org-clock.el (org-clocktable-write-default): Limit number of
  time columns to the deepest headline level.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/maxlevel):
  Update tests.
2017-05-27 18:12:38 +02:00
Nicolas Goaziou f70eb7d2e8 org-clock: Fix missing properties in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not ignore
  properties specified by :properties parameter.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/properties):
  New test.

The regression was introduced in b897ab722.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112219>
2017-05-19 09:09:32 +02:00
Nicolas Goaziou dcda03170d Merge branch 'maint' 2017-05-15 00:35:12 +02:00
Nicolas Goaziou 93e5d92383 org-clock: Disambiguate character syntax
* lisp/org-clock.el (org-clock-put-overlay): Escape character in
  character syntax.
2017-05-15 00:34:58 +02:00
Nicolas Goaziou dbe2424b07 Adjust `org-at-timestamp-p' behavior
* lisp/org.el (org-at-timestamp-p): Change optional argument
  behaviour.  Remove interactive call.
(org-follow-timestamp-link):
(org-get-repeat):
(org-auto-repeat-maybe):
(org-time-stamp):
(org-timestamp-up-day):
(org-timestamp-down-day):
(org-toggle-timestamp-type):
(org-timestamp-change):
(org-goto-calendar):
(org-date-from-calendar):
(org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft):
(org-org-menu):
(org-fill-paragraph-with-timestamp-nobreak-p):
(org-shiftcontrolup):
(org-shiftcontroldown):
* lisp/org-agenda.el (org-agenda-date-later):
(org-agenda-date-prompt):
* lisp/org-clock.el (org-clock-timestamps-change):
* lisp/org-mouse.el (org-mouse-delete-timestamp):
(org-mouse-context-menu):
* lisp/org-table.el (org-table-copy-down): Update callers.

* testing/lisp/test-org.el (test-org/at-timestamp-p): Add tests.
2017-05-14 10:54:25 +02:00
Nicolas Goaziou 75320ff205 org-clock: Small refactoring
* lisp/org-clock.el (org-clock-get-table-data): Use `org-get-heading'.
  Also, avoid calling `org-entry-properties' since getting "TIMESTAMP"
  or "TIMESTAMP_IA" properties can be very slow.
2017-04-29 10:35:04 +02:00
Nicolas Goaziou b4ba9f1770 Merge branch 'maint' 2017-04-29 10:26:59 +02:00
Nicolas Goaziou cb5ca4206f org-clock: Fix failing tests
* lisp/org-clock.el (org-clock-get-table-data): `org-get-heading' only
  accepts up to 2 arguments in Org 9.0.
2017-04-29 10:25:57 +02:00
Nicolas Goaziou 0d35d9d0d6 Merge branch 'maint' 2017-04-17 10:05:08 +02:00
Nicolas Goaziou 6bd5210535 org-clock: Silence byte-compiler 2017-04-17 10:04:54 +02:00
Nicolas Goaziou fc369b6fae Merge branch 'maint' 2017-04-17 10:03:10 +02:00
Nicolas Goaziou 58ba690e33 org-clock: Fix :link parameter in Clock table
* lisp/org-clock.el (org-clock-get-table-data): Fix link creation with
  headlines containing COMMENT or TODO keywords.  Fix docstring.
  Small refactoring.

Reported-by: "Stacey Marshall" <stacey.marshall@oracle.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113094>
2017-04-17 10:02:46 +02:00
Nicolas Goaziou 0b87157e19 Merge branch 'maint' 2017-03-29 16:34:21 +02:00
Nicolas Goaziou df0c7d96a2 org-clock: Preserve narrowing when building clock table
* lisp/org-clock.el (org-dblock-write:clocktable): Preserve current
  narrowing, if any, when building the table.

Reported-by: Christof Musik <ml-orgmode@litephone.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112872>
2017-03-29 16:33:10 +02:00
Nicolas Goaziou 7bbd62cef4 Merge branch 'maint' 2017-03-19 10:57:11 +01:00
Yasushi SHOJI d2835ab54d org-clock: Fix percent formula column in clock table
* lisp/org-clock.el (org-clocktable-write-default): Fix percent
  formula column in clock table.
2017-03-19 10:55:44 +01:00
Eduardo Bellani 78bddaca1f org-clock.el: Add nullary function evaluation as a clocktable scope parameter
* lisp/org-clock.el (org-dblock-write:clocktable): Funcall the scope
  argument if it is a function.

* doc/org.texi: Document the feature of using a nullary function as the
  scope for the clocktable.

* testing/lisp/test-org-clock.el: Adds a test for the above
  feature.  Also, fix the number of hours of a test that seemed to be
  broken.

TINYCHANGE
2017-03-06 18:00:19 +01:00
Nicolas Goaziou b5d8be4a5f Merge branch 'maint' 2017-02-19 09:39:50 +01:00