Commit Graph

1491 Commits

Author SHA1 Message Date
Nicolas Goaziou 226639b239 org-agenda: Fix adding diary entries
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
  adding adding diary entries the same day.

This is a follow-up to a1116aa54e.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/94638>
2015-02-05 10:00:46 +01:00
Nicolas Goaziou 1d4c79d415 org-agenda: Fix agenda diary corruption
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Do not
  save excursion or final position is lost.

Reported-by: Gregor Zattler <grfz@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/94543>
2015-02-02 18:19:30 +01:00
Konubinix 2ebb14d746 Make use of `org-insert-heading' instead of inserting the * character
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level): Make
  use of `org-insert-heading' instead of inserting the * character

Therefore, the hooks associated to the insertion of a heading will be
triggered.  Since those hooks may cause the creation of some
metadata.  `org-end-of-meta-data' is used afterward.
2015-02-02 13:24:37 +01:00
Nicolas Goaziou fe63e59faf Small refactoring
* lisp/org.el (org-log-beginning):
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Small
  refactoring.
2015-01-30 19:41:02 +01:00
Kyle Meyer 7834a1ce66 org-agenda: Add only-window setup option
* lisp/org-agenda.el (org-agenda-window-setup, org-agenda-prepare-window):
  Add option to show agenda as the only window in the current frame.
2015-01-30 10:39:53 +01:00
Nicolas Goaziou a1116aa54e Fix `org-agenda-insert-diary-make-new-entry'
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Ensure
  point is at a real body line and not in front of meta data, so
  regular contents can be inserted safely after a call to this
  function.

Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94482>
2015-01-30 10:23:47 +01:00
Marco Wahl e0879b03d0 Merge branch 'maint' 2015-01-12 13:02:20 +01:00
Marco Wahl ca21b7b86d org*.el: Fix call to calendar API
* lisp/org-clock.el: Replace occurances of
'calendar-absolute-from-iso' with 'calendar-iso-to-absolute'.

* lisp/org-agenda.el: Same as above.

* lisp/org.el: Same as above.

Some (long marked obsolete) calendar entities have been dropped from
Emacs recently.  One of those is 'calendar-absolute-from-iso'.
2015-01-12 12:35:10 +01:00
Kyle Meyer 7e945107ce org-agenda: Fix issues with restoring windows
* lisp/org-agenda.el (org-agenda-prepare-window): Update window
  configuration even when agenda buffer exists in background.
* lisp/org-agenda.el (org-agenda-Quit): Use buffer value for
  org-agenda-pre-window-conf to allow for local values used with sticky
  agenda buffers.
* lisp/org-agenda.el (org-agenda-quit): Reset local, not global, value for
  org-agenda-pre-window-conf.
* lisp/org-agenda.el (org-agenda--quit): New function.

Update the pre-agenda window configuration on the next agenda call even
if org-agenda-pre-window-conf is non-nil (which occurs when the agenda
buffer is exited without q, Q, or X).  This prevents restoring a window
configuration that is not the one prior to the most recent agenda call.

Make org-agenda-Quit (Q) restore the buffer-local, not the global, value
for org-agenda-pre-window-conf so that it works correctly with sticky
agenda buffers.

Along with these changes, merge the duplicated functionality of
org-agenda-quit and org-agenda-Quit into a new function,
org-agenda--quit.
2015-01-05 12:49:44 +01:00
Kyle Meyer 460f31efa0 org-agenda: Track last indirect buffer
* lisp/org-agenda.el (org-agenda-tree-to-indirect-buffer): Record last
  indirect buffer for agenda.
* lisp/org-agenda.el (org-agenda-quit): Delete window for
  org-agenda-last-indirect-buffer, not org-last-indirect-buffer.

Introduce a new variable, org-agenda-last-indirect-buffer, that is
specific for the agenda (and perhaps a particular agenda buffer, if
org-agenda-sticky is set).  This prevents org-agenda-quit from deleting
a window if it is displaying a buffer that was created through a
org-tree-to-indirect-buffer call outside of
org-agenda-tree-to-indirect-buffer.

Make org-agenda-Quit check for indirect buffer windows, like
org-agenda-quit does.
2015-01-05 12:49:41 +01:00
Kyle Meyer b4b6584eea org-agenda-Quit: Remove unnecessary function calls
* lisp/org-agenda.el (org-agenda-Quit): Remove unnecessary function calls.

- org-agenda-Quit turns off column view if it is active, instead of
  killing the agenda buffer, so there is no need to call
  org-columns-remove-overlays when killing the buffer.
- org-agenda-reset-markers is already called when the kill-buffer-hook
  is run.
2015-01-03 12:15:58 +01:00
Kyle Meyer 722a574d88 org-agenda-exit: Check column view
* lisp/org-agenda.el (org-agenda-exit): Exit column view before trying to
  exit agenda.

Running org-agenda-exit in column view deleted all buffers loaded by the
agenda, but it didn't actually exit the agenda because, if the agenda is
in column view, org-agenda-Quit turns off column view instead of killing
the agenda.  So org-agenda-exit should either just quit column view if
it is active (and not delete the loaded buffers or quit the agenda) or
make sure that the agenda is not in column view before killing it.
Since org-agenda-Quit and org-agenda-quit already do the former, make
org-agenda-exit completely exit the agenda regardless of whether it is
in column view.
2015-01-03 12:15:54 +01:00
Kyle Meyer 424eb55263 org-agenda: Fix exiting function docstrings
* lisp/org-agenda.el (org-agenda-Quit):
* lisp/org-agenda.el (org-agenda-quit):
* lisp/org-agenda.el (org-agenda-exit): Correct and expand docstrings.
2015-01-03 12:15:50 +01:00
Kyle Meyer 5d25e6e68e org-todo-yesterday: Ignore `org-use-effective-time'
* lisp/org.el (org-todo-yesterday):
* lisp/org-agenda.el (org-agenda-todo-yesterday): Ignore global
`org-use-effective-time' value.

Otherwise, if `org-use-effective-time' being nil,
`org-extend-today-until' will not be considered, resulting in the
current time being used instead of 23:59 yesterday.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93224>
2014-12-09 10:25:24 +01:00
Nicolas Goaziou ae9ac316a5 Erase `org-insert-labeled-timestamps-at-point'
* lisp/org.el (org-insert-labeled-timestamps-at-point): Remove
  variable.
(org-add-planning-info): Remove reference to removed variable.

* lisp/org-agenda.el (org-agenda-schedule, org-agenda-deadline):
  Remove reference to removed variable.

* etc/ORG-NEWS (Skipping): Document removal.

Org syntax assumes planning info line is always right below the
headline.  Setting this variable to anything but nil defeats that and,
as a consequence, produces invalid planning lines.
2014-11-26 23:32:52 +01:00
Nicolas Goaziou 4670b0420c Merge branch 'maint' 2014-11-16 00:10:08 +01:00
Florian Beck 685d3ba4af Replace obsolete aliases of calendar functions
* lisp/org-agenda.el (org-agenda-diary-entry): Replace obsolete functions.
2014-11-16 00:09:37 +01:00
Marco Wahl 5bc289df21 Merge branch 'maint' 2014-11-04 11:17:06 +01:00
Marco Wahl 33786d4645 org-agenda: Switch to current API for two calendar calls
* lisp/org-agenda.el (org-agenda-phases-of-moon, org-agenda-holidays):
  Update to use the current API

This commit fixes the display of holidays in the agenda for emacs 25.

Further for getting the lunar phases the usage of an obsolete alias
has been replaced by the current name.
2014-11-04 11:06:37 +01:00
Marco Wahl fdd9b18598 [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
  display function.  Drop the usage of the obsolete diary-display-hook.

fancy-diary-display has been dropped in Emacs 25.  diary-fancy-display
is the long known replacement of fancy-diary-display.

diary-display-hook has been marked obsolete before Emacs 23.2.
2014-10-13 00:19:07 +02:00
Marco Wahl 4a872ae3a0 [PATCH] Fix: Emacs 25 fancy diary inclusion in agenda
* lisp/org-agenda.el (org-get-entries-from-diary): Use the suitable
  display function.  Drop the usage of the obsolete diary-display-hook.

fancy-diary-display has been dropped in Emacs 25.  diary-fancy-display
is the long known replacement of fancy-diary-display.

diary-display-hook has been marked obsolete before Emacs 23.2.
2014-10-11 18:16:36 +02:00
Nicolas Goaziou 06944507f1 Merge branch 'maint' 2014-10-07 12:29:35 +02:00
Mike McLean d5c531725a org-agenda.el: Update docstring
* org-agenda.el (org-agenda-time-grid): Change docstring.

TINYCHANGE
2014-10-07 12:28:51 +02:00
Nicolas Goaziou 20539b8d1d Merge branch 'maint' 2014-09-20 23:02:20 +02:00
marcowahlsoft@gmail.com 60418c5ca8 Fix to determine a bulk-markable line
* lisp/org-agenda.el (org-agenda-bulk-mark,
  org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): This fixes
  e.g. org-agenda-bulk-mark-all when time-grid is shown.

TINYCHANGE
2014-09-20 23:01:51 +02:00
Bastien Guerry c9fdd7f8b1 Merge branch 'master' of orgmode.org:org-mode 2014-08-26 07:02:31 +02:00
Nicolas Goaziou 67ae102b4b ox-icalendar: Speed up `org-agenda-write' process
* lisp/ox-icalendar.el (org-icalendar-create-uid): Remove unused
  optional argument.
(org-icalendar--combine-files): Change signature.  Simplify process.
(org-icalendar-combine-agenda-files): Apply signature change. Do not
check anymore ICALENDAR-MARK property.
(org-icalendar-entry): Do not check anymore ICALENDAR-MARK property.
(org-icalendar-export-to-ics): Comply to comments.
(org-icalendar-export-current-agenda): Rewrite function.

* lisp/org-agenda.el (org-agenda-write): Update docstring.

Instead of parsing every agenda before picking up needed entries, copy
these entries in a temporary buffer, then export it.
2014-08-26 02:14:18 +02:00
Nicolas Goaziou c33afd5683 Merge branch 'maint' 2014-08-25 15:22:24 +02:00
Nicolas Goaziou e191a76ddd org-agenda: Fix order when writing to an ".org" file
* lisp/org-agenda.el (org-agenda-write): Write headings in proper
  order.

`org-paste-subtree' leaves point before inserted text, so there is no
need to reverse contents.

http://permalink.gmane.org/gmane.emacs.orgmode/89867
2014-08-25 15:21:50 +02:00
Bastien Guerry 3e01c7ff1b Revert "org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix ordering"
This reverts commit 5512bedee6.
2014-08-22 15:49:23 +02:00
Grégoire Jadi 34900f41d5 lisp/org-agenda.el (org-agenda-refile): Documentation improvement
* lisp/org-agenda.el (org-agenda-refile): State explicitly that
  '(16) = C-u C-u and that '(64) = C-u C-u C-u.
2014-08-12 20:49:44 +02:00
Bastien Guerry 2dbb338ad3 Merge branch 'maint' 2014-07-28 19:23:04 +02:00
Bastien Guerry 812a889657 org-agenda.el (org-agenda-prepare): Reset preset filters
* org-agenda.el (org-agenda-prepare): Reset preset filters
when using sticky agendas.

Thanks to Thomas Morgan for reporting this.
2014-07-28 19:22:53 +02:00
Bastien Guerry e56ea43008 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2014-07-28 18:22:29 +02:00
Bastien Guerry 6efe8eacf0 org-agenda.el (org-agenda-get-sexps): Don't add tags as text properties
* org-agenda.el (org-agenda-get-sexps): Don't add tags as text
properties.

Thanks to Raimund Berger for reporting this.
2014-07-28 18:21:58 +02:00
Nikolai Weibull 5512bedee6 org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix ordering
* org-agenda.el (org-agenda-insert-diary-make-new-entry):
Fix ordering.

TINYCHANGE
2014-07-28 16:22:04 +02:00
Bastien Guerry d100d590e1 org-agenda.el (org-agenda-filter-by-tag): Don't refresh the agenda
* org-agenda.el (org-agenda-filter-by-tag): Don't refresh the
agenda.
2014-06-16 11:44:25 +02:00
Bastien Guerry 1c9aa1e78e Merge branch 'maint' 2014-06-16 11:41:36 +02:00
Bastien Guerry 5556865893 org-agenda.el (org-agenda-filter-apply): Fix setting of `org-agenda-filtered-by-category'
* org-agenda.el (org-agenda-filter-apply): Fix setting of
`org-agenda-filtered-by-category'.
2014-06-16 11:41:14 +02:00
Bastien Guerry e30c6cc44b Merge branch 'maint' 2014-06-15 10:43:47 +02:00
Bastien Guerry af8ee5fcf2 org-agenda.el (org-cmp-ts): Fix agenda entry type checking
* org-agenda.el (org-cmp-ts): Fix agenda entry type checking.

Thanks to Trevor Murphy for reporting this.
2014-06-15 10:43:17 +02:00
Bastien Guerry e966070396 Merge branch 'maint' 2014-06-15 10:37:09 +02:00
Bastien Guerry e26e47c8a1 org-agenda.el (org-entries-lessp): Fix inactive timestamp comparison
* org-agenda.el (org-entries-lessp): Fix inactive timestamp
comparison.
2014-06-15 10:36:59 +02:00
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