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.