* org-faces.el (org-priority): New face.
* org.el (org-font-lock-add-priority-faces): Use the new face.
* org-agenda.el (org-agenda-fontify-priorities): Use the
org-priority face and add specific agenda face on top of it.
* org-agenda.el (org-agenda-skip): Correctly handle commented
out scheduled/deadline lines. Refactor.
Thanks to Rainer Stengele for reporting this and to Nick Dokos for
investigating further. This fix will not slow down the agenda as checking
for a text property seems equally fast (and perhaps even slightly faster)
than checking the character after.
* org-agenda.el (org-agenda-show-clocking-issues)
(org-agenda-format-item): Let-bind
`org-time-clocksum-use-effort-durations' to nil.
Thanks to Vincent Beffara for reporting this.
* org-agenda.el (org-agenda-quit): Delete indirect buffer's window
only when it exists.
When indirect buffer's window doesn't exist, the original logic will
delete the current window.
TINYCHANGE
* org.el (org-get-tags-at): Remove duplicate inherited tags.
* org-agenda.el (org-agenda-show-inherited-tags): Allow to be
set to 'always or to a list of agenda types.
(org-agenda-finalize): Rework conditions under which inherited
tags should be made available even when not displayed.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-scheduled)
(org-agenda-get-blocks): Use new possible values of
`org-agenda-show-inherited-tags'.
Thanks to Karl Voit and Tassilo Horn who first reported this.
* org-agenda.el (org-get-entries-from-diary): Turn off
`diary-file-name-prefix' instead of
`diary-file-name-prefix-function', the former is checked
before the latter.
Thanks to Andreas Merziger for reporting this as Emacs bug#13396.
* org-agenda.el (org-agenda-finalize): Don't remove tag
alignment depending on `org-prefix-has-tag', this should
depend on `org-agenda-remove-tags'.
Thanks to Rainer Stengele for reporting this.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-change-all-lines): Get local tags only.
(org-agenda-use-tag-inheritance): New option.
(org-agenda-finalize): When `org-agenda-use-tag-inheritance'
is non-nil, possibly reset tags in the agenda buffer.
(org-agenda-check-type): Enhance docstring.
See the docstring of the new option for details.
* org-agenda.el (org-float): Don't alias `org-float'.
* org.texi (Timestamps, Deadlines and scheduling): Use
`diary-float' instead of the now obsolete alias `org-float'.
* test-org-element.el
(test-org-element/timestamp-interpreter): Ditto.
* org.el (org-refresh-properties): Rename from
`org-refresh-effort-properties' and use two new parameters.
(org-agenda-prepare-buffers): Use `org-refresh-properties'.
Also refresh the 'org-appt-warntime text property.
* org-clock.el (org-clock-in): Use the renamed defun.
* org-icalendar.el (org-icalendar-print-entries): Refresh the
'org-appt-warntime property.
(org-icalendar-print-entries): Do not use `org-entry-get' to
get the "APPT_WARNTIME" property value.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Ditto.
* org-agenda.el (org-agenda-format-item): Do not use
org-get-effort to get the effort text property.
(org-agenda-get-sexps): Use `org-back-to-heading' when setting
the tags.
* org-clock.el (org-clock-in): Refresh effort properties.
* org.el (org-refresh-effort-properties): New defun.
(org-get-effort): Delete.
(org-set-effort): Set the 'org-effort text property.
(org-property-next-allowed-value): Ditto.
(org-agenda-prepare-buffers): Refresh effort properties.
* lisp/org-compat.el (org-define-obsolete-function-alias,
org-define-obsolete-variable-alias): Introduce new compatibility
macros to obsolete functions and variables.
* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
`org-define-obsolete-{function,variable}-alias´instead of
`define-obsolate{function,variable}-alias´.
* org-agenda.el (org-agenda-dim-blocked-tasks): Default to
nil.
(org-agenda-dim-blocked-tasks): Make interactive and allow an
optional parameter 'invisible to hide blocked tasks instead of
just dimming them.
(org-agenda-mode-map): Bind `org-agenda-dim-blocked-tasks' to
"#".
With a default value of t for `org-agenda-dim-blocked-tasks',
any non-nil value for `org-enforce-todo-checkbox-dependencies' or
`org-enforce-todo-dependencies' (or both) will slow down the
agenda generation too much, which might surprise the user.
* org-agenda.el (org-agenda-priority): Remove useless
parameter and fix showing priority in agenda buffers.
Thanks to Michael Brand for reporting this.
* org-agenda.el (org-agenda-open-link): Allow to open an
internal link by using the new `org-offer-links-in-entry'
function.
* org.el (org-offer-links-in-entry): Do not open the link
directly through `org-open-link-from-string', only offer to
select a link and return a cons with the link (as a string)
and the end of entry.
(org-open-at-point): Use `org-offer-links-in-entry' correctly.
Thanks to Memnon Anon for reporting this.
* org-agenda.el (org-agenda-search-view-max-outline-level):
New option to define the max level for the entries shown by
the search view. A value of 1 means to show the top parent
of the entries.
* org-agenda.el
(org-agenda-propertize-selected-todo-keywords): New function
to highlight the current agenda todo keywords depending on
`org-todo-keyword-faces'.
(org-todo-list): Use the new function.
TINYCHANGE
* org.el (org-get-cursor-date): New optional argument
WITH-TIME to add the time of the day.
* org-capture.el (org-capture): When capturing from the agenda
and with a non-nil value for `org-capture-use-agenda-date', a
`C-1' prefix will set the capture time to the HH:MM of the
current line or the current HH:MM.
* org-agenda.el (org-agenda-capture): New optional argument
WITH-TIME: when set to 1, the capture time will be set to the
HH:MM time of the current line, or the current HH:MM time.
From an agenda buffer, C-1 k (i.e. org-agenda-capture) and
C-1 M-x org-capture RET will use the time of the day of the
current line, or the current time of the day. The date is
not changed by using this prefix.
Thanks to Rene for triggering this change.
* lisp/org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled):
Add an option to skip the deadline prewarning if the scheduled date is
in the future.
* lisp/org-agenda.el (org-agenda-get-sexps): Reset `extra' to nil at
beginning of re-search-forward loop, otherwise next iteration picks up
`extra' value from previous entry.
* org-agenda.el (org-agenda-get-timestamps): Check if the item
is an habit when formatting it with `org-agenda-format-item'.
(org-agenda-get-blocks): Fix bug: don't assume the item is an
habit when formatting with `org-agenda-format-item'.
Thanks to George McNinch for reporting this.
* org.el (org-calendar-agenda-action-key): Delete an option.
(org-mode-map): Delete its keybinding.
(org-agenda-action-marker, org-mark-entry-for-agenda-action):
Delete.
* org-agenda.el (org-agenda-diary-entry): Don't prevent from
being used outside of Org agendas, as it can be used in
calendar buffers too.
Note that we may have to reimplement the functions related to
"k" in the calendar.
* org-agenda.el (org-agenda-quit): Delete last indirect buffer.
(org-agenda-pre-follow-window-conf): New variable.
(org-agenda-tree-to-indirect-buffer): Fix bug: don't split
agenda window when there an indirect buffer is already
displayed.
* org-agenda.el (org-agenda-change-all-lines): Speedup
refresh of a single line of agenda by narrowing the agenda
buffer to just that line before calling `org-agenda-finalize'.
* org-agenda.el (org-agenda-manipulate-query)
(org-agenda-goto-date, org-agenda-goto-today)
(org-agenda-find-same-or-today-or-agenda, )
(org-agenda-later, org-agenda-change-time-span)
(org-agenda-change-all-lines)
(org-agenda-execute-calendar-command)
(org-agenda-goto-calendar, org-agenda-convert-date): Make sure
to get a property from (1- (point-max)), not (point-max)).
Thanks to Juan Pechiar for reporting a related problem.
* org.el (org-priority): Use a new argument to show priority
instead of setting it.
(org-show-priority): New function to show priority both in
normal Org buffers and in Org Agenda buffers.
(org-speed-commands-default): Use "," as a speed command for
setting priority.
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-priority' to `C-c ,' as it was before.
(org-agenda-show-priority): Delete.
(org-agenda-priority): Use a new argument to show priority
instead of setting it.
Thanks to Robert Horn for triggering this change.
* org.el (org-font-lock-hook, org-set-font-lock-defaults): Add
a docstring.
(org-display-inline-remove-overlay): Rename from
`org-display-inline-modification-hook'.
(org-speed-command-activate): Rename from
`org-speed-command-default-hook'.
(org-babel-speed-command-hook): Rename from
`org-babel-speed-command-activate'.
* org-agenda.el (org-agenda-update-agenda-type): Rename from
`org-agenda-post-command-hook'.
(org-agenda-mode): Use the new name.
(org-agenda-post-command-hook): Define as obsolete function.
* org-lparse.el (org-lparse): Temporarily activate the hooks
needed for the ODT conversion.
(org-lparse-preprocess-after-blockquote): Rename from
`org-lparse-preprocess-after-blockquote-hook'.
(org-lparse-strip-experimental-blocks-maybe): Rename from
`org-lparse-strip-experimental-blocks-maybe'.
(org-lparse-preprocess-after-blockquote-hook)
(org-lparse-strip-experimental-blocks-maybe-hook): Define as
obsolete functions.
* org.el (org-days-to-time): Make obsolete.
(org-time-stamp-to-now): Rename from `org-days-to-time'.
Allow to compare time-stamps based on seconds.
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
New option to compare time stamps using seconds, not days.
(org-agenda-todo-custom-ignore-p)
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
Use the new function's name and the new option.
This idea came up while reading Jay McCarthy's blog here:
http://jeapostrophe.github.com/blog/2012/09/19/omnifocus-and-org-mode/
* org.el (org-in-subtree-not-table-p): New utility function
for building the menu.
(org-org-menu): Add an item for refiling. Check more contexts
when activating items.
(org-tree-to-indirect-buffer): Use `org-up-heading-safe'.
* org-agenda.el (org-agenda-tree-to-indirect-buffer)
(org-agenda-do-tree-to-indirect-buffer): Use argument `arg'.
* org-agenda.el (org-agenda-menu-two-column)
(org-finalize-agenda-hook, org-agenda-ndays): Use
`define-obsolete-variable-alias' instead of
`make-obsolete-variable'.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-blocks): Use the
dotime parameter of `org-agenda-format-item' so that 'time-up
and 'time-down agenda sorting strategies are handled correctly.
Thanks to Richard Lawrence who reported this.
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Find the
correct agenda buffer. Don't split the agenda window when the
indirect buffer is displayed in another frame.
Thanks Viktor Rosenfeld for reporting this.
* org-agenda.el (org-agenda-get-restriction-and-command): Fix
the display of the number of commands for block agendas.
Thanks to Sébastien Vauban for reporting this.
* org-agenda.el (org-agenda-before-write-hook)
(org-agenda-add-entry-text-maxlines): Enhance phrasing.
(org-agenda-finalize-hook, org-agenda-mode-hook): Tell that
the buffer is writable when the hook is called.
(org-agenda-finalize): Allow org-agenda-finalize-hook to
modify the buffer.
Thanks to Moritz Ulrich and to Aaron Ecay for triggering this fix.
* org-agenda.el (org-habit-show-all-today): Only use defvar
to silent the byte-compiler.
(org-agenda-get-scheduled): Check whether some org-habit.el
options have been defined.
Thanks to Robert Horn for reporting this.
* org-agenda.el (org-agenda-bulk-action): Always read the date
through `org-read-date'. When possible, use the date at point
as the default date.
The previous behavior was trying to mimik the previous behavior
we had with `k m' (to mark the item at point) followed by ̀k s'
(to rescheduled it to the date at point, with no question.)
The current behavior always ask for a date/time interactively,
but takes the date at point as the current date, which makes it
fast enough.
Thanks to Nick Dokos for raising concerns about this.
* org-agenda.el (org-agenda-add-time-grid-maybe): Use the
correct number of parameters for `org-agenda-format-item'.
Add a docstring.
Thanks to Nick Dokos for hunting this issue thoroughly.
* org.el (org-outline-level): Go at the beginning of the
headline first to always return a sensible result.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Return the
correct level depending on `org-odd-levels-only'.
* org-agenda.el (org-agenda-prefix-format): A new specifier
`%l' allows to insert X spaces when the item is of level X.
(org-search-view, org-get-entries-from-diary)
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled)
(org-agenda-get-blocks, org-agenda-change-all-lines): Add a
new text property 'level, a string with as many whitespaces as
the level of the item.
(org-agenda-format-item, org-compile-prefix-format): Handle
the new `%l' specifier.
This new specifier allows to have a visual clue about the level
of the item in agenda views.
* org-capture.el (org-capture-use-agenda-date): New option.
(org-capture): Use it.
* org-agenda.el (org-agenda-capture): New command.
(org-agenda-mode-map): Bind it to `k'.
(org-agenda-menu): Add it to the menu.
* org.texi (Agenda commands): Document the new command and the
new option.
Thanks to Eric Abrahamsen who suggested this change, along with
other merging about bulk actions.
* org-agenda.el (org-agenda-bulk-action): Possibly use the day
at point to reset the scheduled or deadline cookie. On date
headers, use it without prompting the user. On an item, use
the item's date as the default prompt for `org-read-date'.
* org-agenda.el (org-agenda-span-to-ndays): Make the second
argument `starting-day' optional.
(org-agenda-goto-date): Keep parameters of custom agendas.
* org-agenda.el (org-agenda-list): Allow setting the agenda
buffer name through a temporary variable.
(org-agenda-buffer-tmp-name): New variable to temporary store
the agenda buffer name.
Thanks to Rainer Stengele for reporting this bug.
* org-agenda.el (org-agenda-goto-date): Fix behavior when
using sticky agendas.
Thanks to Charles Philip Chan and Rainer Stengele who reported
problems about this.
* org-agenda.el (org-diary): Don't check whether there is an
agenda buffer when trying to compile the prefix format.
(org-compile-prefix-format): Check if there is an agenda
buffer. If not, use the current buffer.
* org-agenda.el (org-agenda-get-day-entries): Set the agenda
buffer inconditionnally.
For example, when `org-agenda-get-day-entries' is called
through ̀org-diary', we need to make sure `org-agenda-buffer'
is set, otherwise org-diary triggers an error.
* org-agenda.el (org-class): Allow to use holiday strings for
the `skip-weeks' arguments.
Thanks to Enda for this suggestion.
For example, this task will now be skipped only on new year's day:
* Task
<%%(org-class 2012 1 1 2013 12 12 2 "New Year's Day")>
Remove some duplicate declarations.
When the variable is declared in another file,
use (defvar [var]). When it is dynamically bound
in this file (defvar [var]) is enough, but mixed
installations make (defvar [var] [val]) safer.
* org-agenda.el (org-agenda-local-vars): Remove
̀org-agenda-last-arguments' from the list of local variables.
(org-agenda-mode-map): `g' does the same than `r' in buffers
with only one agenda view, but its behavior differs when there
are several views. In manually appended agendas (with `A'),
`g' displays only the agenda under the point. With multiple
agenda blocks, `g' reinitializes the view by discarding any
temporary changes (e.g. with ̀f' or `w'), while ̀r' keeps those
temporary changes for the agenda view under the point.
(org-agenda-run-series, org-agenda-redo): Implement the above
changes.
(org-agenda-mark-header-line): Don't set useless properties.
(org-agenda-list, org-todo-only, org-search-view)
(org-todo-list, org-tags-view, org-agenda-list-stuck-projects)
(org-agenda-manipulate-query, org-agenda-goto-today)
(org-agenda-later, org-agenda-change-time-span): Use text
properties for storing the last command and the last arguments
for each agenda block.
(org-unhighlight-once): Delete.
* org-agenda.el (org-agenda-pre-window-conf): Rename from
`org-pre-agenda-window-conf'.
(org-agenda-local-vars, org-agenda-prepare-window)
(org-agenda-Quit, org-agenda-quit): Use the new name.
* org-agenda.el (org-keys, org-match): New variable,
dynamically scoped in `org-agenda'.
(org-agenda, org-agenda-list, org-search-view, org-todo-list)
(org-tags-view): Use the new variables.
(org-batch-store-agenda-views): Let-bind `match'.
* org-agenda.el (org-search-view, org-todo-list)
(org-tags-view): Do not let `org-agenda-sticky' prevent the
use of these functions programmatically. Also use the sticky
agenda function correctly.
* org-agenda.el (org-agenda-fit-window-to-buffer): Rename from
`org-fit-agenda-window'.
(org-agenda-run-series, org-agenda-prepare, org-agenda-list)
(org-search-view, org-todo-list, org-tags-view): Use the new
name.
* org-agenda.el (org-agenda-list): Fix bug: don't throw an
error when called from programs as (org-agenda-list).
Thanks to Rainer Thiel for reporting this bug.
* org-agenda.el (org-agenda): In sticky agendas, use the
current command's match to set the buffer name. This gives
more information to the user and allows to distinguish various
agendas triggered by the same key.
(org-batch-store-agenda-views): Handle the new sticky agenda
buffer name.
* org-agenda.el (org-agenda-overriding-cmd)
(org-agenda-multi-current-cmd)
(org-agenda-multi-overriding-arguments): New variables.
(org-agenda-run-series): `org-agenda-overriding-arguments'
defaults to the last agenda block arguments, so don't use it
globally.
(org-agenda-mark-header-line): Add properties needed so that
`org-agenda-overriding-arguments', `org-agenda-current-span'
and `org-agenda-last-arguments' can be set to their correct
contextual value.
(org-agenda-multi-back-to-pos): New variable.
(org-agenda-later): Retrieve `org-agenda-current-span' and
`org-agenda-overriding-arguments' from text properties. Also
handle numeric span.
(org-agenda-later, org-agenda-change-time-span): Set
`org-agenda-overriding-cmd' so that we to take overriding
arguments into account for this command only.
The behavior for agenda blocks where there is only one (agenda)
command is not changed. Changing the time span and redoing with
`g' will keep the new time span. The behavior changed for blocks
where there are multiples (agenda) blocks. In this case, redoing
will restore the initial view (before any time span change) and
changing the time span is done independantly for each block.
Thanks to Charles Philip Chan for reporting this nasty bug.
The previous related commit was to prevent an error
when M-x org-reload RET was reloading org files from
an ELPA directory. We now autoload the function so
that it is know by the time org-reload might be called.
* org-agenda.el (org-agenda-kill, org-agenda-archive-with):
Fix bug when called with a non-nil value of `org-agenda-stick'.
Thanks to Moritz Ulrich for reporting this.
* org-agenda.el (org-prepare-agenda-window): Use
`org-pre-agenda-window-conf' if already set.
(org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil
when quitting.
(org-agenda-quit): Ditto.
Thanks to Moritz Ulrich for reporting a bug about this.
* org.el (org-contextualize-keys): Rename from
`org-contextualize-agenda-or-capture'. Fix normalization to
handle empty key replacement string.
(org-contextualize-validate-key): Rename from
`org-contexts-validate'. Allow checking against a custom
function.
* org-agenda.el (org-agenda-custom-commands-contexts): Update.
(org-agenda): Use `org-contextualize-keys'.
* org-capture.el (org-capture-templates-contexts): Ditto.
* org.texi (Templates in contexts, Setting Options): Update to
reflect changes in how contexts options are processed.
* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.
* org-capture.el (org-capture-templates-contexts): Allow to
use the context as a way to replace one capture template by
another one.
* org-agenda.el (org-agenda-custom-commands-contexts): Allow
to use the context as a way to replace one agenda custom
command by another one.
* org.texi (Templates in contexts): Document the new structure
of the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.
In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files. A and B are
deactivated by default in all files.
(setq org-capture-templates
'(("X" "Nothing but an alias")
("A" "AAAA" entry (file+headline [...]))
("B" "BBBB" entry (file+headline [...]))))
(setq org-capture-templates-contexts
'(("A" "A" ((not-in-file . ".*")))
("B" "B" ((not-in-file . ".*")))
("X" "A" ((in-file . "\\.txt")))
("X" "B" ((in-file . "\\.el")))))
Thanks to Carsten for suggesting this "key-replacement" idea!
* org.el (org-contextualize-agenda-or-capture)
(org-rule-validate): New functions, implement context
filtering for agenda commands and capture templates.
* org-agenda.el (org-agenda-custom-commands-contexts): New
option.
(org-agenda): Use it.
* org-capture.el (org-capture-templates-contexts): New option.
(org-capture-select-template): Use it.
* org.texi (Templates in contexts): Document the new option
`org-capture-templates-contexts'.
(Storing searches): Document the new option
`org-agenda-custom-commands-contexts'.
This idea comes from Sylvain Rousseau, who implemented a similar
feature with org-context.el: https://github.com/thisirs/org-context
This implementation is a bit simpler and more general. Simpler
because it relies on existing templates, no need to define other
contextual ones. More general because contexts can be defined
wrt files and modes.
Thanks *very much* to Sylvain for paving the way -- certainly a
great addition to Org.
* org-agenda.el (org-prepare-agenda): Minor code clean-up.
(org-agenda-filter-by-category): Filtering must be turned off
only when a category filter has been set and this filter is
not empty.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Add the 'warntime as a text
property, getting its value from the APPT_WARNTIME property.
(org-agenda-to-appt): Use the 'warntime text property.
Thanks to Ivan Kanis for reporting a bug related to this.
* org.el (org-compute-latex-and-specials-regexp)
(org-paste-subtree, org-sort-entries, org-store-link)
(org-open-at-point, org-file-remote-p, org-add-log-setup)
(org-set-tags-to, org-fast-tag-selection)
(org-diary-sexp-entry): Ditto.
* org-agenda.el (org-agenda-get-blocks, org-cmp-priority)
(org-cmp-effort, org-cmp-todo-state, org-cmp-alpha)
(org-cmp-tag, org-cmp-time): Remove useless (t nil) sexps at
the end of (cond ...) constructs.
* org-mobile.el (org-mobile-create-index-file): Ditto.
* org-lparse.el (org-lparse-format-table-row): Ditto.
* org-list.el (org-sort-list): Ditto.
* org-id.el (org-id-get): Ditto.
* org-html.el (org-export-html-preprocess): Ditto.
* org-exp.el (org-default-export-plist)
(org-table-clean-before-export): Ditto.
(t nil) in (cond (...) (...) (t nil)) has no other meaning that to
remind the developer that the cond sexp returns nil in case no condition
is matched. For several (cond ...) constructs this is obvious from reading
the code. For others, the reminder might be useful and we leave it.
See the discussion about this on emacs-devel:
http://thread.gmane.org/gmane.emacs.devel/152664
* org-agenda.el (org-agenda-list): Ensure that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to `rtnall' before checking if the latter is emtpy.
In the case where rtnall is empty (no item for current day), we do not
call org-agenda-add-time-grid-maybe. This seems bogus because that
function is already computing whether the time grid must be included,
and does so according to the user's preferences.
In particular, the `org-agenda-time-grid' variable has a
'require-timed' parameter controlling the visibility of the time grid.
So, this patch :
- removes the premature check for rtnall being empty,
- inconditionally calls org-agenda-add-time-grid-maybe,
- and finally checks the emptiness of the resulting list
before pretty printing.
TINYCHANGE
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-show-priority' to `C-c,' instead of `P'.
(org-agenda-next-item, org-agenda-previous-item): New
commands to move by one item down/up in the agenda.
(org-agenda-mode-map): Bind `org-agenda-next-item' and
`org-agenda-previous-item' to `N' and `P' respectively.
Thanks to Eric Abrahamsen for this idea and a first patch.
* org.el (org-speed-commands-default): New speedy command to
quickly add the :APPT_WARNTIME: property.
* org-agenda.el (org-agenda-to-appt): Use the :APPT_WARNTIME:
property to override `appt-message-warning-time' when adding
an appointment from an entry.
* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and
its use in `org-agenda-to-appt'.
This feature has been suggested, along with preliminary patches,
by Ivan Kanis. Thanks!
* org-agenda.el (org-batch-store-agenda-views): Use the sticky
agenda buffer name, if required.
(org-agenda-write): New parameter `agenda-bufname' to allow
setting the agenda buffer name.
Thanks to François Allisson for reporting this bug.
* org-agenda.el (org-agenda-start-with-log-mode): Add relevant
customization types.
Thanks to John Wiegley for raising this issue and to Carsten for
directions.
setting `org-habit-show-all-today' to t.
* lisp/org-agenda.el (defvar org-habit-show-all-today): new variable
(org-agenda-get-scheduled): show all habits if user wants it
* lisp/org-habit.el (defcustom org-habit-show-all-today): new variable
* lisp/org-agenda.el (org-agenda-list): Ensures that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to ̀rtnall' before checking if the latter is emtpy.
In the case where `rtnall' is empty (no item for current day),
we do not call `org-agenda-add-time-grid-maybe'. This seems
bogus because that function is already computing whether the
time grid must be included, and does so according to the
user's preferences.
In particular, the `org-agenda-time-grid' variable has a
`require-timed' parameter controlling the visibility of the
time grid.
So, this patch :
- removes the premature check for `rtnall' being empty,
- inconditionally calls `org-agenda-add-time-grid-maybe',
- appends the result to `rtnall',
- and finally checks the emptiness of the resulting list
before pretty printing.
TINYCHANGE
* lisp/org-agenda.el: Replace with-no-warnings with
org-no-warnings (defined in org-macs.el).
* lisp/org-bbdb.el: Replace with-no-warnings with
org-no-warnings (defined in org-macs.el).
* lisp/org-clock.el: Replace with-no-warnings with
org-no-warnings (defined in org-macs.el).
* lisp/org.el: Replace with-no-warnings with org-no-warnings (defined
in org-macs.el).
* org-agenda.el (org-agenda-get-timestamps): Remove any
active timestamp from the headline text, not only those for
the current date.
Thanks to SW, Nick Dokos, Samuel Wales and Brian van den Broek
for inputs about this.
* org-agenda.el (org-agenda-mode-map): New keybinding ̀*' to
mark all entries for bulk action.
(org-agenda-menu): New menu item for marking all entries.
(org-agenda-bulk-mark-all): New function to mark all entries.
(org-agenda-bulk-mark-regexp): Minor docstring fix.
(org-agenda-bulk-unmark): With a prefix argument, unmark all.
Also send a better message.
(org-agenda-bulk-remove-all-marks): Rename to
`org-agenda-bulk-unmark-all'. Check against
`org-agenda-bulk-marked-entries' before trying to unmark
entries. Minor docstring fix.
(org-agenda-bulk-unmark-all): Renamed from
̀org-agenda-bulk-remove-all-marks'.
* org-agenda.el (org-agenda-persistent-marks): New option to
keep marks after a bulk action. The option defaults to nil.
(org-agenda-bulk-action): Use the new option.
* org.texi (Agenda commands): Document persistent marks.
* lisp/org-agenda.el (org-agenda-skip-timestamp-if-deadline-is-shown):
Skip timestamp items in agenda view if item is already shown as a
deadline item.
(org-agenda-skip-dealine-if-done): Pass deadline results to
org-agenda-get-timestamps.
(org-agenda-get-timestamps): Optionally take list of deadline results,
so that timestamp results can be skipped if already included in
deadline results.
* lisp/org-agenda.el (org-agenda-diary-sexp-prefix): Regexp matching
deadline/scheduling information to be displayed in diary sexp agenda
items.
(org-agenda-get-sexps): Extract deadline/scheduling information from
diary sexp entries.
* org-agenda.el (org-toggle-sticky-agenda): Only shout a
message when called interactively.
(org-agenda-get-restriction-and-command): Call
`org-toggle-sticky-agenda' interactively.
* org-agenda.el (org-agenda-top-category-filter): New variable
for storing the current top-category filter.
(org-agenda-redo): Apply a top-category filter, if any.
(org-agenda-filter-by-top-category)
(org-agenda-filter-top-category-apply): Set
`org-agenda-top-category-filter' to the right value.
Thanks to John Wiegley for reporting this.
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.
Problem here was that `org-agenda-bulk-toggle' calls
`org-agenda-bulk-mark' with no parameters; however, the (max arg 1)
call inside `org-agenda-bulk-mark' will fail with no parameter.
TINYCHANGE
* org.el (org-repeat-re)
(org-clone-subtree-with-time-shift, org-auto-repeat-maybe)
(org-deadline, org-schedule, org-matcher-time)
(org-time-stamp, org-read-date, org-read-date-get-relative)
(org-display-custom-time, org-get-wdays)
(org-time-string-to-absolute, org-closest-date)
(org-timestamp-change): Allow to set hourly repeat cookie.
Send an error when an hourly repeat cookie is set and no hour
is specified in the timestamp.
* org.texi (Repeated tasks): Document repeat cookies for
years, months, weeks, days and hours.
* org-agenda.el (org-agenda-get-timestamps): Match hourly
repeat cookies.
* org-icalendar.el (org-print-icalendar-entries): Handle
hourly repeat cookies.
Thanks a lot to Takafumi Arakaki for this idea and for a preliminary
version of this patch.
* lisp/org-agenda.el (org-agenda-skip-if, org-agenda-skip-if-todo):
Add new todo-unblocked and nottodo-unblocked skip conditions. These
match as for todo and nottodo, but only for unblocked todo items.
TINYCHANGE
This patch adds two new tests to `org-agenda-skip-if': 'todo-unblocked
and 'nottodo-unblocked. These match like 'todo and 'nottodo, but only on
unblocked todo items. This type of test is useful when compiling custom
agenda views containing lists of currently actionable todo items.
Whilst it's possible to code such tests in `org-agenda-custom-commands'
directly (well, Elisp is Turing-complete: you can in principle code
anything!), it's far less convenient than a simple `org-agenda-skip-if'
test which can reuse much of the existing machinery.
Note that the attached patch applies on top of my other "Fix
org-agenda-skip-if bug" patch, though this new feature is independent of
that bug-fix.
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.
Problem here was that `org-agenda-bulk-toggle' calls
`org-agenda-bulk-mark' with no parameters; however, the (max arg 1)
call inside `org-agenda-bulk-mark' will fail with no parameter.
TINYCHANGE