B S will cause tasks to be rescheduled a random number of days into the
future, with 7 as the default. This is useful if you've got a ton of
tasks scheduled for today, you realize you'll never deal with them all,
and you just want them to be distributed across the next N days.
* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.
* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.
* org.texi, orgguide.texi: Replace org-agenda-ndays by
org-agenda-span. Add a paragraph about org-agenda-span and say that
org-agenda-ndays is now deprecated.
This patch is pretty huge, so I'll give a bit of context about it.
I'm weird, but I used org-agenda-ndays set to 14. Unfortunately, this
settings was interpreted as a month view. Pressing 'f' key to see later,
would show me the next month, which was not at all what I wanted.
On the same idea, day view or week view would change my org-agenda-ndays
settings, which I think is not a good idea. Changing user setting is *bad*.
:-)
So I rewrote the things this way:
- Rename org-agenda-span to org-agenda-current-span
Which has the same meaning has before, except it can be numeric.
- Rename org-agenda-ndays to org-agenda-span
I think the name is better choosen. You can set it to a symbol instead of
only a numeric value. That means you can set it to 'month and it will show
you the number of days of the current month in your agenda. Better than
30. But you can still set it to 30, or 31, or whatever you want.
- Do not change org-agenda-span. Never.
- Use org-agenda-current-span for navigation.
That means if you press 'f', it will shows you really the next
org-agenda-current-span ndays, and not something based on "I think you
want a weekly view".
* lisp/org-agenda.el: (org-format-agenda-item) The value of
org-category is not converted to a string unless it is defined.
This fixes commit 3061c7083d, which
resulted in org-format-agenda-item always returning the symbol-name for
org-category even if it was not defined. I.e., in some instances,
org-format-agenda-item returned the string "nil", thus bypassing the
buffer-file-name method of deriving the category.
* org-agenda.el (org-format-agenda-item): Convert category to a string
if it is a symbol. This fixes the following call to
org-agenda-get-category-icon which fails if category is not a string.
Signed-off-by: Julien Danjou <julien@danjou.info>
* lisp/org-agenda.el (org-agenda-timegrid-use-ampm): New option.
(org-agenda-time-of-day-to-ampm): New function.
(org-agenda-time-of-day-to-ampm-maybe): New function.
(org-format-agenda-item): Call org-agenda-time-of-day-to-ampm-maybe.
Patch by Christoph Allen Webber
* lisp/org-agenda.el (org-agenda-today): New function.
(org-agenda-get-day-face): New function.
(org-timeline): Use org-agenda-today and org-agenda-get-day-face.
(org-agenda-list): Use org-agenda-today and org-agenda-get-day-face.
(org-todo-list): Use org-agenda-today.
(org-get-all-dates): Use org-agenda-today.
(org-agenda-day-face-function): New variable.
(org-agenda-get-day-face): Use org-agenda-day-face-function.
Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Julien Danjou <julien@danjou.info>
* doc/org.texi (Categories): Document category icons.
* lisp/org-agenda.el (org-agenda-prefix-format): Insert place holder for icon.
(org-agenda-category-icon-alist): New option.
(org-agenda-get-category-icon): New function.
(org-format-agenda-item): Support for icons.
(org-compile-prefix-format): Support for icons.
* 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-agenda.el (org-agenda-get-sexps): Handle lists as return values
from diary entries
* lisp/org-bbdb.el (org-bbdb-anniversaries): Handle lists of anniversaries
* lisp/org.el (org-diary-sexp-entry): Handle lists as return values
from diary entries.
ukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:
> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
> Anniversaries: John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too
>
> Anniversaries: John Doe's 10th wedding anniversary; Jane Doe's 10th wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]
As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this
(nil . "Full Moon 3:35am (CEST)")
(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.
("John Doe's 10th wedding anniversary"
"Jane Doe's 10th wedding anniversary")
This is because
(consp (cdr '(a . b))) ; => nil
so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding
(listp (cdr result))
may help then be it.
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Pad clock times
with zeros. Start applying face earlier.
Hello,
Here a tiny patch to:
- have padding with 0 for the clock time
- begin applying face org-time-grid from position 2, in order to be properly
aligned with the rest of the agenda (you don't see that if you don't have a
face with background color)
[My apologies, but I'm afraid my first attempt at this patch mistook a
necessary second check for redundancy. Here is an improved version.]
* lisp/org-agenda.el (org-prepare-agenda): If the agenda is called
from within the agenda via an elisp link, such as
[[elisp:(org-agenda-list)]], org-prepare-agenda erases the buffer of
the file containing the link, since that buffer is current during
org-prepare agenda (due to a with-current-buffer in
org-agenda-open-link). An additional test now ensures that the
agenda buffer is in fact current when the buffer is erased and local
variables for the agenda are set.
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.
Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
* 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.