This file should be with the other org files, and not in the staging
area. Also, when file names in mobileorg.org are interpreted, this
should be relative to org-directory. So we also require now that the
user set this variable.
(org-clock-resolve-clock): New function that resolves a clock to a
specific time, closing or resuming as need be, and possibly even
starting a new clock.
(org-clock-resolve): New function used by `org-resolve-clocks' that sets
up for the call to `org-clock-resolve-clock'. It determines the time to
resolve to based on a single-character selection from the user to either
keep time, subtract away time or cancel the clock.
(org-resolve-clocks): New user command which resolves dangling clocks --
that is, open but not active -- anywhere in the file list returned by
`org-files-list'.
(org-clock-in): Automatically resolve dangling clocks whenever a user
clocks in.
(org-clock-cancel): If the user cancels the solely clock in a LOGBOOK,
remove the empty drawer.
(org-clock-idle-time): New user customizable option for detecting
whether the user has left a clock idle. Note: it is only used in this
commit to test whether it's worthwhile to check OS X to get the Mac
user's current idle time. If the Emacs idle time is less than the
value, the user hasn't been away long enough to be worth checking (a
more expensive test than just getting Emacs idle time).
(org-user-idle-seconds, org-mac-idle-seconds)
(org-emacs-idle-seconds): This three functions, in conjunction
with the user customization variable `org-clock-idle-time', return
the number of seconds (as a floating point) that the user has been
away from their Emacs (or, if running on OS X, their computer).
(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.
(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.
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer. Note
that not all the files will necessarily be visited by a buffer at time
of call.
(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.
(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
(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).
(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.
(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.
(org-files-list): New utility function for returning a list of all open
org-mode buffers, plus all files used to build the agenda buffer. Note
that not all the files will necessarily be visited by a buffer at time
of call.
(org-entry-beginning-position): Like the function
`line-beginning-position', this inline function returns the beginning
position of the current heading/entry.
(org-entry-end-position): Like the function `line-end-position', this
inline function returns the end position of the current heading/entry.
This includes the required changes to org-babel.el and a
language-specific implementation for emacs-lisp. The emacs-lisp
changes are from a patch by Benny Andresen.
If an active edit buffer exists for a source block, and this variable
is non-nil, then org-edit-src-code will not ask before returning to
the edit buffer, and future saves will overwrite the source block's
contents.
The default in search view is not that the search expression is
searched for as a substring, i.e. the different words must occur in
direct sequence. The old way is only used it the first word in
the search string is preceded by a plus or a minus.
This was, more-or-less, requested by John Wiegley.