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.
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.
* 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
* 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.
* 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.
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.
* 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.
* 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.
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.
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
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'.
* 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.
* 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
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.
* 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.
* 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.
* 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).
* 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'.
* 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.
* 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.
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.
* 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.
* 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.
* 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.
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>
* 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
* 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.
* 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>
* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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?
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.
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.
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.
`----
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
* 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.
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
* 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.