* lisp/org-timer.el (org-timer-pause-or-continue):
(org-timer-mode-line-string):
(org-timer-set-mode-line): Use `paused' rather than `pause'.
(org-timer-countdown-timer): Quote `paused' as symbol.
Add changes from Emacs repo that should have been backported with
bb77dd2.
Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
* lisp/org.el (org-read-date-analyze):
* lisp/org-timer.el (org-timer-seconds): Explicitly pass current-time as
optional time argument and explain reason in comment.
This reverts some changes from 91ab6c4 ("Backport commit 123ddec from
Emacs master branch", 2014-10-28).
* doc/org.texi (Dynamic blocks):
* lisp/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling):
* lisp/org-clock.el (org-resolve-clocks, org-clock-get-sum-start)
(org-clock-special-range):
* lisp/org-timer.el (org-timer-seconds):
* lisp/org.el (org-read-date-analyze, org-get-cursor-date):
* lisp/ox-html.el (org-html-format-spec):
* lisp/ox-icalendar.el (org-icalendar--vtodo):
Omit unnecessary call to current-time.
* lisp/org.el (org-get-cursor-date):
Don't call current-time twice to get the current time stamp,
as this can lead to inconsistent results.
* lisp/org-compat.el (org-float-time):
Simplify to an alias because time-to-seconds now behaves like float-time
with respect to nil arg.
* lisp/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy
conversion from floating point to Emacs time and back.
(org-resolve-clocks): Prefer two-argument floor.
Simplify use of current-time and friends.
123ddec7f807f4bd7400bbbe08219afb02269c00
Paul Eggert
Tue Oct 28 18:42:51 2014 -0700
* lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss
format.
(org-timer-default-timer): Type changed from number to string.
* testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add
hh:mm:ss format in the test.
* lisp/org-timer.el (org-timer-stop): Support countdown timers in addition
to relative timers.
* lisp/org-timer.el (org-timer-cancel-timer): Remove function.
* lisp/org-timer.el (org-timer-pause-or-continue): Support countdown
timers in addition to relative timers.
* testing/lisp/test-org-timer.el: New file.
* doc/org.texi: Merge relative and countdown timer nodes.
Several previous issues are fixed with these changes.
- org-timer-set-timer and org-timer-cancel-timer did not reset
org-timer-start-time after countdown completed.
- Because org-timer-start did not return org-timer-pause-time to nil,
the modeline remained stuck at the paused time.
- When org-timer-start was called with a countdown timer, the modeline
was updated for the new relative timer, but the countdown timer
remained scheduled.
- When org-timer-pause-or-continue was called with a countdown timer
running, the modeline was put in a paused state, but the countdown
timer remained scheduled.
- When org-timer-stop was called with a countdown timer running, the
timer was removed from the modeline, but the countdown timer remained
scheduled.
- When org-timer-set-timer was called with a paused relative timer, the
relative timer was not reset properly (org-timer-pause-time was still
non-nil) and the modeline remained in the paused state of the relative
timer, even though the countdown timer was scheduled with
run-with-timer.
- Running org-timer-set-timer at the beginning of an empty buffer
resulted in an args-out-of-range error (due to the org-get-at-eol
call).
* lisp/org-timer.el (org-timer-stop): Do not look after
`org-timer-current-timer', which is a variable related to countdown
timer, whereas the function is related to relative timer.
Reported-by: Randy Smith <perlstalker@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93081>
* org.el (org-refresh-property): New function.
(org-refresh-properties, org-set-effort)
(org-property-next-allowed-value): Use it.
* org-timer.el (org-timer-set-timer): Get the correct number
of minutes from text properties, both in an `org-mode' and
`org-agenda-mode' buffer.
* org-timer.el (org-timer-cancel-timer, org-timer-stop):
Enhance message.
(org-timer-set-timer): Use the number of minutes in the Effort
property as the default timer value. Three prefix arguments
will ignore the Effort value property.
* lisp/org-timer.el (org-timer-set-timer): Use the variable
`org-clock-sound' when calling `org-notify'.
When org-notify second parameter is t we only get the standard beep.
Evaluating with coma we can use different sounds for differents
running timers, as `org-clock-sound' was set when
`org-timer-set-timer' get execute
Patch proposal by Roberto Huelga Díaz.
TINYCHANGE
* lisp/org-timer.el (org-timer-set-mode-line): Check
`org-timer-display' when value is 'off.
This solves the error of (org-timer-set-mode-line 'off) when
`org-timer-display' is 'mode-line. In this case `frame-title-format'
may not be a list.
TINYCHANGE
* 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.
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.
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.
Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode
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