Commit Graph

1498 Commits

Author SHA1 Message Date
Bastien Guerry bb61df9d91 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-06-12 15:08:53 +02:00
Bastien Guerry 2e9c2d7128 org-agenda.el: Fix bug when redoing sticky agendas with log mode and/or clockreport mode on
* org-agenda.el (org-agenda-mode): Let `org-agenda-redo' DTRT
when agenda are sticky.
(org-agenda-tag-filter-while-redo): Delete.
(org-agenda-list, org-agenda-redo, org-agenda-filter-by-tag):
Remove unused code.
(org-agenda-clockreport-mode, org-agenda-set-mode-name): Don't
consider tag filters.

Thanks to Bernt Hansen for reporting this.
2014-06-12 15:07:35 +02:00
Bastien Guerry 4014947f31 Merge branch 'maint' 2014-06-12 12:05:00 +02:00
Bastien Guerry 30220ffcdc Prefer `set-window-start' over `recenter' in some places.
* org-agenda.el (org-agenda-show-1):
* org-table.el (org-table-show-reference):
* org.el (org-fix-ellipsis-at-bol)
(org-first-headline-recenter): Use `set-window-start' instead
of `recenter'.

* org-agenda.el (org-recenter-heading): Delete.
2014-06-12 12:04:24 +02:00
Bastien Guerry 3969268e2a Merge branch 'maint' 2014-06-02 20:00:20 +02:00
Bastien Guerry 6f64027fee org-agenda.el (org-agenda-custom-commands-local-options): Fix misquoted values
* org-agenda.el (org-agenda-custom-commands-local-options):
Fix misquoted values.

Thanks to Thomas Morgan for reporting this.
2014-06-02 19:59:36 +02:00
Bastien Guerry 75ca2a0e0d org-agenda.el (org-agenda-todo): Mark the clocking task
* org-agenda.el (org-agenda-todo): Mark the clocking task.
2014-05-31 14:32:06 +02:00
Bastien Guerry 9f5e698679 org-agenda.el (org-agenda-goto): Go to the beginning of the true heading of the entry at point
* org-agenda.el (org-agenda-goto): Go to the beginning of the
true heading of the entry at point.  Update docstring.
2014-05-30 19:28:04 +02:00
Bastien Guerry a060fb0a08 Merge branch 'maint' 2014-05-30 14:02:46 +02:00
Bastien Guerry c53aeda585 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix docstring
* org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
docstring.

Thanks to Nikolai Weibull for reporting this.
2014-05-30 13:58:50 +02:00
Bastien Guerry 8772a2eb49 Merge branch 'maint' 2014-05-29 09:57:34 +02:00
Bastien Guerry ee9053ee04 org-agenda.el (org-agenda-finalize): Remove duplicate check for 'org-hd-marker
* org-agenda.el (org-agenda-finalize): Remove duplicate check
for 'org-hd-marker.
2014-05-29 09:57:19 +02:00
Bastien Guerry ab857a3b80 Fix aa86e4bc again 2014-05-28 21:20:29 +02:00
Bastien Guerry 9022b4c5e1 Fix aa86e4bc
Thanks to Achim Gratz for pointing this.
2014-05-28 21:15:44 +02:00
Bastien Guerry aa86e4bc9f org-agenda.el: Implement new effort filter
* org-agenda.el (org-agenda-custom-commands-local-options):
Add `org-agenda-effort-filter-preset'.
(org-agenda-filter-effort-default-operator): Delete.
(org-agenda-local-vars): Add `org-agenda-effort-filter'.
(org-agenda-mode-map): Use "_" to filter by effort.
(org-agenda-effort-filter, org-agenda-effort-filter-preset):
New variables.
(org-agenda-prepare-window, org-agenda-prepare)
(org-agenda-finalize, org-agenda-redo)
(org-agenda-filter-remove-all, org-agenda-filter-apply)
(org-agenda-set-mode-name, org-agenda-reapply-filters): Handle
effort filter.
(org-agenda-finalize-entries): Use
`org-sort-agenda-noeffort-is-high'.
(org-agenda-limit-entries): Get the property from the correct
location.
(org-agenda-limit-interactively): Throw a user error on wrong
input.
(org-agenda-filter-by-effort): New command.
(org-agenda-filter-by-tag): Don't filter by effort.
(org-agenda-filter-make-matcher): Handle effort filter.
(org-agenda-compare-effort): Don't handle the "?" operator.
(org-agenda-filter-show-all-effort): New command.

Note: This calls for some refactoring in the filter area.
2014-05-28 12:26:54 +02:00
Bastien Guerry 5fbdbb2bd5 org-agenda.el (org-agenda-limit-interactively): Enhance
* org-agenda.el (org-agenda-finalize-entries): Remove spurious
variable in the (let ...) construct.
(org-agenda-limit-interactively): Allow to remove the
limitation by passing a universal prefix argument.  Enhance
the prompt.
2014-05-27 16:51:33 +02:00
Bastien Guerry 687a65de70 Fix typo in previous commit 2014-05-26 15:44:53 +02:00
Bastien Guerry b622300c0c Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-05-26 15:32:13 +02:00
Bastien Guerry cbce904187 org-agenda.el: Fix bug wrt `org-agenda-persistent-filter'
* org-agenda.el (org-agenda-prepare-window): New parameter
`filter-alist' to set the filters correctly when
`org-agenda-persistent-filter' is on.
(org-agenda-prepare): Use the new parameter for
`org-agenda-prepare-window'.

Thanks to Thomas Morgan for reporting this.
2014-05-26 15:29:02 +02:00
Bastien Guerry 319b09a1c4 Merge branch 'maint' 2014-05-26 14:56:38 +02:00
Bastien Guerry 54ab137689 Fix bug when update timestamps on filtered agenda entries
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.

* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.

Thanks to Thomas Morgan for reporting this.
2014-05-26 14:55:50 +02:00
Bastien Guerry 8d0da67ea0 Merge branch 'maint' 2014-05-26 07:36:06 +02:00
Bastien Guerry 061904b58e org-agenda.el (org-get-time-of-day): Don't return time string from within links
* org-agenda.el (org-get-time-of-day): Don't return time
string from within links.

Thanks to Thomas Morgan for reporting this.
2014-05-26 07:35:24 +02:00
Nicolas Goaziou fdb40fbe01 org-agenda: Tiny fix
* lisp/org-agenda.el (org-agenda-format-item): Check if string isn't
  empty before searching for text properties.
2014-05-25 23:33:17 +02:00
Bastien Guerry 866d7eddd0 org-agenda.el (org-agenda-set-restriction-lock): Remove restriction lock before setting it
* org-agenda.el (org-agenda-set-restriction-lock): Remove
restriction lock before setting it.

This fixes a small bug: when restriction lock is active on a subtree
and C-c C-x < before the first headline, the new restriction is set to
the entire file, but the old one was still present.
2014-05-25 07:16:15 +02:00
Bastien Guerry d978a9e585 org-agenda.el (org-agenda-format-item): Don't add the 'effort and 'effort-minutes text properties
* org-agenda.el (org-agenda-format-item): Don't add the
'effort and 'effort-minutes text properties as they are
already accessible through the 'txt property of agenda lines.

* org-clock.el (org-clock-in): Refresh both the 'effort and
'effort-minutes text properties.

* org-rmail.el (rmail, rmail-file-name): Silent byte-compiler.

* org.el (org-refresh-properties): Allow to set several text
properties by passing an alist to the TPROP argument.
(org-set-effort, org-property-next-allowed-value): Use 'effort
instead of 'org-effort.
(org-agenda-prepare-buffers): Update both 'effort and
'effort-minutes.
(org-mark-jump-unhide): Move up to silent the byte-compiler.
2014-05-23 16:51:55 +02:00
Bastien Guerry 45c4f276f2 org.el: Implement agenda sorting against stats cookies. Code cleanup
* org.el (org-refresh-category-properties): Don't put the
'org-category-position property.
(org-refresh-stats-properties): New function.
(org-agenda-ignore-properties): Rename from
`org-agenda-ignore-drawer-properties', which is now obsolete.
Allow to use 'stats.
(org-agenda-prepare-buffers): Check stats properties.
(org-get-at-bol): Make a defsubst.
(org-get-at-eol): New function.

* org-agenda.el (org-entries-lessp): Sort by statistic
cookies.
(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): Don't set
the 'org-category and 'org-category-pos text properties.
'org-category-pos is useless and 'org-category is set through
`org-agenda-format-item'.
(org-agenda-format-item): Remove useless code.
(org-cmp-priority): Delete.
(org-cmp-values): New function to compare text properties
values.
(org-cmp-effort, org-agenda-to-appt): Check against the end of
the line.
(org-agenda-filter-by-category, org-agenda-filter-apply)
(org-agenda-change-all-lines): Use `org-get-at-eol'.
2014-05-23 15:54:50 +02:00
Bastien Guerry 0f0fa81dd0 Merge branch 'maint' 2014-05-23 13:43:18 +02:00
Bastien Guerry 1d57e1ac9a org-agenda.el (org-agenda-remove-filter): Use `save-excursion'
* org-agenda.el (org-agenda-remove-filter): Use `save-excursion'.
2014-05-23 13:43:11 +02:00
Bastien Guerry 2ce78ef45b Merge branch 'maint' 2014-05-22 21:15:44 +02:00
Bastien Guerry cece23b664 org-agenda.el (org-cmp-ts): Fix call to `type'
* org-agenda.el (org-cmp-ts): Argument `type' is not optional.
Don't quote it.
2014-05-22 21:15:01 +02:00
Bastien Guerry 9a6234ff81 Merge branch 'maint' 2014-05-22 13:39:13 +02:00
Bastien Guerry 3a262e12e2 org-agenda.el: Fixes for top headline filtering
* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-top-headline-filter'.
(org-agenda-filter-by-category): Fix syntax.
(org-agenda-filter-show-all-top-filter): New function.
(org-agenda-filter-by-top-headline)
(org-agenda-filter-remove-all): Use the new function.
(org-agenda-filter-top-headline-apply): Use a dedicated symbol
`top-headline'.

Thanks to Greg Troxel who provided a preliminary patch.
2014-05-22 13:37:27 +02:00
Bastien Guerry 92d84410ef Merge branch 'maint' 2014-05-22 12:56:18 +02:00
Konstantin Kliakhandler 445a8ec66e org-agenda.el (org-agenda-redo): Reapply the filters correctly
* org-agenda.el (org-agenda-redo): Reapply the filters
correctly.

TINYCHANGE
2014-05-22 12:55:30 +02:00
Bastien Guerry 5eee6bbe6f Merge branch 'maint' 2014-05-22 11:50:47 +02:00
Bastien Guerry cdf9a09fc2 org-agenda.el: Rewrite agenda filtering using text properties
* org-agenda.el (org-agenda-write): Code cleanup.
(org-agenda-mark-filtered-text)
(org-agenda-unmark-filtered-text)
(org-agenda-fix-tags-filter-overlays-at): Delete.
(org-agenda-remove-marked-text): Use the `property' argument
instead of hard-coding 'org-filtered.
(org-agenda-filter-remove-all): Use `org-agenda-finalize'.
(org-agenda-filter-hide-line): Rewrite using text properties
instead of overlays.
(org-agenda-remove-filter): New function.
(org-agenda-filter-show-all-tag)
(org-agenda-filter-show-all-cat)
(org-agenda-filter-show-all-re): Rewrite using
`org-agenda-remove-filter'.
2014-05-22 11:50:26 +02:00
Achim Gratz e8e8f6738a Merge branch 'maint' 2014-05-03 10:15:42 +02:00
Bastien Guerry 9efbfb34cb org-agenda.el (org-agenda-error): Use `user-error'
* org-agenda.el (org-agenda-error): Use `user-error'.
2014-05-02 15:31:55 +02:00
Bastien Guerry a52fcbf988 org-agenda.el: Fix some type strings
* org-agenda.el (org-agenda-max-todos, org-agenda-max-tags)
(org-agenda-max-effort): Fix type strings.
2014-05-02 15:30:46 +02:00
Bastien Guerry 51fed2bd9b Merge branch 'maint' 2014-04-23 08:11:45 +02:00
Bastien Guerry e1e5c0776a org-agenda.el (org-agenda-finalize): Filter by top headline
* org-agenda.el (org-agenda-finalize): Filter by top headline
if `org-agenda-top-headline-filter' is set.

Thanks to Brady Trainor for reporting this.
2014-04-23 08:11:29 +02:00
Bastien Guerry 977b611250 Merge branch 'maint' 2014-04-22 15:24:28 +02:00
Bastien Guerry 1fa6ccab10 Complete fix 369e3d77 2014-04-22 15:24:14 +02:00
Bastien Guerry 03876f116d Merge branch 'maint' 2014-04-21 21:56:44 +02:00
Bastien Guerry 369e3d77d0 org-agenda.el (org-agenda-search-view): Fix tag
* org-agenda.el (org-agenda-search-view): Fix tag.

Thanks to Brady Trainor for reporting this.
2014-04-21 21:56:28 +02:00
Bastien Guerry 9dd664c27e org-agenda.el (org-agenda-error): Add docstring
* org-agenda.el (org-agenda-error): Add docstring.
2014-04-19 10:04:21 +02:00
Bastien Guerry b3f18b310b Merge branch 'maint' 2014-04-17 10:20:32 +02:00
Bastien Guerry f2ec685008 Fix previous commit 2014-04-17 10:18:32 +02:00
Bastien Guerry 3f3a8f4616 Merge branch 'maint' 2014-04-17 09:56:11 +02:00
Bastien Guerry 63e9763b2a org-agenda.el (org-agenda-finalize): Apply all filters correctly
* org-agenda.el (org-agenda-finalize): Apply all filters
correctly.
2014-04-17 09:55:57 +02:00
Bastien Guerry 2335961c4c Merge branch 'maint' 2014-04-17 02:31:37 +02:00
Bastien Guerry eb0f8afdf4 org-agenda.el: Fix bug when displaying the changed date
* org-agenda.el (org-agenda-mode): Disable `indent-tabs-mode'.
(org-agenda-dim-blocked-tasks): Make overlays intangible.
(org-agenda-show-new-time): Fix bug when deleting a timestamp
right after changing it.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)
(org-agenda-get-sexps, org-agenda-filter-by-regexp)
(org-agenda-filter-top-headline-apply): Fix indentation.

Thanks to Fletcher Charest and Nick Dokos for reporting issues
in this area.

There is one bug left: in a filtered agenda, changing a timestamp
will not always correctly display the warning.  This happens when
the headline at point is followed by hidden headlines, because
`org-agenda-show-new-time' tries to set a text property at a
point where there is an overlay that hides then text.  Because
the overlay is now intangible, the warning text will be displayed
too far on the right, and may be outside of the window.
2014-04-17 02:31:23 +02:00
Bastien Guerry 11f7fe8408 Merge branch 'maint' 2014-04-17 00:35:39 +02:00
Bastien Guerry 241764b2d1 Revert "org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas"
This reverts commit 3559ff84b2.
2014-04-17 00:35:14 +02:00
Bastien Guerry 1f155ef1e7 Merge branch 'maint' 2014-03-25 21:47:02 +01:00
Bastien Guerry e330027ac1 org-agenda.el (org-agenda-show-new-time): Don't use `move-beginning-of-line'
* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.

Thanks to Matt Lundin for reporting this.
2014-03-25 21:46:50 +01:00
Bastien Guerry 0e3b49e3e1 Merge branch 'maint' 2014-03-20 17:08:39 +01:00
Bastien Guerry 3559ff84b2 org-agenda.el: Fix bug when using `org-agenda-do-date-later' in filtered agendas
* org-agenda.el (org-agenda-filter-hide-line): Hide from the
beginning of the line to the beginning of the next line.
(org-agenda-show-new-time): Use `move-beginning-of-line' and
`move-end-of-line'.
(org-agenda-drag-line-forward): Adapt to the new definition of
hidden filtered lines.

Thanks to Igor Sosa Mayor for reporting this bug and to Nick Dokos
and Matt Lundin for providing further information.
2014-03-20 17:07:03 +01:00
Bastien Guerry 613333d665 Merge branch 'maint' 2014-03-20 15:07:11 +01:00
Bastien Guerry a3ec854cab Fix bugs wrt invisibility handline.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.

* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.

* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.

This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.

Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
2014-03-20 15:04:49 +01:00
Bastien Guerry 5d0e706836 org-agenda.el (org-agenda-switch-to): Ensure point is at the beginning of the heading
* org-agenda.el (org-agenda-switch-to): Ensure point is at the
beginning of the heading.
2014-03-20 00:05:04 +01:00
Bastien Guerry 35f27a1fe5 Merge branch 'maint' 2014-03-18 21:00:40 +01:00
Bastien Guerry 6ba3b2d03d org-agenda.el (org-agenda-todo): Restore the window correctly
* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.

`org-agenda-change-all-lines' is narrowing to the line it needs to
update.  In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed.  We
use `save-window-excursion' to ensure the window state is restored
correctly.

Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
2014-03-18 20:54:02 +01:00
Bastien Guerry 0b1d8c40ea Merge branch 'maint' 2014-03-18 17:23:56 +01:00
Bastien Guerry c16e09e158 org-agenda.el (org-agenda-open-link): Bugfix
* org-agenda.el (org-agenda-open-link): Don't throw an error
when trying to open a link when the point is on a place that
is not associated with a buffer.
2014-03-18 17:23:45 +01:00
Bastien Guerry e75d2031bc Merge branch 'maint' 2014-03-14 12:07:06 +01:00
Markus Hauck 62d759e3c9 Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline
* lisp/org-agenda.el (org-agenda-get-scheduled): If
  `org-agenda-skip-scheduled-if-deadline-is-shown' is set to
  'repeated-after-deadline, still show tasks without any deadline

The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task.  This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.

TINYCHANGE
2014-03-14 12:03:07 +01:00
Bastien Guerry bca8a49363 Merge branch 'maint' 2014-03-13 12:50:18 +01:00
Bastien Guerry 23b98ac01e org-agenda.el (org-agenda-list-stuck-projects): Fix bug
* org-agenda.el (org-agenda-list-stuck-projects): Bugfix: set
`org-agenda-buffer-name'.

Thanks to Sébastien Vauban for reporting this.
2014-03-13 12:50:09 +01:00
Bastien Guerry 4d835d719d Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-03-12 19:14:03 +01:00
Bastien Guerry ccd1d1a198 org-agenda.el (org-agenda-skip-subtree-if): Fix docstring
* org-agenda.el (org-agenda-skip-subtree-if): Fix docstring.
2014-03-12 16:44:08 +01:00
Bastien Guerry fb8a042887 org-agenda.el (org-agenda-custom-commands-contexts): Fix docstring
* org-agenda.el (org-agenda-custom-commands-contexts): Fix docstring.
2014-03-03 17:34:12 +01:00
Bastien Guerry 655e07730b org-agenda.el: Allow to move backward/forward blocks
* org-agenda.el (org-agenda-find-same-or-today-or-agenda): Use
`org-agenda-backward-block'.
(org-agenda-backward-block): Renamed and rewritten from
`org-agenda-goto-block-beginning'.
(org-agenda-forward-block): New command.
(org-agenda-mode-map): Remap `backward-paragraph' and
`forward-paragraph' to `org-agenda-backward-block' and
`org-agenda-forward-block' respectively.

Thanks to Bart Bunting for raising this.
2014-02-05 10:33:03 +01:00
Bastien Guerry cf2c7e9f18 Merge branch 'maint' 2014-01-30 11:59:57 +01:00
Bastien Guerry 7fc6d3df39 org-agenda.el (org-agenda-drag-line-forward): Call`org-agenda-mark-clocking-task' when done
* org-agenda.el (org-agenda-drag-line-forward): Call
`org-agenda-mark-clocking-task' when done.
(org-agenda-mark-clocking-task): Small refactoring.
2014-01-30 11:57:43 +01:00
Bastien Guerry f37904713c Merge branch 'maint' 2014-01-25 14:49:28 +01:00
Bastien Guerry a6b8bdecab Fix e52599
Thanks to Matt Lundin for reporting this.
2014-01-25 14:49:17 +01:00
Bastien Guerry 630096ca6d Merge branch 'maint' 2014-01-20 22:40:42 +01:00
Bastien Guerry e5259962f6 org-agenda.el: Fix buglets
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-toggle-archive-tag)
(org-agenda-todo, org-agenda-priority, org-agenda-clock-in)
(org-agenda-clock-out): Put the cursor back on the correct
column, when possible.
(org-agenda-todo): When `org-clock-out-when-done' is `t', also
remove the current clock overlay.
2014-01-20 22:34:18 +01:00
Bastien Guerry a5a7231304 Merge branch 'maint' 2014-01-16 00:55:46 +01:00
Bastien Guerry e7ebe4163a Fix bf0649 2014-01-16 00:53:28 +01:00
Bastien Guerry b9e1dd8ff8 Merge branch 'maint' 2014-01-12 23:57:08 +01:00
Bastien Guerry bf0649c6fc Agenda: Fix dragging line in filtered agendas
* org-agenda.el (org-agenda-regexp-filter-preset): Fix
typo in docstring.
(org-agenda-reapply-filters): New function.
(org-agenda-drag-line-forward): Rewrite to fix a bug when used
in filtered agendas.
(org-agenda-drag-line-backward): Rewrite using
`org-agenda-drag-line-forward'.

Thanks to Thomas Morgan for reporting this.
2014-01-12 23:56:54 +01:00
Bastien Guerry 213c78f73c Merge branch 'maint' 2014-01-09 00:48:16 +01:00
Bastien Guerry abed7277e1 Backport typo fixes from Emacs revno r115923 2014-01-09 00:47:40 +01:00
Bastien Guerry 3737676632 Update copyright year for files changed since 2013 2014-01-05 06:35:21 +01:00
Bastien Guerry 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 096ff7e078 Merge branch 'maint'
Conflicts:
	contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Bastien Guerry d97c050720 Merge branch 'maint' 2014-01-03 16:04:06 +01:00
Bastien Guerry adb6e545c7 org-agenda.el (org-cmp-ts): Fix bug
* org-agenda.el (org-cmp-ts): Fix bug: interpret `late' as
`later than any date' instead of `later than today'.

Thank to Michael Crouch for reporting this and to Michael Hoffman for
providing the fix.
2014-01-03 16:01:30 +01:00
Bastien Guerry c8bb89faca Merge branch 'maint' 2013-12-30 10:32:24 +01:00
Bastien Guerry 8bb519d934 Fix defcustoms: don't quote const values.
* ob-latex.el (org-babel-latex-htlatex-packages): Use repeat
instead of list as the defcustom type.

* ox.el (org-export-with-creator):
* org.el (org-loop-over-headlines-in-active-region)
(org-mouse-1-follows-link, org-provide-todo-statistics):
* org-agenda.el (org-agenda-custom-commands-local-options)
(org-agenda-start-with-log-mode)
(org-agenda-show-inherited-tags): Don't quote const values.

Thanks to Glenn Morris for reporting this.
2013-12-30 10:30:44 +01:00
Bastien Guerry 9214000c21 Merge branch 'maint'
Conflicts:
	doc/org.texi
2013-11-17 09:17:39 +01:00
Bastien Guerry a6210cc9c2 Backport Paul's fixes from Emacs trunk (1/2)
See http://article.gmane.org/gmane.emacs.diffs/123123
2013-11-17 09:12:41 +01:00
Achim Gratz 54a64f50b5 ob-C, ob-clojure, ob-tangle, org-agenda, org, ox: fix byte-compiler warnings
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
  `org-clock-update-time-maybe´, `org-clock-remove-overlays´,
  `org-babel-tangle-file´, `org-table-blank-field´,
  `org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
  `org-table-end´.  Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
  uses.
2013-11-15 20:18:58 +01:00
Bastien Guerry 668ba5de0e Merge branch 'maint' 2013-11-15 06:56:10 +01:00
Bastien Guerry bf012136bd Remove org-autoload.
* org-macs.el (org-autoload): Delete.

* org-docview.el ("docview"): Fix declarations and require
doc-view directly.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.

Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.
2013-11-15 06:55:28 +01:00
Bastien Guerry 786ebde303 Merge branch 'maint'
Conflicts:
	lisp/ox.el
2013-11-14 14:09:25 +01:00
Bastien Guerry adcebf38f8 Fix errors reported by cus-test.el
* ox.el (org-export-async-init-file): Use :set to set the
default value.

* ox-texinfo.el (org-texinfo-filename): Fix default value.
(org-texinfo-format-headline-function): Use 'ignore as the
default value.
(org-texinfo-format-drawer-function): Use a function as the
default value.  Update docstring.
(org-texinfo-drawer): Always use
`org-texinfo-format-drawer-function' as it is now a function
by default.
(org-texinfo-headline): Compare
`org-texinfo-format-headline-function' against 'ignore.
(org-texinfo-inlinetask): Compare
`org-texinfo-format-inlinetask-function' against 'ignore.

* ox-odt.el (org-odt-format-drawer-function): Use a function
as the default value.  Update docstring.
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function): Fix default value.
(org-odt-with-latex): Use :set to set the default value.
(org-odt-drawer): Always use `org-odt-format-drawer-function'
as it is now a function by default.
(org-odt-format-headline--wrap): Compare
`org-odt-format-headline-function' against 'ignore.

* ox-latex.el (org-latex-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-latex-format-inlinetask-function): Fix default value.
(org-latex-drawer): Always use
`org-latex-format-drawer-function' as it is now a function by
default.
(org-latex-inlinetask): Compare
`org-latex-format-inlinetask-function' against 'ignore.

* ox-html.el (org-html-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-html-format-headline-function)
(org-html-format-inlinetask-function): Fix default value.
(org-html-with-latex): Use :set to set the default value.
(org-html--format-toc-headline)
(org-html-format-headline--wrap): Compare
`org-html-format-headline-function' against 'ignore.
(org-html-inlinetask): Compare
`org-html-format-inlinetask-function' against 'ignore.

* ox-ascii.el (org-ascii-format-drawer-function): Use a
function as the default value.  Update docstring.
(org-ascii-drawer): Always use
`org-ascii-format-drawer-function' as it is now a function by
default.
(org-ascii-format-inlinetask-default): New function.
(org-ascii-format-inlinetask-function): Use
`org-ascii-format-inlinetask-default' as the default.

* org.el (org-mouse-1-follows-link): Use :set to set the
default value.  Update custom type.
(org-log-note-headings): Fix order or list items in the custom
type.
(orgstruct-heading-prefix-regexp): Use an empty string as the
default value.  Use 'regexp as the custom type.
(orgstruct-make-binding): Tiny docstring enhancement.  Assume
`orgstruct-heading-prefix-regexp' is a string.

* org-agenda.el (org-agenda-search-view-max-outline-level):
Set default value to 0.  Update docstring.
(org-agenda-deadline-leaders): Fix custom type.
(org-search-view): Assume
`org-agenda-search-view-max-outline-level' is a number.

* ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.

* ob-python.el (org-babel-python-mode): Use :set to set the
default value.
(org-babel-python-None-to): Fix custom type.

* ob-plantuml.el (org-plantuml-jar-path): Fix default value.
(org-babel-execute:plantuml): Assume `org-plantuml-jar-path'
is a string.

* ob-latex.el (org-babel-latex-htlatex): Fix default value.
(org-babel-latex-htlatex-packages): Fix custom type.
(org-babel-execute:latex): Assume `org-babel-latex-htlatex' is
a string.

Thanks to Glenn Morris for reporting this.
2013-11-14 14:05:18 +01:00
Bastien Guerry f505fa20b4 Merge branch 'maint' 2013-11-12 21:12:42 +01:00
Bastien Guerry f49654aeff org-agenda.el (org-agenda-set-restriction-lock): Autoload
* org-agenda.el (org-agenda-set-restriction-lock): Autoload.
2013-11-12 21:12:28 +01:00
Bastien Guerry 71884cc039 Merge branch 'maint'
Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
2013-11-12 21:00:49 +01:00
Bastien Guerry f95641c443 Backport changes from Emacs revs 115081 and 115082
2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Bastien Guerry 990339ea23 Merge branch 'maint' 2013-11-06 10:02:18 +01:00
Bastien Guerry 2911965bfe org-agenda: Fix bug when showing the new time
* org-agenda.el (org-agenda-show-new-time): Ignore invisible
text when inserting the new time as a text property.

* org-compat.el (org-move-to-column): New argument
`ignore-invisible' to turn on `buffer-invisibility-spec'.

Thanks to Marcin Borkowski and Karl Voit for reporting this.
2013-11-06 09:59:46 +01:00
Bastien Guerry c6381df127 Merge branch 'maint' 2013-11-05 19:42:24 +01:00
Bastien Guerry 8ae106907a org-agenda.el (org-agenda-filter-make-matcher): Fix regression
* org-agenda.el (org-agenda-filter-make-matcher): When
filtering tags and hitting space, filter out entries with
tags, only keep those without tags.

Thanks to Serguei Son for reporting this regression.
2013-11-05 19:41:41 +01:00
Bastien Guerry 6af8e429f8 Merge branch 'maint' 2013-11-04 23:36:32 +01:00
Bastien Guerry 1fad782491 org-agenda.el (org-agenda-drag-line-forward): Fix bugs
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): Fix bugs: don't drag lines
without text and don't drag lines before/after hidden lines.

Thanks to Thomas Morgan for reporting bugs in this area.
2013-11-04 23:36:18 +01:00
Nicolas Goaziou 6202ec7b3b Remove need to declare drawers before using them
* lisp/org-agenda.el (org-agenda-prepare): Remove reference to
  `org-drawers-for-agenda'.
(org-agenda-show-1): Remove reference to `org-drawers'.
* lisp/org-clock.el (org-clock-remove-empty-clock-drawer,
  org-clock-cancel): Apply signature change to
  `org-remove-empty-drawer-at'.
* lisp/org-element.el (org-element--list-struct): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-feed.el (org-feed-drawer): Update docstring according to
  change.
* lisp/org-list.el (org-in-item-p, org-list-context): Use
  `org-drawer-regexp' instead of `org-drawers'.
* lisp/org-mobile.el (org-mobile-create-index-file): Remove reference
  to `org-drawers-for-agenda'.
* lisp/org-pcomplete.el (pcomplete/org-mode/drawer): Remove function.
* lisp/org.el (org-drawer-regexp): Make variable global.
(org-drawers): Remove variable.
(org-set-regexps-and-options): Ignore DRAWER keyword.
(org-cycle): Use `org-drawer-regexp' instead of `org-drawers'.
(org-cycle-hide-drawers): Add an optional argument to ignore some
drawers.
(org-remove-empty-drawer-at): Remove second argument.  Rewrite
function.
(org-clone-subtree-with-time-shift): Apply signature change to
`org-remove-empty-drawer-at'.
(org-toggle-ordered-property): Apply `org-delete-property' signature
change.
(org-map-entries): Remove reference to `org-drawers-for-agenda'.
(org-entry-delete): Remove optional argument.  Small refactoring.
(org-insert-drawer): Remove reference to `org-drawers'.
(org-delete-property): Apply `org-entry-delete' signature change.
(org-in-drawer-p): Rewrite function.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-org.el: Update tests.
* testing/lisp/test-ox.el: Update tests.
2013-10-31 21:19:40 +01:00
Carsten Dominik dd57a31283 Honor user request for full-frame agenda window
* lisp/org-agenda.el (org-agenda-fit-window-to-buffer): Enforce
value 1.0 for minimum window height.
2013-09-25 13:22:56 +02:00
Carsten Dominik a7448b0c12 Add fortnight view to agenda
* 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.
2013-09-13 07:54:42 +02:00
Bastien Guerry 2629b767b1 Merge branch 'maint' 2013-07-05 14:30:59 +02:00
Bastien Guerry ce08e04629 org-agenda.el (org-agenda-archive-with): Save window excursion
* org-agenda.el (org-agenda-archive-with): Save window
excursion.
2013-07-05 14:29:51 +02:00
Bastien Guerry 163350117b Merge branch 'maint' 2013-07-01 09:41:40 +02:00
Vladimir Lomov 5e5d89ac10 Fix commit 6abc11.
TINYCHANGE
2013-07-01 09:40:54 +02:00
Bastien Guerry 2ccd6d9887 Merge branch 'maint' 2013-07-01 00:36:17 +02:00
Bastien Guerry 6abc114f18 org-agenda.el (org-batch-agenda): Let-bind `org-agenda-sticky' to nil during batch export
* org-agenda.el (org-batch-agenda): Let-bind
`org-agenda-sticky' to nil during batch export.

Thanks to Rainer for spotting this.
2013-07-01 00:31:33 +02:00
Bastien Guerry 85edec1886 Merge branch 'maint' 2013-06-27 17:45:35 +02:00
Gustav Wikström edcf9c95eb org-agenda.el (org-agenda-filter-by-category): Display all filtered out categories
* org-agenda.el (org-agenda-filter-by-category): Display all
filtered out categories.

TINYCHANGE
2013-06-27 17:44:50 +02:00
Bastien Guerry 370a2bfb4f Merge branch 'maint' 2013-06-27 17:02:50 +02:00
Bastien Guerry be4e4ba989 org-agenda.el (org-agenda-skip-eval): Fix typo in docstring
* org-agenda.el (org-agenda-skip-eval): Fix typo in docstring.
2013-06-27 16:36:29 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Bastien Guerry a9f590e7b1 org-agenda.el: Fix a bug about narrowing to wrong region boundaries
* 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.
2013-04-29 19:02:13 +02:00
Bastien Guerry dcb0ac48a8 Use `org-called-interactively-p' instead of `called-interactively-p'
* 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.
2013-04-25 07:30:04 +02:00
Richard Lawrence 1b0c4cf0f8 org-agenda.el (org-cmp-ts): Avoid error when trying to string-match against nil
* org-agenda.el (org-cmp-ts): Avoid error when trying to
string-match against nil.

TINYCHANGE
2013-04-20 08:58:29 +02:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* 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.
2013-04-18 10:29:00 +02:00
Bastien Guerry 937b4484c6 org-agenda.el: New commands for dragging a line forward/backward
* 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.
2013-04-17 20:25:02 +02:00
Bastien Guerry 4e62936ae5 org-agenda.el: (org-agenda-bulk-toggle-all): New command
* 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.
2013-04-16 22:02:07 +02:00
Bastien Guerry 0f0d0ecf01 org-agenda.el (org-agenda-entry-text-mode): Also check against regexp filters
* org-agenda.el (org-agenda-entry-text-mode): Also check
against regexp filters.
2013-04-13 12:28:24 +02:00
Bastien Guerry 4a603bcd28 org-agenda.el (org-timeline): Handle `org-agenda-show-log'
* org-agenda.el (org-timeline): Handle `org-agenda-show-log'.

Thanks to Derek Upham for reporting this bug.
2013-04-13 11:46:16 +02:00
Bastien Guerry 6ca318353f org-agenda.el: Use `user-error' instead of `error' in some places
* org-agenda.el (org-agenda-undo, org-agenda)
(org-agenda-append-agenda)
(org-agenda-get-restriction-and-command, org-agenda-write)
(org-agenda-clock-cancel)
(org-agenda-diary-entry-in-org-file, org-agenda-diary-entry)
(org-agenda-execute-calendar-command)
(org-agenda-goto-calendar, org-agenda-convert-date)
(org-agenda-bulk-mark, org-agenda-bulk-action)
(org-agenda-show-the-flagging-note): Use `user-error' instead
of `error'.
2013-04-10 14:38:27 +02:00
Bastien Guerry c7f99d1e87 org-agenda.el (org-agenda-append-agenda): Set buffer read only
* org-agenda.el (org-agenda-append-agenda): Set buffer read
only.
2013-04-10 11:40:30 +02:00
Bastien Guerry cd481dfba8 org-agenda.el (org-agenda-goto-date): Fix bug when going to a date in month view
* 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.
2013-04-08 21:25:10 +02:00
Bastien Guerry 15d6dd651b org-agenda.el (org-agenda-goto-date): Redo an agenda* if needed
* org-agenda.el (org-agenda-goto-date): If the agenda was
built as agenda* (scheduled/deadline items with hour spec)
then redo an agenda*.
2013-04-08 21:25:10 +02:00
Bastien Guerry c25566fec3 org-agenda.el (org-agenda-goto-date): Put the cursor on the agenda line with the selected date
* org-agenda.el (org-agenda-goto-date): Put the cursor on the
agenda line with the selected date.
2013-04-08 21:25:10 +02:00
Bastien Guerry b37e27edb5 org-agenda.el (org-agenda-restriction-lock-highlight-subtree): New option
* org-faces.el (org-agenda-restriction-lock): Use less flashy
colors.

* org-agenda.el
(org-agenda-restriction-lock-highlight-subtree): New option.
2013-04-06 01:51:29 +02:00
Bastien Guerry c61303ed3d org-agenda.el: Rename the "top-category" filter as "top-headline"
* 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.
2013-04-05 19:46:02 +02:00
Bastien Guerry 889b7e507c org-agenda.el (org-agenda-get-todos): Set `todo-state' earlier so that we can skip false-positives in time
* 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.
2013-04-05 19:46:02 +02:00
Carsten Dominik a5d6548a57 Highlight only headline with agenda subtree restriction
* 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.
2013-04-05 16:44:57 +02:00
Bastien Guerry 618277cf93 org-agenda.el (org-agenda-limit-interactively): New command
* 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'.
2013-04-05 08:37:51 +02:00
Bastien Guerry 0066737092 org-agenda.el: Minor typo fix and docstring enhancement
* 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.
2013-04-03 18:28:30 +02:00
Max Mikhanosha 9594249b4d Fix agenda generation error if agenda had time grid and agenda format
contain effort

* lisp/org-agenda.el (org-agenda-format-item): Ensure effort is "" when unset
2013-03-26 06:55:53 -04:00
Bastien Guerry ce8706f268 Fix commit 3abd5e 2013-03-25 15:54:36 +01:00
Bastien Guerry 3abd5ef707 org-agenda.el: Re-align leaders to the left
* 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.
2013-03-25 06:03:17 +01:00
Bastien Guerry a9880a7710 Implement group tags
* 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.
2013-03-25 05:42:35 +01:00
Bastien Guerry c8a3425559 org-agenda.el (org-agenda-redo): Set filters after agenda has been redone
* org-agenda.el (org-agenda-redo): Set filters after agenda
has been redone.
2013-03-19 19:39:34 +01:00
Bastien Guerry ecb9e5811d org.el (org-store-link): Store each line of the active as a separate link
* 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.
2013-03-19 19:39:12 +01:00
Bastien Guerry 5127f56790 org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a message when called interactively
* org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a
message when called interactively.  Fix docstring position in
the defun.
2013-03-19 09:57:11 +01:00
Bastien Guerry acbf00ea24 org-agenda.el (org-agenda-mode-map): Use ?= for filtering by regexp and ?| for removing all filters
* 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'.
2013-03-16 19:40:02 +01:00
Bastien Guerry 7e806c155c org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to nil
* org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to
nil.  This prevents bugs when calling e.g., `org-diary' after
quitting an agenda window.
2013-03-16 18:59:52 +01:00
Bastien Guerry 00948a6834 org-agenda.el: Don't hardcode the default agenda entry types
* 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'.
2013-03-16 18:56:56 +01:00
Bastien Guerry 7c71b7c686 org-agenda.el (org-agenda-custom-commands): Fix default setting
* org-agenda.el (org-agenda-custom-commands): Fix default
setting so that the customize interface does not complain
about a mismatch.
2013-03-16 18:54:26 +01:00
Bastien Guerry e0e699ab3d org-compat.el: New compatibility function `org-defvaralias'
* org-compat.el (org-defvaralias): Newcompatibility function.
* org.el:
* org-agenda.el:
* org-list.el:
* org-gnus.el:
* org-clock.el: Use it.
2013-03-14 13:53:52 +01:00
Bastien Guerry d3361ce350 Fix a compiler warning. 2013-03-13 23:05:45 +01:00
Bastien Guerry a3ed698dbb Merge branch 'master-agenda' 2013-03-13 19:54:55 +01:00
Bastien Guerry 81daada648 Fix compiler warning 2013-03-13 19:54:30 +01:00
Bastien Guerry df31fe6bdd org-agenda.el: New agenda entry types :scheduled* and :deadline*
* 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.
2013-03-13 19:52:25 +01:00
Bastien Guerry c1e437bbe9 org-agenda.el: Implement agenda filtering by regexp with "|"
* 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'.
2013-03-13 19:26:41 +01:00
Bastien Guerry 742f473820 org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown): New allowed value `repeated-after-deadline'
* 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.
2013-03-12 18:58:18 +01:00
Bastien Guerry 9e00635699 org-agenda.el (org-sorting-choice): Fix default value
* org-agenda.el (org-sorting-choice): Fix default value.
2013-03-11 18:18:11 +01:00
Bastien Guerry 32385e9536 org-agenda.el (org-agenda-day-view): Fix parameter's name
* org-agenda.el (org-agenda-day-view): Fix parameter's name.
2013-03-08 12:23:10 +01:00
Bastien Guerry a2e39d98b8 org-agenda.el (org-agenda-refile): Enhance docstring. Allow to clear the refile cache with C-0 or C-u C-u C-u
* org-agenda.el (org-agenda-refile): Enhance docstring.  Allow to
clear the refile cache with C-0 or C-u C-u C-u.
2013-03-08 10:33:19 +01:00
Bastien Guerry c00a43e857 Revert `org-agenda-dim-blocked-tasks' and `org-agenda-inhibit-startup' to their previous default (t and nil)
* 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
2013-03-06 10:35:19 +01:00
Bastien Guerry 8a2e3e2a79 Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.

* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 16:38:33 +01:00
Bastien Guerry 54ffb0beff org-agenda.el: Fix or add docstrings.
* org-agenda.el (org-agenda-format-date-aligned)
(org-agenda-time-of-day-to-ampm-maybe)
(org-scheduled-past-days)
(org-agenda-normalize-custom-commands)
(org-agenda-run-series, org-store-agenda-views): Fix or add
docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 06ec886572 org-agenda.el (org-agenda-write): Overwrite file when called non-interactively
* org-agenda.el (org-agenda-write): Overwrite file when called
non-interactively.

Thanks to Simon Thum for reporting this.
2013-03-03 17:42:32 +01:00
Bastien Guerry e57ce7bd78 Merge branch 'maint' 2013-03-02 12:10:35 +01:00
Bastien Guerry c8d5674562 org-agenda.el (org-agenda-filter-apply): Deactive `org-agenda-entry-text-mode' when filtering
* 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.
2013-03-02 11:00:30 +01:00
Bastien Guerry 3b4a0b21c8 org-agenda.el (org-agenda-entry-text-leaders): New option
* 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.
2013-03-01 17:27:50 +01:00
Bastien Guerry ccc7383890 Don't create UID for the entire file when write an agenda to .ics
* 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.
2013-03-01 15:47:55 +01:00
Bastien Guerry 0c40f479cd org-agenda.el (org-agenda-write): Ask before overwriting an existing file
* org-agenda.el (org-agenda-write): Ask before overwriting an
existing file.

Thanks to Rainer Stengele for suggesting this.
2013-03-01 15:06:28 +01:00
Bastien Guerry c8c991e049 org-agenda.el (org-agenda-deadline-leaders): New formatting string for past deadlines
* 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.
2013-02-27 14:29:46 +01:00
Bastien Guerry 295b0ba5d1 Bump :version to "24.4" and add :package-version.
The options updated are those who won't be in Emacs 24.3.
2013-02-26 18:21:28 +01:00
Bastien Guerry de73b35909 Merge branch 'maint'
Conflicts:
	contrib/oldexp/org-exp.el
	lisp/org.el
2013-02-26 14:36:36 +01:00
Bastien Guerry 8f49547aaf Remove top-level autoloads sexps.
These autoloads were erroneously introduced by commit e4c31cf98.
2013-02-26 14:35:01 +01:00
Bastien Guerry d7fe32a0aa org-agenda.el (org-agenda-start-day): Refer to `org-read-date' in the docstring
* org-agenda.el (org-agenda-start-day): Refer to
`org-read-date' in the docstring.

Thanks to Xiao-Yong Jin for suggesting this.
2013-02-22 14:15:17 +01:00
Stephen Eglen c0f8844b05 org-agenda.el (org-agenda-prefix-format): Small docstring enhancement
* org-agenda.el (org-agenda-prefix-format): Small docstring
enhancement.

TINYCHANGE
2013-02-20 16:38:34 +01:00
Bastien Guerry f35e82641c Merge branch 'maint' 2013-02-20 16:31:17 +01:00
Bastien Guerry 9a21403bd7 org-agenda.el (org-agenda-to-appt): Fix typos
* org-agenda.el (org-agenda-to-appt): Fix typos.

Thanks to Sean Allred for reporting this.
2013-02-20 16:30:48 +01:00
Bastien Guerry 4354eb7223 Merge branch 'maint' 2013-02-19 19:38:59 +01:00
Bastien Guerry bf5a33a3c0 org-agenda.el (org-agenda-local-vars): Don't include `org-agenda-show-window'
* 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.
2013-02-19 19:38:47 +01:00
Bastien Guerry 9bec2ec5d0 org-agenda.el: Small bug fixes
* 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.
2013-02-19 11:04:26 +01:00
Bastien Guerry 66cba1c51f org-agenda.el (org-agenda-set-restriction-lock): Fix restriction
* org-agenda.el (org-agenda-set-restriction-lock): Fix
restriction so that it ends at the beginning of the next
headline at the same level.
2013-02-19 10:33:07 +01:00
Bastien Guerry c64c599221 org-agenda.el (org-agenda-format-item): Only set the breadcrumbs when `org-prefix-has-breadcrumbs' is non-nil
* org-agenda.el (org-agenda-format-item): Only set the
breadcrumbs when `org-prefix-has-breadcrumbs' is non-nil.
2013-02-19 09:48:11 +01:00
Bastien Guerry 33d362788e Fix commit aa0e0068. 2013-02-19 09:41:40 +01:00
Bastien Guerry aa0e0068de org-agenda.el (org-agenda-set-restriction-lock): Put the overlay until the end of the subtree
* 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.
2013-02-16 23:09:57 +01:00
Bastien Guerry 0641a22606 Fix typo and compiler warnings 2013-02-15 15:39:12 +01:00
Arun Persaud b0b3fcf49b added option %b to display breadcrumbs in agenda
* 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".
2013-02-14 08:54:00 +01:00
Bastien Guerry d38f79be97 Fix commit 5bde60c
Thanks to Michael Brand for reporting those problems.
2013-02-12 17:31:37 +01:00
Bastien Guerry 5bde60c68c org-agenda.el (org-agenda-get-scheduled): Use "--2d" to ignore the delay for repeated occurrences
* 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.
2013-02-12 09:51:11 +01:00
Bastien Guerry 1f5edba494 org-agenda.el (org-agenda-get-deadlines, org-agenda-get-scheduled): Minor refactoring
* org-agenda.el (org-agenda-get-deadlines)
(org-agenda-get-scheduled): Minor refactoring.
2013-02-12 09:02:33 +01:00
Bastien Guerry 8e34ec0b2b Merge branch 'maint' 2013-02-11 14:56:46 +01:00
Bastien Guerry fafb5f3429 org-agenda.el: Fix bug when displaying a temporary overlay
* 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.
2013-02-11 14:56:38 +01:00
Bastien Guerry 6bcd7c44ec org-agenda.el (org-agenda-write): Don't copy headlines' subtrees when writing to an .org file
* 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'.
2013-02-08 16:47:19 +01:00
Bastien Guerry 1af91246cf org-agenda.el (org-agenda-write): Allow writing to an .org file.
* org-agenda.el (org-agenda-write): Allow writing to an .org
file.
2013-02-08 15:06:01 +01:00
Bastien Guerry 05acaa9de4 org-agenda.el (org-agenda-get-timestamps): Use nil as `ts-date' for diary sexpressions
* org-agenda.el (org-agenda-get-todos)
(org-agenda-get-timestamps): Use nil as `ts-date' for diary
sexpressions.
2013-02-07 19:40:39 +01:00
Bastien Guerry 3c4847cf67 org-agenda.el (org-agenda-get-todos): Skip diary sexps when trying to sort by timestamp
* org-agenda.el (org-agenda-get-todos): Skip diary sexps when
trying to sort by timestamp.

Thanks to Kyle Machulis for reporting this problem.
2013-02-07 10:32:43 +01:00
Nicolas Goaziou 0a01e52aa1 Install new exporter into Org innards
* 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.
2013-02-06 23:06:30 +01:00
Bastien Guerry 33c4f6233d org-agenda.el: New options to limit the number of displayed entries
* 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.
2013-02-06 17:23:25 +01:00
Bastien Guerry 8ecc966292 Implement "delay" cookies for scheduled items.
* 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.
2013-02-06 17:23:24 +01:00
Bastien Guerry 8517be79b5 org-agenda.el: Implement new sorting strategies
* 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.)
2013-02-06 17:23:24 +01:00
Bastien Guerry b91fe131ae Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2013-02-06 17:21:31 +01:00
Bastien Guerry b07a9bb29a org-agenda.el: Bugfix.
* 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.
2013-02-06 17:18:03 +01:00
Bastien Guerry bbea8d348b Allow to contextualize capture and agenda commands by checking the name of the buffer
* 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.
2013-01-31 11:06:04 +01:00
Bastien Guerry 733a6fe063 Merge branch 'maint' 2013-01-26 13:29:49 +01:00
Bastien Guerry a5ed80fb32 org-agenda.el: Delete `org-agenda-no-heading-message'
* org-agenda.el (org-agenda-no-heading-message): Delete.
(org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled)
(org-agenda-get-blocks): Don't use
`org-agenda-no-heading-message', skip the entry.
2013-01-26 13:29:44 +01:00
Bastien Guerry 9a466f2f05 Merge branch 'maint'
Conflicts:
	lisp/org.el
2013-01-26 10:59:12 +01:00
Bastien Guerry 582cca5806 org-agenda.el (org-agenda-skip): Fix bug by correctly skipping commented scheduled/deadline lines
* org-agenda.el (org-agenda-skip): Fix bug by correctly
skipping commented scheduled/deadline lines.

This fixes a bug introduced in
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=211b13
2013-01-26 10:55:35 +01:00
Bastien Guerry 9d11d5f3ec Fix last commit. 2013-01-24 15:05:41 +01:00
Bastien Guerry cf1b5169de org-agenda.el (org-diary): Only keep the descriptions of the links
* org-agenda.el (org-diary): Only keep the descriptions of the
links since Org links are not active in the diary buffer.
2013-01-24 15:03:22 +01:00
Bastien Guerry b2abdfb95a New face `org-priority'. Enhance fontification of priority cookies in agenda.
* 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.
2013-01-24 14:16:11 +01:00
Bastien Guerry b8104315d3 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2013-01-22 22:28:47 +01:00
Bastien Guerry 62c3107eb2 org-agenda.el (org-agenda-get-deadlines): Fix bug: use `org-agenda-show-inherited-tags'
* org-agenda.el (org-agenda-get-deadlines): Fix bug: use
`org-agenda-show-inherited-tags'.

Thanks to Kiwon Um for reporting this.
2013-01-22 22:27:56 +01:00
Bastien Guerry 196c5797d2 Merge branch 'maint' 2013-01-22 16:39:28 +01:00
Bastien Guerry 211b137ef4 org-agenda.el (org-agenda-skip): Correctly handle commented out scheduled/deadline lines
* 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.
2013-01-22 16:39:23 +01:00
Bastien Guerry 0aae38f8fa Merge branch 'maint' 2013-01-22 16:01:01 +01:00
Samuel Loury 5a5ea5d112 Small typo correction
TINYCHANGE
2013-01-22 15:55:59 +01:00
Bastien Guerry 1d6d4e99e4 org-agenda.el: Let-bind `org-time-clocksum-use-effort-durations' when checking clocks and formatting items
* 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.
2013-01-22 15:53:14 +01:00
Bastien Guerry 443559a16f Merge branch 'maint' 2013-01-22 14:25:56 +01:00
Muchenxuan Tong 5b20c9a30e org-agenda.el (org-agenda-quit): Delete indirect buffer's window only when it exists
* 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
2013-01-22 14:14:08 +01:00
Bastien Guerry 1d8ba5a9cd Merge branch 'maint' 2013-01-16 18:36:33 +01:00
Bastien Guerry bd779fad62 org-agenda.el (org-agenda-open-link): Fix bug with opening all links
* org-agenda.el (org-agenda-open-link): Fix bug with opening
all links.

Thanks to Ingo Lohmar for pointing this.
2013-01-16 18:36:29 +01:00
Bastien Guerry 626212af0e Merge branch 'maint' 2013-01-14 18:05:15 +01:00
Tokuya Kameshima 115bd78695 org-agenda.el (org-search-view): Fix checking `org-agenda-show-inherited-tags'
* org-agenda.el (org-search-view): Fix checking
`org-agenda-show-inherited-tags'.

TINYCHANGE
2013-01-14 18:04:31 +01:00
Bastien Guerry 7369cada30 Merge branch 'maint' 2013-01-13 11:17:56 +01:00
Bastien Guerry 04eb4b08c3 Revert "Compatibility: Use org-define-obsolete-{function,variable}-alias"
This reverts commit 305f29776f.
2013-01-13 09:19:24 +01:00
Bastien Guerry 09f108ec57 Merge branch 'maint' 2013-01-12 09:20:22 +01:00
Bastien Guerry a0ad34b8d4 Docstring fixes.
* org-capture.el (org-capture-templates-contexts):
* org-agenda.el (org-agenda-custom-commands-contexts):
Docstring fix.
2013-01-12 09:20:17 +01:00
Bastien Guerry 71f2befb61 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2013-01-11 17:19:52 +01:00
Bastien Guerry 3c4df588e8 Restore previous behavior for inherited tags, now just more flexible
* 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.
2013-01-11 17:15:17 +01:00
Bastien Guerry 67e83a10c8 Merge branch 'maint' 2013-01-10 12:15:37 +01:00
Bastien Guerry 8b0fe31386 org-agenda.el (org-get-entries-from-diary): Turn off `diary-file-name-prefix'
* 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.
2013-01-10 12:15:24 +01:00
Bastien Guerry bb15139ab7 Merge branch 'maint' 2013-01-08 18:40:01 +01:00
Bastien Guerry 4cac751536 org-agenda.el (org-agenda-finalize): Inhibit readonly for the whole function
* org-agenda.el (org-agenda-finalize): Inhibit readonly for
the whole function.

Thanks to J. David Boyd for hitting this bug and reporting it.
2013-01-08 18:39:45 +01:00
Bastien Guerry 1e38a8162c Merge branch 'maint' 2013-01-08 14:30:44 +01:00
Bastien Guerry 05f5f726fb org-agenda (org-agenda-finalize): Don't remove tag alignment
* 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.
2013-01-08 14:29:29 +01:00
Bastien Guerry 7a186dc005 Merge branch 'maint' 2013-01-08 11:34:18 +01:00
Bastien Guerry 93b0cf60e7 org-agenda.el (org-agenda-finalize): Downcase tags when readding them after agenda generation
* org-agenda.el (org-agenda-finalize): Downcase tags when
readding them after agenda generation.
2013-01-08 11:34:09 +01:00
Bastien Guerry 7feec64988 Merge branch 'maint' 2013-01-07 22:29:11 +01:00
Bastien Guerry 3d1c9a42c3 org-agenda.el (org-agenda-use-tag-inheritance): Fix custom definition
* org-agenda.el (org-agenda-use-tag-inheritance): Fix custom
definition.
2013-01-07 22:02:33 +01:00
Bastien Guerry b54d6f5965 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
	lisp/org.el
	testing/lisp/test-org-element.el
2013-01-07 16:19:37 +01:00
Bastien Guerry c8bfd50223 org-agenda.el: New option `org-agenda-use-tag-inheritance'
* 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.
2013-01-07 16:12:52 +01:00
Bastien Guerry b27a020a83 `org-float' is now obsolete
* 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.
2013-01-07 13:01:36 +01:00
Bastien Guerry 6cd243468b Speed up setting/getting the APPT_WARNTIME property.
* 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.
2013-01-07 12:50:49 +01:00
Bastien Guerry c4d4bf3833 New defun `org-refresh-effort-properties'
* 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.
2013-01-07 12:33:24 +01:00
Achim Gratz 19460418a0 Merge branch 'maint' 2013-01-06 18:33:16 +01:00
Achim Gratz 305f29776f Compatibility: Use org-define-obsolete-{function,variable}-alias
* 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´.
2013-01-06 18:29:05 +01:00