* doc/org.texi (Agenda commands): Document fortnight view.
* lisp/org-agenda.el (org-agenda-custom-commands-local-options):
(org-agenda-span): Add support for fortnight view.
(org-agenda-menu): Add fortnight view command.
(org-agenda-list):
(org-agenda-ndays-to-span): Add support for fortnight view.
(org-agenda-span-to-ndays): Add support for fortnight view.
(org-agenda-later): Add support for fortnight view.
(org-agenda-fortnight-view): New command.
(org-agenda-change-time-span): Add support for fortnight view.
(org-agenda-compute-starting-span): Add support for fortnight view.
This is a patch by Michael Gauland.
* org-agenda.el (org-agenda, org-search-view, org-tags-view)
(org-agenda-get-day-entries, org-agenda-set-restriction-lock):
Use (current-buffer) as the value of `org-agenda-restrict'.
Fix a bug about narrowing to wrong region boundaries when
`org-agenda-restrict' is non-nil.
Thanks to Thomas Holst for reporting this bug.
* org-agenda.el (org-agenda-write):
* ob-core.el (org-babel-expand-src-block): Use
`org-called-interactively-p'.
Thanks to Jason L Wright for reporting this.
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.
* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): New commands.
(org-agenda-mode-map): Bind the new commands to M-<down> and
M-<up> respectively.
* org.texi (Agenda commands): Add a table heading for dragging
agenda lines forward/backward.
* org-agenda.el (org-agenda-bulk-toggle): Fix docstring.
(org-agenda-bulk-toggle-all): New command.
(org-agenda-mode-map): Bind `org-agenda-bulk-toggle' to `M-m'
and `org-agenda-bulk-toggle-all' to `M-*'.
(org-agenda-menu): Add `org-agenda-bulk-toggle' and
`org-agenda-bulk-toggle-all'.
(org-agenda-bulk-mark, org-agenda-bulk-unmark): Jump to the
next headline, not the next line.
* org-agenda.el (org-agenda-span-to-ndays): Enhance docstring.
(org-agenda-goto-date): Fix bug when going to a date in month
view.
Thanks to Eric S Fraga for reporting this bug.
* org-agenda.el (org-agenda-top-headline-filter): Rename from
`org-agenda-top-headline-filter'.
(org-find-top-headline): Rename from `org-find-top-category'.
Add a docstring.
(org-agenda-filtered-by-top-headline): Rename from
`org-agenda-filtered-by-top-category'.
(org-agenda-filter-by-top-headline): Rename from
`org-agenda-filter-by-top-category'. Fix docstring.
(org-agenda-filter-top-headline-apply): Rename from
`org-agenda-filter-top-category-apply'. Fix docstring.
(org-agenda-mode-map): Update binding.
Using category here was confusing, because there is no Org
category involved, the filtering is really against a headline.
Since category filtering also exists, the confusion was bad.
* org-agenda.el (org-agenda-get-todos): Set `todo-state'
earlier so that we can skip false-positives in time.
For example, when searching for a TODO headline with "* NEXT bla"
in a buffer where (1) there is such a headline but (2) "NEXT" is
not in the list of known TODO keywords, then we skip this match.
The earlier behavior threw an error.
* lisp/org-agenda.el (org-agenda-set-restriction-lock): Highlight only
the headline when agenda is restricted to a subtree. Do not
highlight the entire subtree.
* org-agenda.el (org-agenda-dim-blocked-tasks): Enhance
docstring.
(org-agenda-finalize-entries): Conditionally apply limits so
that we don't manipulate big lists uselessly.
(org-agenda-limit-entries): Limit exclusively. E.g., when
limiting to a maximum of "2 tags", don't limit among tagged
entries only, but limit among all entries.
(org-agenda-limit-interactively): New command.
(org-agenda-mode-map): Bind the new command to "~".
(org-agenda-redo): Small fix: don't use `eval'.
* org-agenda.el (org-agenda-start-on-weekday): Fix typo.
(org-agenda-start-day): Enhance docstring.
* org.texi (Weekly/daily agenda): Add `org-agenda-start-day'
and `org-agenda-start-on-weekday' to the variable index and
document them.
* org-agenda.el (org-agenda-scheduled-leaders)
(org-agenda-deadline-leaders): Re-align leaders to the left,
back to a 11 characters width.
Thanks to Matt Lundin for reporting display problems here.
* org-agenda.el (org-tags-view): Set the matcher after
preparing the agenda, as `org-tag-groups-alist-for-agenda'
might be needed.
(org-agenda-filter-make-matcher): New parameter `filter' and
`type'. Handle group tags.
(org-agenda-filter-expand-tags): New function.
(org-agenda-filter-apply): Handle group tags.
* org.el (org-blank-before-new-entry): Tiny docstring fix.
(org-tag-alist-for-agenda): Add docstring.
(org-tag-groups-alist-for-agenda): New global variable.
(org-tag-groups-alist): New buffer-local variable.
(org-tag-alist, org-tag-persistent-alist): Handle :grouptags.
(org-group-tags): New option.
(org-toggle-group-tags): New command.
(org-mode-map): Bind `org-toggle-group-tags' to `C-c C-x q'.
(org-set-regexps-and-options-for-tags): New function, factored
out from `org-set-regexps-and-options'.
(org-set-regexps-and-options): Don't handle tags, they are now
handled separately by `org-set-regexps-and-options-for-tags'.
(org-assign-fast-keys): Handle :grouptags.
(org-mode): Use `org-set-regexps-and-options-for-tags' on top
of `org-set-regexps-and-options'.
(org-fontify-meta-lines-and-blocks-1): Fontify group tags.
(org-make-tags-matcher): Expand group tags in the matcher.
(org-tags-expand): New function.
(org-tags-completion-function): Tiny code clean up.
(org-set-current-tags-overlay): Add a docstring.
(org-fast-tag-selection): Highlight group tags.
(org-agenda-prepare-buffers): Set `org-tag-alist-for-agenda'
and `org-tag-groups-alist-for-agenda'. Don't uniquify
`org-tag-alist-for-agenda' as we may need the grouping
information for filtering in the agenda buffer.
(org-uniquify-alist): New function.
* org-pcomplete.el (pcomplete/org-mode/file-option/tags):
Handle :grouptags.
* org-faces.el (mode-line): New face for group tags.
* org.el (org-store-link): When there is an active region,
store each line as a separate link.
(org-insert-all-links): Use a default description when links
do not have one already.
* org-agenda.el (org-agenda-redo): Fix typo in code.
* org-agenda.el (org-agenda-mode-map): Use ?= for filtering by
regexp and ?| for removing all filters.
(org-agenda-filter-remove-all): New command.
(org-agenda-filter-show-all-re): Rename from
`org-agenda-filter-show-all-regexp'.
(org-agenda-filter-by-regexp): Call
`org-agenda-filter-show-all-re'.
* org-agenda.el (org-agenda-entry-types): Move earlier in the file.
(org-agenda-custom-commands-local-options, org-diary)
(org-agenda-get-day-entries): Don't hardcode the default
agenda entry types, use `org-agenda-entry-types'.
* org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp): New buffer local variables.
(org-set-regexps-and-options): Set the new variables.
* org-agenda.el (org-agenda-custom-commands-local-options):
Add :deadline* and :scheduled* to the list of possible agenda
entry types.
(org-agenda): Implement a new agenda type agenda* with :scheduled*
and :deadline* replacing :scheduled and :deadline respectively in
agenda entry types. In such agenda, only scheduled and deadline
items with a time specification [h]h:mm will be considered.
(org-agenda-entry-types): Document the new agenda entry types
:scheduled* and :deadline*.
(org-agenda-list): New parameter `with-hour'. Use :scheduled* and
:deadline*.
(org-agenda-get-day-entries): Handle :scheduled* and :deadline*.
(org-agenda-get-deadlines, org-agenda-get-scheduled): New
parameter `with-hour'. Use `org-deadline-time-hour-regexp' or
`org-scheduled-time-hour-regexp' as the search string if needed.
(org-agenda-to-appt): Use :scheduled* and :deadline* by default,
as other scheduled and deadline items don't have a time spec and
cannot be turned into appointments. Trim bracket links and use
only the description as the appointment text.
(org-agenda-get-restriction-and-command): Add
default description for the agenda* view.
(org-agenda-run-series): Handle agenda* views.
* org-faces.el (org-agenda-filter-tags)
(org-agenda-diary, org-agenda-calendar-event)
(org-agenda-calendar-sexp): Minor code clean up.
(org-agenda-filter-category): Docstring fix.
(org-agenda-filter-category): New face.
* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-re-filter-overlays' and `org-agenda-regexp-filter'.
(org-agenda-mode-map): Use "|" for
`org-agenda-filtered-by-regexp'.
(org-agenda-re-filter-overlays): New variable.
(org-agenda-mark-filtered-text): Use
`org-agenda-re-filter-overlays'.
(org-agenda-finalize, org-agenda-redo): Allow regexp filtering.
(org-agenda-filter-by-category): Set `org-agenda-category-filter'
here instead of within `org-agenda-apply-filter'.
(org-agenda-regexp-filter): New variable.
(org-agenda-filter-by-regexp): New function to filter agenda
buffers by regexp.
(org-agenda-filter-make-matcher): Make matcher for regexp filters.
(org-agenda-filter-apply): Don't set `org-agenda-tag-filter' and
`org-agenda-category-filter'. Maybe apply regexp filter.
(org-agenda-filter-hide-line): Add docstring. Hide
regexp-filtered lines.
(org-agenda-filter-show-all-tag, org-agenda-filter-show-all-cat):
Add docstring.
(org-agenda-filter-show-all-regexp): New function.
(org-agenda-set-mode-name): Add regexp-filter information.
(org-agenda-custom-commands-local-options): Add regexp filter.
(org-agenda-regexp-filter-preset): New variable.
(org-agenda-prepare): Use the new variable.
* org.texi (Agenda commands): Document `org-agenda-filter-by-regexp'.
* org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
New allowed value `repeated-after-deadline' which will prevent the
display of scheduled items when repeated after the current
deadline.
(org-agenda-get-scheduled): Handle the new value.
This allows this task
* Do me every day before March, 16th (included)
SCHEDULED: <2013-03-12 mar. +1d> DEADLINE: <2013-03-16 sam.>
to step being displayed after March, 16th.
Thanks a lot to Rick Hanson for coming with this idea and a clear example.
* org.el (org-agenda-inhibit-startup): Revert to nil as the default.
* org-agenda.el (org-agenda-dim-blocked-tasks): Revert to t as the
default.
The reason for this reversion is that that users expect the agenda to
DTRT by default, and that it's better not to change the previous default
in general. Also, users who need to speed up their agenda are probably
long time users with big and numerous agenda files, and it's easier for
them to find these variables than it is for newbies to find out why the
agenda does not DTRT.
If users want to speed up their agenda, they can now read advice here:
http://orgmode.org/worg/agenda-optimization.html
* org-agenda.el (org-agenda-filter-apply): Deactive
`org-agenda-entry-text-mode' when filtering.
(org-agenda-entry-text-mode): Don't allow in filtered views.
Don't show the maximum number of lines when turning off.
Thanks to Sébastien Vauban for pointing a related issue.
* org-agenda.el (org-agenda-entry-text-leaders): New option.
(org-agenda-entry-text-show-here): Use it.
Thanks to Sébastien Vauban for a preliminary patch for this.
* org-agenda.el (org-agenda-collect-markers)
(org-create-marker-find-array): Move to ox-icalendar.el.
(org-agenda-marker-table, org-check-agenda-marker-table):
Delete.
* ox-icalendar.el (org-icalendar-create-uid): New parameter
H-MARKERS to only update some headlines, not the whole file.
(org-icalendar--combine-files): When exporting to an .ics file
only add UID to the headlines shown in the agenda buffer.
(org-agenda-collect-markers, org-create-marker-find-array):
Move here.
* org-agenda.el (org-agenda-deadline-leaders): New formatting
string for past deadlines.
(org-agenda-scheduled-leaders): Small change.
(org-agenda-get-deadlines): Use the new formatting string.
Thanks to Sébastien Vauban who suggested this idea and proposed
a preliminary patch for it.
* org-agenda.el (org-agenda-local-vars): Don't include
`org-agenda-show-window' as it needs to be checked outside of
the agenda window.
Thanks to Bernt Hansen for reporting this.
* org-agenda.el (org-agenda-unmark-clocking-task): New
function.
(org-agenda-mark-clocking-task): Use it.
(org-agenda-clock-in): Let the cursor where it is.
(org-agenda-clock-out): Ditto. Also remove the
`org-agenda-clocking' overlay.
* org-agenda.el (org-agenda-set-restriction-lock): Put the
overlay until the end of the subtree, not the end of the
headline.
When the agenda restriction is on, user expect agenda views to check
every entry in the subtree. If a user add an entry outside of the
overlay without noticing it, this entry will not be checked and the
user will wonder why. Put the end of the overlay at the end of the
subtree so that the user always knows if the entries she is adding
are within the current restriction.
We might need to find a less instrusive overlay color, though.
* org-agenda.el (org-agenda-prefix-format): Add documentation for
the new %b option.
(org-prefix-has-breadcrumbs): Add flag, `t' when %b is set.
(org-agenda-format-item): Add breadcrumbs if requested.
(org-compile-prefix-format): Add compiled information for
breadcrumbs, add %b option.
If org file has the structure
* project
** task1
*** TODO item1
then when using %b in org-agenda-prefix-format the agenda will display
"project->taks1->TODO item1".
* org-agenda.el (org-agenda-get-scheduled): When the delay is
of the form "--2d" and there is a repeater, ignore the delay
for further repeated occurrences.
Thanks to Michael Brand for suggesting this was somehow needed.
* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
Cosmetic changes.
(org-agenda-show-new-time): Fix bug when displaying a
temporary overlay with the scheduled/deadline information.
Thanks to Thomas Morgan for reporting this bug and testing the patch.
* org-agenda.el (org-agenda-write): Don't copy headlines'
subtrees when writing to an .org file.
* org.el (org-copy-subtree): New parameter `nosubtrees'.
* contrib/lisp/org-mime.el (org-mime-htmlize, org-mime-compose): Use
new exporter.
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new
exporter.
* lisp/ob-latex.el (org-babel-execute:latex): Use new exporter.
* lisp/ob-org.el (org-babel-execute:org): Use new exporter.
* lisp/org-agenda.el (org-agenda-menu, org-agenda-write): Use new
iCalendar export back-end.
* lisp/org-table.el (org-table-export, orgtbl-export): Remove
dependency on `org-exp' library.
(org-table-clean-before-export): New function.
(org-table-colgroup-info): New variable.
(orgtbl-to-html): Use to new HTML export back-end.
* lisp/org.el (org-modules): Remove modules relative to obsolete
export framework and add those relative to the new one.
(org-create-formula-image-with-dvipng, org-format-latex
org-create-formula-image-with-imagemagick): Use new exporter.
(org-indent-line): INCLUDE keywords are indented like regular
keywords.
(org-mode-map): Bind C-c C-e to new export dispatcher.
(org-menu): Install new exporter in menu.
* org-agenda.el (org-agenda-max-entries)
(org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): New options.
(org-timeline, org-agenda-list, org-search-view)
(org-todo-list, org-tags-view): Tell
`org-agenda-finalize-entries' what agenda type we are
currently finalizing for.
(org-agenda-finalize-entries): Limit the number of entries
depending on the new options.
(org-agenda-limit-entries): New function.
Thanks to the various people who asked for this feature
or for a variation of it.
You can set the new options to an integer or to an alist.
(setq org-agenda-max-effort 120)
=> Don't display entries beyond 120 minutes of effort
(setq org-agenda-max-effort '((todo . 60) (agenda . 240)))
=> Limit to 60 minutes in TODO agenda and to 240 in
"agenda" agenda views.
* org-agenda.el (org-agenda-skip-scheduled-delay-if-deadline):
New option. The structure of the possible values is copied
from `org-agenda-skip-deadline-prewarning-if-scheduled'.
(org-agenda-get-scheduled): Honor the two new option,
`org-scheduled-delay-days' and
`org-agenda-skip-deadline-prewarning-if-scheduled'. I.e. if a
scheduled entry has a delay cookie like "-2d" (similar to the
prewarning cookie for deadline), don't show the entry until
needed.
* org.el (org-deadline-warning-days): Small docstring fix.
(org-scheduled-delay-days): New option (see
`org-deadline-warning-days'.)
(org-get-wdays): Use the new option.
Thanks to Andrew M. Nuxoll and Michael Brand for this idea.
You can now use a "delay cookie" in scheduled items. For example,
* TODO Sleep
SCHEDULED: <2013-02-06 mer. -3d>
will not be shown on 06/02 but on 09/02, three days later.
The value of the cookie overrides any value of `org-scheduled-delay-days',
unless `org-scheduled-delay-days' is negative (same logic than for
`org-deadline-warning-days'.)
Also check org-agenda-skip-scheduled-delay-if-deadline, which does for
delay cookies what `org-agenda-skip-deadline-prewarning-if-scheduled' does
for prewarning deadline cookies.
* org-agenda.el (org-agenda-sorting-strategy): Document the
new sorting strategies.
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add a
`ts-date' text property with scheduled, deadline or timetamp
date.
(org-cmp-ts): New function to compare timestamps.
(org-em): Add a docstring.
(org-entries-lessp): Use `org-cmp-ts' to compare timestamps.
Implement the following sorting strategies: timestamp-up/down,
scheduled-up/down, deadline-up/down, ts-up/down (for active
timestamps) and tsia-up/down (for inactive timestamps.)
* org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Fix bug: use text properties for
the headline text since we rely on properties to get e.g. the
effort.
* org.el (org-contextualize-validate-key): Check against two
new context predicates [not-]in-buffer.
* org-capture.el (org-capture-templates-contexts):
* org-agenda.el (org-agenda-custom-commands-contexts):
Document the new [not-]in-buffer context predicates.
Thanks to Paul Sexton for triggering this and for proposing a patch.