Commit Graph

1110 Commits

Author SHA1 Message Date
Bastien Guerry 23204aaab7 org-agenda.el: Fix bug in `org-agenda-list'
* org-agenda.el (org-agenda-list): Fix bug: don't throw an
error when called from programs as (org-agenda-list).

Thanks to Rainer Thiel for reporting this bug.
2012-08-28 13:29:37 +02:00
Bastien Guerry 72f25ccfd9 org-agenda.el (org-todo-list): Make arg optional
* org-agenda.el (org-todo-list): Make arg optional.
2012-08-28 13:17:29 +02:00
Bastien Guerry a9b8778b0c Code clean-up: rename some agenda internals.
* org.el (org-agenda-prepare-buffers): Rename from
`org-prepare-agenda-buffers'.
(org-match-sparse-tree, org-map-entries): Use the new names.

* org-agenda.el (org-agenda-prepare-window): Rename from
`org-prepare-agenda-window'.
(org-agenda-prepare): Rename from `org-prepare-agenda'.
(org-agenda-run-series, org-agenda-prepare, org-timeline)
(org-agenda-list, org-search-view, org-todo-list)
(org-tags-view, org-agenda-list-stuck-projects, org-diary)
(org-agenda-to-appt): Use the new names.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-icalendar.el (org-export-icalendar): Ditto.

* org-clock.el (org-dblock-write:clocktable)
(org-dblock-write:clocktable): Ditto.

* org2rem.el (org2rem): Ditto.
2012-08-28 13:11:12 +02:00
Bastien Guerry 89cdbda63e org-agenda.el: Use the current command's match to set the buffer name
* org-agenda.el (org-agenda): In sticky agendas, use the
current command's match to set the buffer name.  This gives
more information to the user and allows to distinguish various
agendas triggered by the same key.
(org-batch-store-agenda-views): Handle the new sticky agenda
buffer name.
2012-08-28 13:02:01 +02:00
Bastien Guerry 9c2b17bac3 org-agenda.el: Use `S' as a key for searching words in TODO-only entries
* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command): Use `S' as a key for
searching words in TODO-only entries.
2012-08-28 12:35:05 +02:00
Bastien Guerry 5590972648 org-agenda.el: Fit agenda window when displaying a sticky agenda
* org-agenda.el (org-prepare-agenda): Fit agenda window when
displaying a sticky agenda.
2012-08-27 21:24:23 +02:00
Bastien Guerry 424f3ecedb Fix bug when redoing multiple (agenda) blocks.
* org-agenda.el (org-agenda-overriding-cmd)
(org-agenda-multi-current-cmd)
(org-agenda-multi-overriding-arguments): New variables.
(org-agenda-run-series): `org-agenda-overriding-arguments'
defaults to the last agenda block arguments, so don't use it
globally.
(org-agenda-mark-header-line): Add properties needed so that
`org-agenda-overriding-arguments', `org-agenda-current-span'
and `org-agenda-last-arguments' can be set to their correct
contextual value.
(org-agenda-multi-back-to-pos): New variable.
(org-agenda-later): Retrieve `org-agenda-current-span' and
`org-agenda-overriding-arguments' from text properties.  Also
handle numeric span.
(org-agenda-later, org-agenda-change-time-span): Set
`org-agenda-overriding-cmd' so that we to take overriding
arguments into account for this command only.

The behavior for agenda blocks where there is only one (agenda)
command is not changed.  Changing the time span and redoing with
`g' will keep the new time span.  The behavior changed for blocks
where there are multiples (agenda) blocks.  In this case, redoing
will restore the initial view (before any time span change) and
changing the time span is done independantly for each block.

Thanks to Charles Philip Chan for reporting this nasty bug.
2012-08-27 17:52:22 +02:00
Bastien Guerry 3404ac84ec Move `org-toggle-sticky-agenda' again and autoload it
The previous related commit was to prevent an error
when M-x org-reload RET was reloading org files from
an ELPA directory.  We now autoload the function so
that it is know by the time org-reload might be called.
2012-08-26 23:44:49 +02:00
Bastien Guerry d832837693 org-agenda.el: Define `org-toggle-sticky-agenda' before calling it 2012-08-26 23:24:40 +02:00
Bastien Guerry d85e7bc10a org-agenda.el: Fix bug when calling `org-agenda-kill' and `org-agenda-archive-with' with a non-nil value of `org-agenda-stick'
* org-agenda.el (org-agenda-kill, org-agenda-archive-with):
Fix bug when called with a non-nil value of `org-agenda-stick'.

Thanks to Moritz Ulrich for reporting this.
2012-08-26 14:53:59 +02:00
Bastien Guerry 74d1658c60 org-agenda.el (org-agenda-refile): Fix bug when refiling an sticky agenda entry
* org-agenda.el (org-agenda-refile): Fix bug when refiling an
entry from a sticky agenda.

Thanks a lot to Moritz Ulrich for reporting this.
2012-08-26 11:20:02 +02:00
Bastien Guerry d44b56e81e org-agenda.el: Fix bug about restoring existing window conf
* org-agenda.el (org-prepare-agenda-window): Use
`org-pre-agenda-window-conf' if already set.
(org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil
when quitting.
(org-agenda-quit): Ditto.

Thanks to Moritz Ulrich for reporting a bug about this.
2012-08-24 15:54:58 +02:00
Bastien Guerry 10dbdf5fc2 Update the handling of agenda/capture keys contextualization.
* org.el (org-contextualize-keys): Rename from
`org-contextualize-agenda-or-capture'.  Fix normalization to
handle empty key replacement string.
(org-contextualize-validate-key): Rename from
`org-contexts-validate'.  Allow checking against a custom
function.

* org-agenda.el (org-agenda-custom-commands-contexts): Update.
(org-agenda): Use `org-contextualize-keys'.

* org-capture.el (org-capture-templates-contexts): Ditto.

* org.texi (Templates in contexts, Setting Options): Update to
reflect changes in how contexts options are processed.
2012-08-24 12:18:05 +02:00
Bastien Guerry 6c94ea0518 Implement key replacement depending on the contexts.
* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.

* org-capture.el (org-capture-templates-contexts): Allow to
use the context as a way to replace one capture template by
another one.

* org-agenda.el (org-agenda-custom-commands-contexts): Allow
to use the context as a way to replace one agenda custom
command by another one.

* org.texi (Templates in contexts): Document the new structure
of the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.

In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files.  A and B are
deactivated by default in all files.

(setq org-capture-templates
      '(("X" "Nothing but an alias")
	("A" "AAAA" entry (file+headline [...]))
	("B" "BBBB" entry (file+headline [...]))))

(setq org-capture-templates-contexts
      '(("A" "A" ((not-in-file . ".*")))
	("B" "B" ((not-in-file . ".*")))
	("X" "A" ((in-file . "\\.txt")))
	("X" "B" ((in-file . "\\.el")))))

Thanks to Carsten for suggesting this "key-replacement" idea!
2012-08-24 12:17:58 +02:00
Bastien Guerry d378c7b41b Implement context filtering for agenda commands and capture templates.
* org.el (org-contextualize-agenda-or-capture)
(org-rule-validate): New functions, implement context
filtering for agenda commands and capture templates.

* org-agenda.el (org-agenda-custom-commands-contexts): New
option.
(org-agenda): Use it.

* org-capture.el (org-capture-templates-contexts): New option.
(org-capture-select-template): Use it.

* org.texi (Templates in contexts): Document the new option
`org-capture-templates-contexts'.
(Storing searches): Document the new option
`org-agenda-custom-commands-contexts'.

This idea comes from Sylvain Rousseau, who implemented a similar
feature with org-context.el: https://github.com/thisirs/org-context

This implementation is a bit simpler and more general.  Simpler
because it relies on existing templates, no need to define other
contextual ones.  More general because contexts can be defined
wrt files and modes.

Thanks *very much* to Sylvain for paving the way -- certainly a
great addition to Org.
2012-08-23 11:08:47 +02:00
Bastien Guerry 6a69ceaed6 org-agenda.el: Fix a bug in category filtering
* org-agenda.el (org-prepare-agenda): Minor code clean-up.
(org-agenda-filter-by-category): Filtering must be turned off
only when a category filter has been set and this filter is
not empty.
2012-08-21 18:12:16 +02:00
Bastien Guerry 88213fff61 org-agenda.el: Code clean-up
* 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): Use
`category-pos' instead of `org-category-pos'.
2012-08-21 18:01:30 +02:00
Bastien Guerry 4e5ed3c453 org-agenda.el (org-agenda-persistent-marks): Minor docstring enhancement
* org-agenda.el (org-agenda-persistent-marks): Minor docstring enhancement.
2012-08-20 08:02:36 +02:00
Bastien Guerry 523f13dd08 org-agenda.el: New 'warntime property for agenda entries
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Add the 'warntime as a text
property, getting its value from the APPT_WARNTIME property.
(org-agenda-to-appt): Use the 'warntime text property.

Thanks to Ivan Kanis for reporting a bug related to this.
2012-08-19 21:48:52 +02:00
Bastien Guerry 655da8d1d3 Remove useless (t nil) sexps at the end of some (cond ...) constructs
* org.el (org-compute-latex-and-specials-regexp)
(org-paste-subtree, org-sort-entries, org-store-link)
(org-open-at-point, org-file-remote-p, org-add-log-setup)
(org-set-tags-to, org-fast-tag-selection)
(org-diary-sexp-entry): Ditto.

* org-agenda.el (org-agenda-get-blocks, org-cmp-priority)
(org-cmp-effort, org-cmp-todo-state, org-cmp-alpha)
(org-cmp-tag, org-cmp-time): Remove useless (t nil) sexps at
the end of (cond ...) constructs.

* org-mobile.el (org-mobile-create-index-file): Ditto.

* org-lparse.el (org-lparse-format-table-row): Ditto.

* org-list.el (org-sort-list): Ditto.

* org-id.el (org-id-get): Ditto.

* org-html.el (org-export-html-preprocess): Ditto.

* org-exp.el (org-default-export-plist)
(org-table-clean-before-export): Ditto.

(t nil) in (cond (...) (...) (t nil)) has no other meaning that to
remind the developer that the cond sexp returns nil in case no condition
is matched.  For several (cond ...) constructs this is obvious from reading
the code.  For others, the reminder might be useful and we leave it.

See the discussion about this on emacs-devel:
http://thread.gmane.org/gmane.emacs.devel/152664
2012-08-19 14:42:54 +02:00
Bastien Guerry 76b0d582b8 Replace Emacs version to "24.2" by "24.3"
This is needed because the current HEAD of the git repository
will not be synced with Emacs 24.2 but more likely with Emacs 24.3.
2012-08-16 09:24:58 +02:00
Bastien Guerry 57166defd1 org-agenda.el (org-agenda-menu-two-column): Rename to `org-agenda-menu-two-columns'
* org-agenda.el (org-agenda-menu-two-column): Rename to
`org-agenda-menu-two-columns'.
2012-08-15 10:31:22 +02:00
Bastien Guerry d1b72db961 org-agenda.el (org-diary): Fix tiny typo
* org-agenda.el (org-diary): Fix tiny typo.
2012-08-13 16:30:43 +02:00
Bastien Guerry 9a9d4e3666 Fix some warnings. 2012-08-13 00:36:15 +02:00
Bastien Guerry 82af1bb96c org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at' to allow tag inheritance
* org-agenda.el (org-agenda-get-sexps): Use `org-get-tags-at'
to allow tag inheritance.

Thanks to Simon Thum for suggesting this.
2012-08-11 19:52:56 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 621364fc6d org-agenda.el: Add a 'tags property for agenda entries created from sexps
* org-agenda.el (org-agenda-get-sexps): Add a 'tags property
for agenda entries created from sexps.

Thanks to Simon Thum for reporting this.
2012-08-10 12:29:51 +02:00
Bastien Guerry 068a354747 org-agenda.el (org-agenda-switch-to): Run hooks in ̀org-agenda-after-show-hook'
* org-agenda.el (org-agenda-switch-to): Run hooks in
̀org-agenda-after-show-hook'.

Thanks to Jack Erwin for suggesting this.
2012-08-10 10:12:44 +02:00
Christophe Junke 9dae6f04b1 Let `org-agenda-time-grid' control if the grid is displayed.
* org-agenda.el (org-agenda-list): Ensure that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to `rtnall' before checking if the latter is emtpy.

In the case where rtnall is empty (no item for current day), we do not
call org-agenda-add-time-grid-maybe.  This seems bogus because that
function is already computing whether the time grid must be included,
and does so according to the user's preferences.

In particular, the `org-agenda-time-grid' variable has a
'require-timed' parameter controlling the visibility of the time grid.

So, this patch :

 - removes the premature check for rtnall being empty,
 - inconditionally calls org-agenda-add-time-grid-maybe,
 - and finally checks the emptiness of the resulting list
   before pretty printing.

TINYCHANGE
2012-08-07 23:44:08 +02:00
Bastien Guerry 179f5e484a org-agenda.el: New commands `org-agenda-next/previous-item'.
* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-show-priority' to `C-c,' instead of `P'.
(org-agenda-next-item, org-agenda-previous-item): New
commands to move by one item down/up in the agenda.
(org-agenda-mode-map): Bind `org-agenda-next-item' and
`org-agenda-previous-item' to `N' and `P' respectively.

Thanks to Eric Abrahamsen for this idea and a first patch.
2012-08-07 23:11:26 +02:00
Bastien Guerry 6f571de2f0 org-agenda.el: More appropriate error when there is no Org agenda.
* org-agenda.el (org-agenda-check-type): Throw a more
appropriate error message when no agenda is currently being
displayed.
2012-08-05 09:16:40 +02:00
Bastien Guerry b771d4b05b org-agenda.el: Bugfix for `org-agenda-write'.
* org-agenda.el (org-agenda-write): Fix bug when writing
agenda to an external file while `org-agenda-sticky' is
non-nil.
2012-08-01 16:32:36 +02:00
Bastien Guerry a865abb5fe Let's a :APPT_WARNTIME: property override `appt-message-warning-time' in `org-agenda-to-appt'.
* org.el (org-speed-commands-default): New speedy command to
quickly add the :APPT_WARNTIME: property.

* org-agenda.el (org-agenda-to-appt): Use the :APPT_WARNTIME:
property to override `appt-message-warning-time' when adding
an appointment from an entry.

* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and
its use in `org-agenda-to-appt'.

This feature has been suggested, along with preliminary patches,
by Ivan Kanis.  Thanks!
2012-08-01 16:05:47 +02:00
Bastien Guerry 9f66ab1d84 Fix bug when using `org-store-agenda-views' with `org-agenda-sticky' on.
* org-agenda.el (org-batch-store-agenda-views): Use the sticky
agenda buffer name, if required.
(org-agenda-write): New parameter `agenda-bufname' to allow
setting the agenda buffer name.

Thanks to François Allisson for reporting this bug.
2012-07-30 12:19:17 +02:00
Bastien Guerry 8eb584331a Add punctuation at the end of the first line of docstrings. Code cleanup. 2012-07-30 10:08:15 +02:00
Bastien Guerry 46daa10bf3 org-agenda.el (org-agenda-start-with-log-mode): Add relevant customization types.
* org-agenda.el (org-agenda-start-with-log-mode): Add relevant
customization types.

Thanks to John Wiegley for raising this issue and to Carsten for
directions.
2012-07-28 18:53:11 +02:00
Achim Gratz 044b0ff7e8 Fix breakage from previous commit
* lisp/org-element.el: Do not (require 'org).

* lisp/org-agenda.el: Remove duplicate requires.
2012-07-28 07:21:20 +02:00
Max Mikhanosha 2443318f18 Fix undefined org-habit-show-all-today variable when org-habit is not loaded
* lisp/org-agenda.el (defvar org-habit-show-habits-only-for-today): initialize to nil

TINYCHANGE
2012-05-29 16:39:54 -04:00
Max Mikhanosha e67734fe8e Add ability to show all (even unscheduled) habits on today agenda, by
setting `org-habit-show-all-today' to t.

* lisp/org-agenda.el (defvar org-habit-show-all-today): new variable
(org-agenda-get-scheduled): show all habits if user wants it
* lisp/org-habit.el (defcustom org-habit-show-all-today): new variable
2012-05-28 14:56:23 -04:00
Bastien Guerry 2a7321f70a Revert "Let org-agenda-time-grid control if the grid is displayed"
This reverts commit 993dd076fb.
2012-05-26 06:22:51 +02:00
Christophe Junke 993dd076fb Let org-agenda-time-grid control if the grid is displayed
* lisp/org-agenda.el (org-agenda-list): Ensures that the
list returned by `org-agenda-add-time-grid-maybe' is appended
to ̀rtnall' before checking if the latter is emtpy.

In the case where `rtnall' is empty (no item for current day),
we do not call `org-agenda-add-time-grid-maybe'.  This seems
bogus because that function is already computing whether the
time grid must be included, and does so according to the
user's preferences.

In particular, the `org-agenda-time-grid' variable has a
`require-timed' parameter controlling the visibility of the
time grid.

So, this patch :

 - removes the premature check for `rtnall' being empty,
 - inconditionally calls `org-agenda-add-time-grid-maybe',
 - appends the result to `rtnall',
 - and finally checks the emptiness of the resulting list
   before pretty printing.

TINYCHANGE
2012-05-26 00:19:01 +02:00
Achim Gratz 595d451280 use org-no-warnings macro for XEmacs compatibility
* lisp/org-agenda.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-bbdb.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-clock.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org.el: Replace with-no-warnings with org-no-warnings (defined
  in org-macs.el).
2012-05-19 09:48:57 +02:00
Bastien Guerry 4f60b5f3a5 Use (with-no-warnings ...) construct for `date' and `entry'. 2012-05-17 11:07:19 +02:00
Bastien Guerry 505cc7a221 org-agenda.el: Remove any timestamp from the headline text.
* org-agenda.el (org-agenda-get-timestamps): Remove any
active timestamp from the headline text, not only those for
the current date.

Thanks to SW, Nick Dokos, Samuel Wales and Brian van den Broek
for inputs about this.
2012-05-08 16:09:25 +02:00
Bastien Guerry 0727ce7030 org-agenda.el: Fix bug: use `org-agenda-bulk-unmark-all'.
* org-agenda.el (org-agenda-bulk-action): Fix bug: use
`org-agenda-bulk-unmark-all'.
2012-05-08 10:44:13 +02:00
Bastien Guerry e508b497a3 org-agenda.el (org-agenda-view-mode-dispatch): message more readable.
* org-agenda.el (org-agenda-view-mode-dispatch): Make the
message more readable.
2012-05-05 09:57:30 +02:00
Bastien Guerry 39204efe9a New command `org-agenda-bulk-mark-all' bound to `*'. Other minor enhancements.
* org-agenda.el (org-agenda-mode-map): New keybinding ̀*' to
mark all entries for bulk action.
(org-agenda-menu): New menu item for marking all entries.
(org-agenda-bulk-mark-all): New function to mark all entries.
(org-agenda-bulk-mark-regexp): Minor docstring fix.
(org-agenda-bulk-unmark): With a prefix argument, unmark all.
Also send a better message.
(org-agenda-bulk-remove-all-marks): Rename to
`org-agenda-bulk-unmark-all'.  Check against
`org-agenda-bulk-marked-entries' before trying to unmark
entries.  Minor docstring fix.
(org-agenda-bulk-unmark-all): Renamed from
̀org-agenda-bulk-remove-all-marks'.
2012-05-05 09:21:22 +02:00
Bastien Guerry a16814a475 New option ̀org-agenda-bulk-mark-char'.
* org-agenda.el (org-agenda-bulk-mark-char): New option.
(org-agenda-bulk-mark): Use the new option.
2012-05-05 09:07:37 +02:00
Bastien Guerry e5c8780e5c Merge branch 'maint' 2012-05-01 10:04:46 +02:00
Bastien Guerry adb10d1543 org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug.
* org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug when
setting the number of marked entries.
2012-05-01 10:04:31 +02:00
Bastien Guerry 237c65b1f7 org.el: Fix `org-diary' again by checking `org-agenda-buffer' correctly. 2012-04-30 00:04:20 +02:00
Bastien Guerry 982b7b972f Merge branch 'fix-org-diary-bug' into fix-compiler-warnings 2012-04-28 22:23:40 +02:00
Bastien Guerry 4b8359a395 org-agenda.el: Prevent org-diary to fail.
* org-agenda.el (org-diary): Prevent failure from
`org-compile-prefix-format' when there is no agenda buffer.

Thanks to Rafael who reported this.
2012-04-28 22:23:08 +02:00
Bastien Guerry c5f73635d0 Replace obsolete variable `buffer-substring-filters'.
* org-agenda.el (org-agenda-mode): Replace obsolete variable
`buffer-substring-filters'.

* org-indent.el (org-indent-mode): Ditto.
2012-04-28 21:36:58 +02:00
Bastien Guerry 5add9cdef0 org-agenda.el: Implement `org-agenda-persistent-marks' for bulk actions.
* org-agenda.el (org-agenda-persistent-marks): New option to
keep marks after a bulk action.  The option defaults to nil.
(org-agenda-bulk-action): Use the new option.

* org.texi (Agenda commands): Document persistent marks.
2012-04-24 18:10:55 +02:00
Toby S. Cubitt 9432a9f1a0 Agenda: Add org-agenda-skip-timestamp-if-deadline-is-shown
* lisp/org-agenda.el (org-agenda-skip-timestamp-if-deadline-is-shown):
Skip timestamp items in agenda view if item is already shown as a
deadline item.
(org-agenda-skip-dealine-if-done): Pass deadline results to
org-agenda-get-timestamps.
(org-agenda-get-timestamps): Optionally take list of deadline results,
so that timestamp results can be skipped if already included in
deadline results.
2012-04-23 12:50:43 +02:00
Toby S. Cubitt 987b185e90 Agenda: Add org-agenda-diary-sexp-prefix customization option
* lisp/org-agenda.el (org-agenda-diary-sexp-prefix): Regexp matching
deadline/scheduling information to be displayed in diary sexp agenda
items.
(org-agenda-get-sexps): Extract deadline/scheduling information from
diary sexp entries.
2012-04-23 12:48:43 +02:00
Bastien Guerry 94bc01e77e org-agenda.el: Small fix. Use `org-called-interactively-p' instead of `called-interactively-p'. 2012-04-22 23:15:04 +02:00
Bastien Guerry de7c48759c Let `org-toggle-sticky-agenda' output a message only when called interactively.
* org-agenda.el (org-toggle-sticky-agenda): Only shout a
message when called interactively.
(org-agenda-get-restriction-and-command): Call
`org-toggle-sticky-agenda' interactively.
2012-04-22 15:27:21 +02:00
Bastien Guerry 18cf324f07 org-agenda.el: Fix bug in top-category filtering.
* org-agenda.el (org-agenda-top-category-filter): New variable
for storing the current top-category filter.
(org-agenda-redo): Apply a top-category filter, if any.
(org-agenda-filter-by-top-category)
(org-agenda-filter-top-category-apply): Set
`org-agenda-top-category-filter' to the right value.

Thanks to John Wiegley for reporting this.
2012-04-22 09:21:42 +02:00
Max Mikhanosha 7094dddca4 * lisp/org-agenda.el (org-agenda-quit): Fixed messed up parenthesis in previous commit
TINYCHANGE
2012-04-21 08:40:58 -04:00
Max Mikhanosha 9e4cacc803 Fix q key in sticky agenda not honoring org-agenda-restore-windows-after-quit
* lisp/org-agenda.el (org-agenda-quit): copy the code for optionally
  restoring window configuration after burying the sticky agenda
  buffer.
2012-04-21 08:32:12 -04:00
Madan Ramakrishnan edb7e341d1 org-agenda.el: Fix `org-agenda-bulk-toggle'.
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.

Problem here was that `org-agenda-bulk-toggle' calls
`org-agenda-bulk-mark' with no parameters; however, the (max arg 1)
call inside `org-agenda-bulk-mark' will fail with no parameter.

TINYCHANGE
2012-04-21 12:13:16 +02:00
Bastien Guerry d5c0af72cf Use (derived-mode-p 'org-mode) instead of (eq major-mode 'org-mode).
* org.el (org-show-hierarchy-above, org-cycle)
(org-global-cycle, org-files-list, org-store-link)
(org-link-search, org-open-file, org-display-outline-path)
(org-refile-get-location, org-update-all-dblocks)
(org-change-tag-in-region, org-entry-properties)
(org-save-all-org-buffers, org-revert-all-org-buffers)
(org-buffer-list, org-cdlatex-mode)
(org-install-agenda-files-menu, org-end-of-subtree)
(org-speedbar-set-agenda-restriction): Use (derived-mode-p
'org-mode) instead of (eq major-mode 'org-mode).

* org-timer.el (org-timer-set-timer): Ditto.

* org-table.el (orgtbl-mode, org-table-align, orgtbl-mode): Ditto.

* org-src.el (org-edit-src-exit, org-edit-src-code)
(org-edit-fixed-width-region, org-edit-src-exit): Ditto.

* org-remember.el (org-remember-handler): Ditto.

* org-mouse.el (dnd-open-file, org-mouse-insert-item): Ditto.

* org-macs.el (org-get-limited-outline-regexp): Ditto.

* org-lparse.el (org-replace-region-by): Ditto.

* org-latex.el (org-latex-to-pdf-process)
(org-replace-region-by-latex): Ditto.

* org-indent.el (org-indent-indent-buffer): Ditto.

* org-id.el (org-id-store-link, org-id-update-id-locations)
(org-id-store-link): Ditto.

* org-html.el (org-export-html-preprocess)
(org-replace-region-by-html): Ditto.

* org-footnote.el (org-footnote-normalize)
(org-footnote-goto-definition)
(org-footnote-create-definition, org-footnote-normalize): Ditto.

* org-docbook.el (org-replace-region-by-docbook): Ditto.

* org-ctags.el (find-tag): Ditto.

* org-colview.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-colview-xemacs.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-capture.el (org-capture-insert-template-here)
(org-capture, org-capture-finalize)
(org-capture-set-target-location)
(org-capture-insert-template-here): Ditto.

* org-ascii.el (org-replace-region-by-ascii):  Ditto.

* org-archive.el (org-archive-subtree): Ditto.

* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-search-view)
(org-tags-view, org-agenda-get-day-entries)
(org-agenda-format-item, org-agenda-goto, org-agenda-kill)
(org-agenda-archive-with, org-agenda-switch-to): Ditto.
2012-04-21 00:43:16 +02:00
Bastien Guerry ec921a2a68 Support hourly repeat cookies.
* org.el (org-repeat-re)
(org-clone-subtree-with-time-shift, org-auto-repeat-maybe)
(org-deadline, org-schedule, org-matcher-time)
(org-time-stamp, org-read-date, org-read-date-get-relative)
(org-display-custom-time, org-get-wdays)
(org-time-string-to-absolute, org-closest-date)
(org-timestamp-change): Allow to set hourly repeat cookie.
Send an error when an hourly repeat cookie is set and no hour
is specified in the timestamp.

* org.texi (Repeated tasks): Document repeat cookies for
years, months, weeks, days and hours.

* org-agenda.el (org-agenda-get-timestamps): Match hourly
repeat cookies.

* org-icalendar.el (org-print-icalendar-entries): Handle
hourly repeat cookies.

Thanks a lot to Takafumi Arakaki for this idea and for a preliminary
version of this patch.
2012-04-21 00:42:56 +02:00
Toby S. Cubitt f426dadef0 Agenda: Add new todo-unblocked and nottodo-unblocked skip conditions
* lisp/org-agenda.el (org-agenda-skip-if, org-agenda-skip-if-todo):
Add new todo-unblocked and nottodo-unblocked skip conditions.  These
match as for todo and nottodo, but only for unblocked todo items.

TINYCHANGE

This patch adds two new tests to `org-agenda-skip-if': 'todo-unblocked
and 'nottodo-unblocked.  These match like 'todo and 'nottodo, but only on
unblocked todo items.  This type of test is useful when compiling custom
agenda views containing lists of currently actionable todo items.

Whilst it's possible to code such tests in `org-agenda-custom-commands'
directly (well, Elisp is Turing-complete: you can in principle code
anything!), it's far less convenient than a simple `org-agenda-skip-if'
test which can reuse much of the existing machinery.

Note that the attached patch applies on top of my other "Fix
org-agenda-skip-if bug" patch, though this new feature is independent of
that bug-fix.
2012-04-20 12:12:42 +02:00
Bastien Guerry d1f1c586d5 Fix merge conflict. 2012-04-20 11:43:27 +02:00
Madan Ramakrishnan ec56dc8ead org-agenda.el: Fix `org-agenda-bulk-toggle'.
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.

Problem here was that `org-agenda-bulk-toggle' calls
`org-agenda-bulk-mark' with no parameters; however, the (max arg 1)
call inside `org-agenda-bulk-mark' will fail with no parameter.

TINYCHANGE
2012-04-20 11:35:21 +02:00
Bastien Guerry ee6347cc7f org-agenda.el: Bind `^' to `org-agenda-filter-by-top-category'.
* org-agenda.el (org-agenda-mode-map): Bind `^' to
`org-agenda-filter-by-top-category'.
2012-04-17 11:28:44 +02:00
Bastien Guerry 5659dbeebe Delete trailing spaces. 2012-04-17 11:25:22 +02:00
Bastien Guerry a6349c2f50 Fix compiler warnings. 2012-04-17 11:17:17 +02:00
Max Mikhanosha ec7bd3b1be Fix org-agenda-to-appt, which got broken by sticky agenda
* lisp/org-agenda.el (org-agenda-new-marker): Check for NIL org-agenda-buffer
(org-agenda-to-appt): Bind org-agenda-buffer to NIL
2012-04-16 18:55:41 -04:00
Max Mikhanosha 973efcd9c9 Merge branch 'max-sticky-agenda' 2012-04-16 05:25:06 -04:00
John Wiegley 3bd1c2e9bf Added new `org-agenda-filter-by-top-category' command 2012-04-16 03:13:22 -05:00
Max Mikhanosha 7212801808 Merged origin/master into max-sticky-agenda 2012-04-13 18:15:18 -04:00
Bastien Guerry 990558eb21 Merge branch 'hotfix' 2012-04-10 22:26:18 +02:00
Bastien Guerry bfe8ec1fce org-agenda.el: Fix inconsistency in `org-agenda-filter-apply' for category filters.
* org-agenda.el (org-agenda-filter-make-matcher)
(org-agenda-filter-apply): Allow filtering entries out by
category.  Using `C-u <' from the agenda view will redisplay
the agenda without entries from categories of the current
line.

Thanks to John Wiegley for pointing this out.
2012-04-10 22:25:53 +02:00
Bastien Guerry 5841dbd5ec Merge branch 'hotfix' 2012-04-10 20:23:29 +02:00
Bastien Guerry 3ec180b88f Revert "org-agenda.el: Remove useless prefix argument."
This reverts commit 346907b996.
2012-04-10 20:23:15 +02:00
Bastien Guerry 4611adac23 Merge branch 'hotfix' 2012-04-10 20:09:33 +02:00
Bastien Guerry 346907b996 org-agenda.el: Remove useless prefix argument.
* org-agenda.el (org-agenda-filter-by-category): Remove
useless prefix argument.

Thanks to John Wiegley for spotting this.
2012-04-10 20:09:28 +02:00
Bastien Guerry ae4ba1b35c Add :version to org-agenda.el options. 2012-04-03 13:40:11 +02:00
Bastien Guerry a5774431b3 Merge branch 'hotfix-7.8.06' 2012-04-02 16:46:02 +02:00
Bastien Guerry 7ea4efd411 Don't rename `entry' to `org-entry'.
This issue should be handled more carefully.
2012-04-02 16:45:47 +02:00
Bastien Guerry 967783215b Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org.el
2012-03-31 11:04:40 +02:00
Bastien Guerry 6cbf1f4172 Fix global dynamic variables in org-agenda.el and org.el.
Thanks to Martyn Jago for preliminary work on this.
2012-03-30 23:04:55 +02:00
Bastien Guerry 86643eba4f org-agenda.el (org-agenda-filter-apply): Bugfix: Add a missing let binding.
* org-agenda.el (org-agenda-filter-apply): Bugfix: Add let
binding.
2012-03-23 22:13:59 +01:00
Max Mikhanosha 013d9f03f2 When an agenda item with 'extra property (such as Scheduled 2x)
is redisplayed, it was losing the 'extra property on redisplay

* lisp/org-agenda.el (org-agenda-change-all-lines): move accessing of
'extra text property outside of with-current-buffer for original
buffer
2012-03-22 15:02:54 -04:00
Bastien Guerry b54ad29fa3 Merge branch 'hotfix-7.8.06' 2012-03-22 01:19:24 +01:00
Bastien Guerry 2fa0aa69ea org-agenda.el: Fix incorrect custom option definition.
* org-agenda.el (org-agenda-custom-commands-local-options):
Fix incorrect custom option definition.

Thanks to Joe Vornehm Jr. for this patch.
See http://patchwork.newartisans.com/patch/1231/
2012-03-22 01:19:03 +01:00
Bastien Guerry 44bf4de900 Merge branch 'hotfix-7.8.06'
Conflicts:
	lisp/org-agenda.el
2012-03-20 13:06:26 +01:00
Bastien Guerry fc717f3eb7 Fix compiler warnings. 2012-03-20 13:04:55 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
David Maus cd2d138883 Don't reset `org-done-keywords-for-agenda' when org-agenda-multi
* org-agenda.el (org-prepare-agenda): Don't reset
`org-done-keywords-for-agenda' when org-agenda-multi.

Fixes a bug with DONE keywords in org-todo face reported by Hans-Peter
Deifel in <87r4xwypxh.fsf@hpdeifel.de>.
2012-03-18 17:58:12 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Bastien Guerry b66ff157e1 Merge branch 'maint' 2012-03-16 19:19:24 +01:00
Bastien Guerry 8e7f84ea3d org-agenda.el: Fix the order conditions are being checked.
* org-agenda.el (org-agenda-skip-if): Fix the order conditions
are being checked.  Also enhance the docstring a bit.

TINYCHANGE

Thanks to Toby Cubitt for a patch to this effect.
2012-03-16 19:18:41 +01:00
Bastien Guerry ced72ea5d8 org-agenda.el: Fix the display of indirect agenda window.
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix the
display of indirect agenda window.

TINYCHANGE

Thanks to Dave Abrahams for a patch to this effect.
2012-03-16 19:05:26 +01:00
Eric Schulte 07ac15ef72 Merge branch 'origin-maint'
Conflicts:
	lisp/org-src.el
2012-03-14 09:56:52 -04:00
Eric Schulte 4542824f2c fix compiler warnings
* lisp/ob.el (org-strip-protective-commas): Declared.
* lisp/org-agenda.el (org-agenda-filtered-by-category): Declared.
  (org-agenda-filter-apply): Capture free variable.
* lisp/org-footnote.el (org-skip-whitespace): Declared.
* lisp/org-mobile.el (org-agenda-filter): Declared.
* lisp/org-src.el (org-strip-protective-commas): Declared.
2012-03-14 09:55:04 -04:00
Carsten Dominik b771abdfd2 Fix :set property of `org-agenda-sticky'
* lisp/org-agenda.el (org-toggle-sticky-agenda):
(org-agenda-sticky): Improve :set property.
2012-03-10 17:44:23 +01:00
Max Mikhanosha 86dd7d27a3 org-agenda-sticky: Make customizing it call `org-toggle-sticky-agenda' 2012-03-10 08:33:21 -05:00
Carsten Dominik 7fd1c2ad71 Silence the compiler about a dynamically scoped variable 2012-03-10 08:03:53 +01:00
Carsten Dominik 39c763020a Clean up local variable stuff and document sticky agenda buffers
* lisp/org-agenda.el (org-agenda-local-vars): Clean up the variable list.
(org-agenda-get-restriction-and-command): Add a key for toggling
sticky agenda views.

* doc/org.texi (Agenda dispatcher): Document sticky agenda views
and the new key for them.
2012-03-10 08:02:46 +01:00
Carsten Dominik 565170e27f Final decisions about global/local for sticky agendas.
This is just an intermediate commit, to make sure that the comments
are all visible in the git history.

* lisp/org-agenda.el (org-agenda-local-vars): Final decisions about global/local
2012-03-10 07:21:30 +01:00
Max Mikhanosha 41ab6e292a Remove org-prefix-format-compiled from locals list 2012-03-09 10:12:59 -05:00
Carsten Dominik ed3186d427 Careful analysis of local variables for sticky agendas
* lisp/org-agenda.el (org-agenda-force-single-file): Variable removed.
(org-prepare-agenda-window): Store pre-agenda window config locally.
(org-timeline): Introduce a scoped version of `org-agenda-show-log'.
(org-agenda-list): Introduce a scoped version of
`org-agenda-show-log'.
(org-agenda-get-progress): Use the scoped version of
`org-agenda-show-log'.
(org-agenda-local-vars): Write the analysis result as a comment - to
be cleaned up in the next iteration.
2012-03-09 14:36:03 +01:00
Carsten Dominik 820a36f66c Implement proper handling of agenda markers when using sticky agendas
* lisp/org-agenda.el (org-toggle-sticky-agenda): Kill all agenda buffers
when toggling sticky-agendas.
(org-agenda-get-restriction-and-command): Add `C-c a C-k' as a key to
explicitly kill all agenda buffers.
(org-agenda-run-series): Remove any old agenda markers in the buffer
that is going to take the new block agenda.
(org-prepare-agenda): Reset markers before erasing the buffer anc
running `org-agenda-mode', because after that hte local variable
`org-agenda-markers' will have gone away.
(org-agenda-Quit):
(org-finalize-agenda): Install the marker resetter into
the `kill-buffer-hook'.
(org-agenda-save-markers-for-cut-and-paste): Look for markers in all
agenda buffers.
(org-agenda-kill-all-agenda-buffers): New function.
2012-03-09 09:33:46 +01:00
Carsten Dominik d4cd88bfe5 Merge branch 'master' into max-sticky-agenda 2012-03-09 05:37:35 +01:00
Bastien Guerry b879590f3b Merge branch 'maint' 2012-03-08 13:50:51 +01:00
Adam Spiers 11e441e85f Fix typos 2012-03-08 13:50:19 +01:00
Carsten Dominik 79472e466f Merge branch 'master' into max-sticky-agenda 2012-03-06 07:30:16 +01:00
Carsten Dominik bc608605ca Remove another commented line 2012-03-05 10:37:05 +01:00
Carsten Dominik 1f613bb011 Remove a commented line 2012-03-05 10:32:56 +01:00
Carsten Dominik b40226a597 Test commit on new branch 2012-03-05 10:19:16 +01:00
David Maus 21c7ad67cf Merge branch 'maint'
org-bbdb in master already contained declare-function for external
bbdb-functions.

Conflicts:
	lisp/org-bbdb.el
2012-03-04 20:53:05 +01:00
Karl Fogel 1749db14fb org-agenda: Handle case of heading w/ date but no keyword
* lisp/org-agenda.el (org-agenda-highlight-todo): Handle the case of a
  heading that has a date but no todo keyword.

This is a fix for the args-out-of-range bug discussed in these threads:

  http://thread.gmane.org/gmane.emacs.orgmode/52621
  http://thread.gmane.org/gmane.emacs.orgmode/52793
  http://thread.gmane.org/gmane.emacs.orgmode/52786
  http://thread.gmane.org/gmane.emacs.orgmode/52810

The discussions involved Ilya Shlyakhter, James Atwood, Nick Dokos,
and myself, and the subject headers are:

  bug report: agenda timeline crashes
  Bug report: weekly agenda and blank, timestamped headers
  org-agenda-list (from git) giving "args-out-of-range error"

TINYCHANGE
2012-03-04 20:13:05 +01:00
Max Mikhanosha ed0859969b Fix exiting sticky agenda refresh with C-g, was forgetting what kind of agenda it was 2012-03-03 11:04:12 -05:00
Max Mikhanosha 1b3dc456e4 Automatically name sticky agenda buffers with keys used to invoke it, patch
by Carsten Dominik
2012-03-03 08:57:32 -05:00
Max Mikhanosha 1bbf87a968 Apply Carsten's patch to prune org-agenda-local-vars list 2012-03-02 11:40:54 -05:00
Max Mikhanosha 68f802ca72 Re-create mulitple-agenda-buffers support, to avoid git rebase hell 2012-03-01 10:49:23 -05:00
David Maus 2adf4b059b Merge branch 'maint' 2012-02-25 11:13:58 +01:00
David Maus 89949e69a3 org-agenda: Fix handling of indirect buffer and window
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Fix handling of
indirect buffer and window.

Check if the window of last indirect buffer is still live and properly
handle the case of `org-last-indirect-buffer' being nil.

Changes suggested by Dave Abrahams in <m2boow1q9e.fsf@boostpro.com>.
2012-02-25 11:13:33 +01:00
Bastien Guerry d5ca0780f9 Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-02-19 08:23:42 -07:00
Bastien Guerry 04971de4b9 Add version tag "24.1" for options introduced since Emacs 23.4 (and <= 24.1)
* org-exp.el (org-export-kill-product-buffer-when-displayed)
(org-export-initial-scope, org-export-date-timestamp-format)
(org-export-with-tasks, org-export-email-info)
(org-export-table-remove-empty-lines): Add version tag.

* org-mobile.el (org-mobile-files-exclude-regexp)
(org-mobile-use-encryption, org-mobile-encryption-tempfile)
(org-mobile-encryption-password, org-mobile-agendas): Add
version tag.

* ob-plantuml.el (org-plantuml-jar-path): Add version tag.

* org.el (org-babel-load-languages, org-clone-delete-id)
(org-log-buffer-setup-hook)
(org-loop-over-headlines-in-active-region)
(org-use-sub-superscripts, org-startup-with-beamer-mode)
(org-startup-with-inline-images, org-ctrl-k-protect-subtree)
(org-catch-invisible-edits)
(org-link-search-must-match-exact-headline)
(org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp, org-log-refile)
(org-refile-use-cache)
(org-refile-active-region-within-subtree)
(org-todo-repeat-to-state, org-get-priority-function)
(org-agenda-jump-prefer-future)
(org-read-date-force-compatible-dates)
(org-use-effective-time)
(org-complete-tags-always-offer-all-agenda-tags)
(org-properties-postprocess-alist)
(org-format-latex-signal-error)
(org-latex-to-mathml-jar-file)
(org-latex-to-mathml-convert-command)
(org-export-latex-default-packages-alist)
(org-hidden-keywords, org-pretty-entities)
(org-pretty-entities-include-sub-superscripts)
(org-src-fontify-natively, org-effort-durations)
(org-speed-command-hook): Add version tag.

* org-html.el (org-export-html-footnote-separator)
(org-export-html-mathjax-options)
(org-export-html-mathjax-template)
(org-export-html-headline-anchor-format)
(org-export-html-preamble-format)
(org-export-html-postamble-format)
(org-export-html-table-align-individual-fields)
(org-export-html-protect-char-alist, org-export-html-divs):
Add version tag.

* org-ctags.el (org-ctags-path-to-ctags)
(org-ctags-open-link-functions)
(org-ctags-new-topic-template): Add version tag.

* ob-exp.el (org-export-babel-evaluate): Add version tag.

* org-beamer.el (org-beamer-use-parts)
(org-beamer-frame-level, org-beamer-frame-default-options)
(org-beamer-column-view-format, org-beamer-themes)
(org-beamer-environments-extra, org-beamer-fragile-re)
(org-beamer-outline-frame-title)
(org-beamer-outline-frame-options): Add version tag.

* org-wl.el (org-wl-link-remove-filter)
(org-wl-shimbun-prefer-web-links)
(org-wl-nntp-prefer-web-links, org-wl-disable-folder-check)
(org-wl-namazu-default-index): Add version tag.

* org-clock.el (org-task-overrun-text)
(org-clocktable-defaults, org-clock-clocktable-formatter)
(org-clock-clocktable-language-setup)
(org-clock-report-include-clocking-task)
(org-clock-resolve-expert): Add version tag.

* ob-lob.el (org-babel-lob-files): Add version tag.

* org-freemind.el (org-freemind-node-css-style): Add version
tag.

* org-archive.el (org-archive-reversed-order)
(org-archive-subtree-add-inherited-tags): Add version tag.

* org-bibtex.el (org-bibtex-autogen-keys, org-bibtex-prefix)
(org-bibtex-treat-headline-as-title)
(org-bibtex-export-arbitrary-fields)
(org-bibtex-key-property, org-bibtex-tags)
(org-bibtex-tags-are-keywords, org-bibtex-no-export-tags)
(org-bibtex-type-property-name): Add version tag.

* org-timer.el (org-timer-default-timer): Add version tag.

* org-taskjuggler.el (org-export-taskjuggler-extension)
(org-export-taskjuggler-project-tag)
(org-export-taskjuggler-resource-tag)
(org-export-taskjuggler-target-version)
(org-export-taskjuggler-default-project-version)
(org-export-taskjuggler-default-project-duration)
(org-export-taskjuggler-default-reports)
(org-export-taskjuggler-default-global-properties): Add
version tag.

* org-habit.el (org-habit-today-glyph)
(org-habit-completed-glyph): Add version tag.

* org-list.el (org-alphabetical-lists)
(org-list-ending-method, org-list-end-regexp)
(org-list-automatic-rules, org-list-use-circular-motion)
(org-list-indent-offset): Add version tag.

* ob-picolisp.el (org-babel-picolisp-cmd): Add version tag.

* org-icalendar.el (org-icalendar-alarm-time)
(org-icalendar-combined-description)
(org-icalendar-honor-noexport-tag)
(org-icalendar-date-time-format): Add version tag.

* org-src.el (org-src-tab-acts-natively): Add version tag.

* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
version tag.

* org-table.el (org-table-exit-follow-field-mode-when-leaving-table)
(org-table-fix-formulas-confirm)
(org-table-duration-custom-format)
(org-table-formula-field-format): Add version tag.

* org-publish.el (org-publish-sitemap-sort-files)
(org-publish-sitemap-sort-folders)
(org-publish-sitemap-sort-ignore-case)
(org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): Add version tag.

* ob-js.el (org-babel-js-cmd): Add version tag.

* org-docbook.el (org-export-docbook-footnote-separator)
(org-export-docbook-xslt-stylesheet): Add version tag.

* org-entities.el (org-entities-ascii-explanatory)
(org-entities-user): Add version tag.

* ob.el (org-confirm-babel-evaluate)
(org-babel-no-eval-on-ctrl-c-ctrl-c): Add version tag.

* ob-tangle.el (org-babel-tangle-lang-exts)
(org-babel-post-tangle-hook, org-babel-pre-tangle-hook)
(org-babel-tangle-body-hook)
(org-babel-tangle-comment-format-beg)
(org-babel-tangle-comment-format-end)
(org-babel-process-comment-text): Add version tag.

* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
Add version tag.

* org-crypt.el (org-crypt-disable-auto-save): Add version tag.

* org-inlinetask.el (org-inlinetask-default-state): Add
version tag.

* ob-scheme.el (org-babel-scheme-cmd): Add version tag.

* ob-lisp.el (org-babel-lisp-dir-fmt): Add version tag.

* org-attach.el (org-attach-store-link-p): Add version tag.

* org-capture.el (org-capture-templates)
(org-capture-before-finalize-hook)
(org-capture-after-finalize-hook): Add version tag.

* org-agenda.el (org-agenda-skip-deadline-prewarning-if-scheduled)
(org-agenda-time-leading-zero, org-agenda-follow-indirect)
(org-agenda-menu-two-column, org-agenda-menu-show-matcher)
(org-agenda-timegrid-use-ampm)
(org-agenda-remove-timeranges-from-blocks)
(org-agenda-inactive-leader, org-agenda-current-time-string)
(org-agenda-show-current-time-in-grid)
(org-agenda-search-view-force-full-words)
(org-agenda-search-view-always-boolean)
(org-agenda-clock-consistency-checks)
(org-agenda-include-deadlines)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-day-face-function)
(org-agenda-category-icon-alist)
(org-agenda-bulk-custom-functions)
(org-agenda-insert-diary-extract-time): Add version tag.

* org-latex.el (org-export-latex-inputenc-alist)
(org-export-latex-tag-markup)
(org-export-latex-timestamp-inactive-markup)
(org-export-latex-href-format)
(org-export-latex-hyperref-format)
(org-export-latex-footnote-separator)
(org-export-latex-quotes)
(org-export-latex-table-caption-above)
(org-export-latex-listings-w-names)
(org-export-latex-minted-langs)
(org-export-latex-listings-options)
(org-export-latex-minted-options)
(org-latex-default-figure-position, org-export-pdf-logfiles):
Add version tag.

* org-faces.el (org-faces-easy-properties)
(org-fontify-quote-and-verse-blocks, org-cycle-level-faces):
Add version tag.

* ob-ditaa.el (org-ditaa-jar-option): Add version tag.

Thanks to Glenn Morris for reporting this.
2012-02-13 15:49:28 +01:00
Bastien Guerry c74fe88c01 org-agenda.el: Allow `C-u' to display the item without unfolding drawers and logbooks.
* org-agenda.el (org-agenda-show-and-scroll-up): Allow `C-u'
to display the item without unfolding drawers and logbooks.
2012-01-24 17:03:03 +01:00
Bastien Guerry 95e71f5705 Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 8f93a75cac.
2012-01-19 16:21:50 +01:00
Bastien Guerry 9b9f2d0d8d Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit c41a6f5a33.
2012-01-19 16:20:07 +01:00
Bernt Hansen 8f93a75cac Honour existing restrictions when visiting tasks from the agenda
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
2012-01-11 16:42:35 +01:00
Bernt Hansen c41a6f5a33 Honour existing restrictions when clocking in from the agenda
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
2012-01-11 16:42:34 +01:00
Bastien Guerry a9c15fe9ab Don't create an alias for `list-diary-entries-hook'.
This is already taken care of by emacs/lisp/calendar/diary-lib.el
See comments in commit d6e40f.
2012-01-11 08:52:37 +01:00
Bastien Guerry d6e40fb347 Create an alias for `list-diary-entries-hook'.
* org-agenda.el: New alias for `list-diary-entries-hook'.

* org.el (org-babel-load-languages): Use "LaTeX".
2012-01-10 21:19:44 +01:00
Bastien Guerry fadca5e8eb Fix typos and spelling mistakes.
Thanks to Paul Eggert for this fixes in Emacs trunk.
2012-01-10 11:56:15 +01:00
Bastien Guerry 40ea26e7a6 Silent compiler warning. 2012-01-05 17:42:08 +01:00
Bastien Guerry 5eb414281d Fix compiler warning and define an alias for `org-agenda-filter'.
* org-agenda.el: Add an alias for `org-agenda-filter'.
(diary-list-entries-hook): Use the non-obsolete hook.
(org-agenda-filter-apply): Silent compiler warning.
2012-01-04 16:36:46 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Bastien Guerry 8c36e92f88 Implement category filtering.
* org-agenda.el (org-agenda-filter-preset): New alias.
(org-agenda-filter-by-category): New command.
(org-agenda-mode-map): Add the new command.
(org-agenda-custom-commands-local-options): Add category
filter preset.
(org-agenda-mark-filtered-text): Mark both tag and filter
overlays.
(org-agenda-category-filter-preset): New variable.
(org-finalize-agenda, org-agenda-redo)
(org-agenda-filter-make-matcher, org-agenda-filter-apply):
Handle both category and tag filters.
(org-agenda-filter-show-all-tag): Rename from
`org-agenda-filter-by-tag-show-all'.
(org-agenda-filter-show-all-cat): New function.
(org-agenda-set-mode-name): Show the category filter in the
modeline.

* org-faces.el (org-agenda-filter-category): New face.

* org.texi (Agenda commands): Update documentation about the
new category filtering feature.

This feature has been requested by several people -- thanks
to all of them for mentioning this possibility.
2011-12-31 17:10:44 +01:00
Carsten Dominik 4e0fe88f7e Merge branch 'master' of orgmode.org:org-mode 2011-12-31 15:24:14 +01:00
Carsten Dominik 21e99fedc4 Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit fc1f01c54e.
2011-12-31 15:23:43 +01:00
Carsten Dominik a954f0e01a Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 31d003ad28.
2011-12-31 15:23:23 +01:00
Bastien Guerry 112d128180 org-agenda.el: Small code cleanup.
* org-agenda.el (org-batch-agenda, org-batch-agenda-csv):
Remove deleted function `org-encode-for-stdout'.
2011-12-31 13:31:02 +01:00
Bastien Guerry 855213f481 Rename `org-write-agenda' to `org-agenda-write'.
* org-agenda.el (org-agenda-write): Rename from
`org-write-agenda'.
(org-agenda-mode-map, org-agenda-menu)
(org-batch-store-agenda-views): Use new name
`org-agenda-write'.
2011-12-31 12:45:05 +01:00
Bastien Guerry e9633aeb45 org-agenda.el: Use `read-char-exclusive' instead of `read-char'.
* org-agenda.el (org-agenda-filter-by-tag): Use
`read-char-exclusive' instead of `read-char'.
2011-12-31 11:45:54 +01:00
Bastien Guerry 6b5c0bd0b6 Merge branch '2-org-agenda-write-buffer-name' 2011-12-31 09:29:09 +01:00
Bernt Hansen 31d003ad28 Honour existing restrictions when visiting tasks from the agenda
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
2011-12-31 09:10:36 +01:00
Bernt Hansen fc1f01c54e Honour existing restrictions when clocking in from the agenda
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
2011-12-31 09:10:25 +01:00
Bastien Guerry 81f907c9f9 New variable `org-agenda-write-buffer-name'.
* org-agenda.el (org-agenda-write-buffer-name): New variable.
(org-write-agenda): Use it.

Setting this variable through `org-agenda-exporter-settings' can
be useful -- thanks to Konstantin Ziegler for mentioning this need.
2011-12-28 18:07:35 +01:00
Bastien Guerry dc1c9567b1 `org-agenda-do-tree-to-indirect-buffer': rewrite of the docstring. 2011-12-12 17:40:34 +01:00
Dave Abrahams 35d6d9f505 Maintain stable window config when `org-agenda-follow-indirect' is set.
* org-agenda.el (org-agenda-do-tree-to-indirect-buffer): New
function.
(org-agenda-tree-to-indirect-buffer): Use the new function.

TINYCHANGE

Without this change, `org-agenda-follow-indirect' tends to cause the
window configration to bounce around chaotically as you move from item
to item.
2011-12-12 17:37:16 +01:00
Bastien Guerry 5935f04289 org-agenda.el: small indentation fix. 2011-12-12 17:23:44 +01:00
Sebastien Vauban bfe779fe67 Add faces for "calendar events" (active timestamps, or S-expressions).
* org-agenda.el (org-agenda-get-timestamps)
	(org-agenda-get-sexps): Use face for highlighting "calendar"
	events.

	* org-faces.el: Add faces `org-agenda-calendar-event' and
	`org-agenda-calendar-sexp'.
2011-12-11 18:46:28 +01:00
Rob Giardina a42be4b0c0 Fix quoting in org-agenda-with-point-at-orig-entry.
* org-agenda.el (org-agenda-with-point-at-orig-entry): Small
bugfix.

TINYCHANGE
2011-12-11 14:47:25 +01:00
Bastien Guerry 4916e1d401 org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.
* org-agenda.el (org-agenda-dim-blocked-tasks): Fix typo.

Thanks to Paul Eggert for spotting this and fixing it in Emacs trunk.
2011-11-28 15:24:50 +01:00
Carsten Dominik b43c1c621f Fix function call order in previous patch
* lisp/org-agenda.el (org-agenda-get-todos): Swap calls to `org-trim' and
`buffer-substring'.
2011-11-14 08:35:12 +01:00
Nicolas Goaziou 57caa09106 org-agenda: Do not break TODO list view with empty tasks
* lisp/org-agenda.el (org-agenda-get-todos): Prevent an error when
  encountering tasks with only the TODO keyword.
2011-11-14 00:43:02 +01:00
Bastien Guerry 3267c69ccd Small improvements over the previous commit.
Use org-propertize instead of propertize and
use a better default for tags in the mode-line
when filtering.
2011-10-29 13:23:20 +02:00
Sebastien Vauban 639699518a Add custom face for highlighting tags used in agenda filtering.
* org-agenda.el (org-agenda-set-mode-name): Highlight tags
used for filtering (shown in the mode-line).

* org-faces.el: Add face `org-agenda-filter-tags'.
2011-10-29 13:19:41 +02:00
Bastien Guerry 728611fa77 Fix compiler warnings. 2011-10-28 17:26:22 +02:00
Bastien Guerry ef08850783 * org-agenda.el (calendar-check-holidays): Declare function.
Thanks to Achim Gratz for spotting this.
2011-10-28 16:53:36 +02:00
Matt Lundin 87fc97d131 Fix holidays symbol in org-class
* lisp/org-agenda.el: (org-class): Fix holidays symbol in org-class.
  This was resulting in an "Bad sexp..." warning.
2011-10-28 15:14:12 +02:00
Carsten Dominik 8444207d3e Make `diary-class' skip hlidays if the user asks for it.
* lisp/org-agenda.el (org-class): Allow holidays to be skipped.
2011-10-25 16:07:01 +02:00
Carsten Dominik 4e33bfb83a Mark `org-diary-class obsolete' 2011-10-25 16:00:06 +02:00
Peter Münster 68ffb7a7cc Agenda: Allow filter list without category in org-agenda-to-appt
* lisp/org-agenda.el (org-agenda-to-appt): Make sure filter-items are
strings before calling `string-match'.

Now it's possible to use (org-agenda-to-appt t '((headline "string"))).

TINYCHANGE
2011-10-24 23:43:58 +02:00
Bastien Guerry db04ef7498 org-agenda.el (org-agenda-to-appt): Better filtering.
* org-agenda.el (org-agenda-to-appt): Allow to refine the
scope of entries to pass to `org-agenda-get-day-entries' and
allow to filter out entries using a function.

Thanks to Peter Münster for raising a related issue and to
Tassilo Horn for this idea.
2011-10-23 23:21:34 +02:00
Bastien Guerry ba2d84b5f9 Merge branch 'master' of orgmode.org:org-mode 2011-10-23 23:03:03 +02:00
Bastien Guerry bc29a5c7ab Silence byte-compiler. 2011-10-23 22:45:53 +02:00
Nicolas Goaziou dc62cdcdf1 org-agenda: Fix small display bug.
* lisp/org-agenda.el: Fix small display bug.
2011-10-23 22:42:48 +02:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +02:00
David Maus 440ec7e2da Avoid conflict between bulk command and loop-over-headlines
* org-agenda.el (org-agenda-bulk-action): Bind
`org-loop-over-headlines-in-active-region' to nil to avoid conflict
with bulk command.
2011-10-22 16:20:44 +02:00
Bastien Guerry da5a68a0bc Rename `org-format-agenda-item' to `org-agenda-format-item'.
* org.el (org-format-agenda-item, org-scan-tags): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

* org-agenda.el (org-search-view)
(org-get-entries-from-diary, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-format-item, org-agenda-add-time-grid-maybe)
(org-agenda-change-all-lines)
(org-agenda-add-entry-to-org-agenda-diary-file): Rename
`org-format-agenda-item' to `org-agenda-format-item'.

Using the `org-agenda-' prefix makes more sense here.
2011-10-22 15:08:33 +02:00
Bastien Guerry e0c1855dba Silent byte-compiler about `category-pos'.
* org-agenda.el: Replace `category-pos' by `org-category-pos'
to silent byte-compiler.
2011-10-22 15:04:33 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Bastien Guerry 989b079dd7 org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.
* org-agenda.el (org-agenda-list-stuck-projects): Fix tiny bug.

This bug was introduced by a typo in Michael's patch for XEmacs
compatibility.
2011-10-22 10:13:11 +02:00
Carsten Dominik 0c8b9711a3 Agenda: Add missing option, document time stamp movement to future
* lisp/org-agenda.el (org-agenda-move-date-from-past-immediately-to-today):
New option.
(org-agenda-date-later): Improve the logical structure.

* doc/org.texi (Agenda commands): Document that S-right on a line
representing a past date will immediately shift that date to today.
2011-10-22 08:39:54 +02:00
Carsten Dominik 54a9cb0d99 Maintain XEmacs compatibility
* lisp/ob-calc.el (featurep): Require calc-store.
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix regexp
special handling.
* lisp/org-compat.el (fboundp): Support for XEmacs.
* lisp/org-exp.el (org-export): Protect XEmacs from `(redisplay)' call.
* lisp/org-footnote.el (org-footnote-re): Optimize macro processing.
* lisp/org.el (org-set-autofill-regexps): Xemacs compatibility.

Patch by Michael Sperber, checked and slightly modified by Carsten.
2011-10-21 22:36:53 +02:00
Leo 5e67e9d824 Check if marker is valid before use
* lisp/org-agenda.el (org-agenda-do-context-action): Check if marker
is valid before use.
2011-10-21 10:09:40 +02:00
Carsten Dominik 7caa7e1ff7 Fix shifting of data ranges.
* lisp/org-agenda.el (org-agenda-date-later): Fix shifting of date ranges.

Patch based on code by Niels Giesen.
TINYCHANGE
2011-10-21 10:07:02 +02:00
Carsten Dominik f20eef318e Agenda: New behaviour when shifting scheduled date forward.
* lisp/org-agenda.el (org-agenda-date-later): Make pushing forward
a past date to jump immedialtely to today.
2011-10-16 11:09:45 +02:00
Carsten Dominik 468aa115ef Merge branch 'master' of orgmode.org:org-mode 2011-10-08 09:02:36 +02:00
Dave Abrahams e53f62eba9 Add indirect agenda follow mode
* lisp/org-agenda.el (org-agenda-follow-indirect): New option.
(org-agenda-follow-mode): Call `org-agenda-do-context-action' fro
follow mode.
(org-agenda-do-context-action): Also do indirect follow mode action.

By setting `org-agenda-follow-indirect' to a non-nil value,
`org-agenda-follow-mode' will use an indirect buffer to display only
the current item, rather than the whole agenda file in which it lives
2011-10-08 09:01:50 +02:00
niels giesen 3d83564b7d Time range end in agenda view not displayed
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:

> michael holzer <michi_holzer_news@gmx.at> writes:
>
>> When I have an entry that contains a time range, for example:
>>
>> * timerange
>>   <2011-09-30 Fri 14:00>--<2011-09-30 Fri 18:00>
>>
>> this shows up in the agenda view as:
>>
>>   uni:        14:00...... timerange
>>
>> while I would expect something like:
>>
>>   uni:        14:00-18:00 timerange
>>
>
> |the manual says:
> |Time ranges can be specified with two timestamps,
> |like ‘<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>’.
> |
> | 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
>
> I confirm this bug.
>
> Org-mode version 7.7 0e9d401519
> GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO
>
> Giovanni
>
>

Funny enough, I noticed this too last week, so I whipped up this patch.
It inserts the range when start date is the same as the end date. Please
test (it's still young) && include in Org if you so please.

#+begin_src diff
>From dcf81753aa5cab311f2a3a0272e4691e4bc6ea38 Mon Sep 17 00:00:00 2001
From: Niels Giesen <niels.giesen@gmail.com>
Date: Mon, 26 Sep 2011 11:43:55 +0200
Subject: [PATCH] Show timestamp ranges in agenda

* lisp/org-agenda.el (org-agenda-get-blocks): Show timestamp ranges in
  agenda if start day is same as end day
2011-10-05 16:46:18 +02:00
Carsten Dominik aefd49b909 Change default value of `org-agenda-skip-additional-timestamps-same-entry'
* lisp/org-agenda.el (org-agenda-skip-additional-timestamps-same-entry):
Change default value.
2011-10-04 14:30:32 +02:00
Carsten Dominik 620913e596 Improve error reporting on bad time stamps during agenda construction
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-absolute): Add optional arguments BUFFER and POS
for error reporting.
* lisp/org-agenda.el (org-get-all-dates):
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Call time stamp parsing functions with
information on where the timestamp was taken from.
2011-10-04 14:12:11 +02:00
Bastien Guerry 8bd2ff192e org-agenda.el: Add `category-pos' in let construct.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-deadlines, org-agenda-get-scheduled): Add
`category-pos' in let construct.

Thanks to Achim Gratz for spotting this.
2011-08-25 23:42:07 +02:00
Bastien Guerry 02fad0981f org-agenda.el: Correctly set the `org-category-pos' property.
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress): Correctly set
the `org-category-pos' property.

Thanks to Michael Brand for signaling this problem, and to Nick
Dokos and Erik Iverson for confirming it.
2011-08-25 15:20:10 +02:00
Nicolas Goaziou ecc6e2fe3f org-agenda: refactor code in `org-agenda-dim-blocked-tasks' 2011-08-24 18:32:19 +02:00
Bastien Guerry fc4628ef56 * org-agenda.el (org-agenda-get-todos): Properly set `category-pos'.
* org-agenda.el (org-agenda-get-todos): Properly set
`category-pos'.

Thanks to Noorul Islam for this patch.
2011-08-24 10:17:09 +02:00
Bastien Guerry 15798836e2 New 'org-category-position text property in agendas.
* org.el (org-refresh-category-properties): New text property
'org-category-position to point at the beginning of the
headline from which the category is set.

* 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-filter-by-tag-refine): Add the
'org-category-position text property.

This commit prepares for a future `org-agenda-set-category'
function allowing to set the category of the headline at point.
2011-08-23 17:34:15 +02:00
Bastien Guerry cdbf7ed876 Revert "Move three functions and add appropriate require/declarations."
This reverts commit 8c3ecbe39a.
2011-08-19 22:11:15 +02:00
Carsten Dominik 85cc7670c0 Merge branch 'cleanup-include-all-stuff-in-agenda.el' 2011-08-19 15:30:46 +02:00
Bastien Guerry 54fe955c9a org-agenda.el: Mention "%e" in the docstring of org-agenda-prefix-format.
* org-agenda.el (org-agenda-prefix-format): Mention "%e" in
the docstring.
2011-08-19 15:16:38 +02:00
Carsten Dominik b3de2dbb95 Set a default custom command, agenda plus TODO items
* lisp/org-agenda.el (org-agenda-custom-commands): Set a default value
for this command.
2011-08-19 12:41:11 +02:00
Carsten Dominik 8404f15647 Clean up the misleading name INCLUDE-ALL in some agenda functions
* lisp/org-agenda.el (org-agenda-include-all-todo): Declare this
option as no longer working.
(org-timeline): Rename the include-all argument to dotodo.
(org-arg-loc): Renamed from` org-include-all-loc'.
(org-agenda-list): Rename the INCLUDE-ALL argument to ARG, because its
function has changed.
2011-08-19 12:41:02 +02:00
Bastien Guerry 8c3ecbe39a Move three functions and add appropriate require/declarations.
* org-clock.el (org-duration-string-to-minutes)
(org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
Move from org.el.
2011-08-17 16:08:02 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry afa408dcd6 org-agenda.el (org-cmp-effort): Fix docstring.
* org-agenda.el (org-cmp-effort): Fix docstring.
2011-08-16 16:16:43 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
Bastien Guerry 71332ac8a6 Move org-agenda-todo-yesterday from org.el to org-agenda.el. 2011-08-15 09:39:52 +02:00
Michael Brand 2f07dd5163 Agenda: Simplify old fix of face for deadline warning 0 day
* lisp/org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the
case of wdays being 0.  Don't pass wdays to org-agenda-deadline-face,
like before the old fix.
(org-agenda-deadline-face): Revert to old state that was without
wdays.

This allows a deadline warning period of "-0d" to work also with a
custom configuration like:
(setq org-agenda-deadline-faces
      '((1.0001 . org-warning)              ; due yesterday or before
        (0.0    . org-upcoming-deadline)))  ; due today or later
For org-agenda-deadline-faces left at default and all other settings
not exceeding 1.0, the face for a deadline warning of any length
remains untouched by this patch.

references to history:
* commit of the old fix
  - http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=d0d6325
  - git show d0d6325
* mailing list old thread
  - http://thread.gmane.org/gmane.emacs.orgmode/5753
  - http://lists.gnu.org/archive/html/emacs-orgmode/2008-02/msg00395.html
2011-08-14 18:40:42 +02:00
David Maus 545bfddeea Provide edebug specifications for macros
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
David Maus 06591f2ccc Fix argument to append when creating final parameter alist
* org-agenda.el (org-batch-agenda-csv): Fix argument to append when
creating final parameter alist.
2011-08-10 10:10:40 +02:00
David Maus 679c21f8ec Use macro `org-eval-in-environment' in `org-batch-store-agenda-views'
* org-agenda.el (org-batch-store-agenda-views): Use macro
`org-eval-in-environment'.
2011-08-10 09:43:57 +02:00
David Maus 0837adbec8 Provide explanation why batch functions are implemented as macros
,----
| The functions `org-batch-agenda', `org-batch-agenda-csv', and
| `org-batch-store-agenda-views' are implemented as macros to provide
| a conveniant way for extracting agenda information from the command
| line. The Lisp does not evaluate parameters of a macro call; thus
| it is not necessary to quote the parameters passed to one of those
| functions. E.g. you can write:
|
|   emacs -batch -l ~/.emacs -eval '(org-batch-agenda "a" org-agenda-span 7)'
|
| To export an agenda spanning 7 days. If `org-batch-agenda' would
| have been implemented as a regular function you'd have to quote the
| symbol org-agenda-span. Moreover: To use a symbol as parameter
| value you would have to double quote the symbol.
|
| This is a hack, but it works even when running Org byte-compiled.
`----
2011-08-10 09:43:57 +02:00
David Maus f0958680db Use `org-eval-in-environment
* org-agenda.el (org-batch-agenda, org-batch-agenda-csv): Use
`org-eval-in-environment.
2011-08-10 09:43:57 +02:00
David Maus b471e56a3e Use macro `org-with-gensyms' in `org-agenda-with-point-at-orig-entry'
* org-agenda.el (org-agenda-with-point-at-orig-entry): Use macro
`org-with-gensyms'.
2011-08-10 08:52:15 +02:00
Bastien Guerry 57f6a8d97a Revert "org-agenda: bugfix: always refresh the agenda when needed."
This reverts commit 1fa0f027cd.
2011-07-28 17:22:38 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Bastien Guerry 1fa0f027cd org-agenda: bugfix: always refresh the agenda when needed.
* org-agenda.el (org-agenda-filter-by-tag): bugfix: always
refresh the agenda when needed.

Thanks to Nicolas Dudebout for pointing this out.
2011-07-28 11:43:56 +02:00
Max Mikhanosha f760b919d5 (org-agenda-set-effort): Refresh changed lines 2011-07-27 14:59:25 +02:00
Max Mikhanosha 860caf9f46 (org-agenda-change-all-lines): Change to item's buffer and use original column format that item was generated with 2011-07-27 14:59:19 +02:00
Max Mikhanosha 0cd6d82d39 Fix error with %e agenda prefix format when there is no effort set 2011-07-27 14:59:13 +02:00
Bastien Guerry 6808a1a1c0 org-agenda: fix two minor docstring typos. 2011-07-24 17:17:10 +02:00
Bastien Guerry 0625a74b08 org-agenda.el (org-agenda-prefix-format): improve docstring.
Thanks to Tassilo for pointing at this.
2011-07-21 12:16:36 +02:00
Bastien Guerry 09859b303d org-agenda.el (org-agenda-bulk-custom-functions): minor docstring fix. 2011-07-19 11:35:41 +02:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-18 09:42:11 +02:00
Bastien Guerry 1029a92517 org-agenda.el: New variable for custom bulk action functions.
* org-agenda.el (org-agenda-bulk-custom-functions): New
variable for custom bulk action functions.
(org-agenda-bulk-action): Use it.

Thanks to Julien Cubizolles for triggering this idea.
2011-07-12 08:31:36 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Bastien Guerry ff038caae5 Revert "Silence byte-compiler with a new alias: filter-buffer-substring-functions."
This reverts commit 5a2eec3207.

The replacement of `buffer-substring-filters' by
`filter-buffer-substring-functions' requires some rewriting
of functions like `org-indent-remove-properties-from-string'.
2011-07-06 20:56:39 +02:00
Bastien Guerry 5a2eec3207 Silence byte-compiler with a new alias: filter-buffer-substring-functions.
When `filter-buffer-substring-functions' is not a known variable to
Emacs (for versions < 24.1), we alias it to `buffer-substring-filters'.
2011-07-05 12:00:15 +02:00
Rémi Vanicat 5a20035809 org-agenda.el: fix bug in org-diary-class.
calendar-absolute-from-gregorian returns a number of day and
should not be used here.
2011-07-04 11:00:54 +02:00
Michael Brand d298908394 Allow to disable the agenda block separator per block
* org-agenda.el (org-agenda-compact-blocks): Improve docstring.
(org-agenda-block-separator): Add nil to docstring and customization.
(org-prepare-agenda): Skip agenda block separator additionally if
org-agenda-block-separator is nil.
(org-agenda-overriding-header): Improve docstring.

This change allows to disable the agenda block separator only and also
per block only.  (The variable org-agenda-compact-blocks non-nil
disables agenda block separators together with the line containing the
agenda span name and week number and does this globally for all blocks
and all custom agenda commands.)
2011-06-30 18:40:48 +02:00
Michael Markert b3e8b3f87c adding optional argument KIND to all org-called-interactively-p function invocations
* lisp/ob.el (org-babel-sha1-hash): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
* lisp/org-agenda.el (org-agenda-redo): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-agenda-show-1): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-agenda-set-tags): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-ascii.el (org-export-as-latin1): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-export-as-latin1-to-buffer): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-export-as-utf8-to-buffer): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-export-region-as-ascii): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org-docbook.el (org-export-region-as-docbook): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-html.el (org-export-region-as-html): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-latex.el (org-export-region-as-latex): Adding optional
  argument KIND to all org-called-interactively-p function
  invocations.
* lisp/org-table.el (org-table-blank-field): Adding optional argument
  KIND to all org-called-interactively-p function invocations.
  (org-table-current-column): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-current-dline): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sort-lines): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-sum): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-table-rotate-recalc-marks): Adding optional argument KIND to
  all org-called-interactively-p function invocations.
  (org-table-eval-formula): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (orgtbl-send-table): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
* lisp/org.el (org-mode): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-copy-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-paste-subtree): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-store-link): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-todo): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
  (org-occur): Adding optional argument KIND to all
  org-called-interactively-p function invocations.
2011-06-29 16:22:58 -07:00
Bastien Guerry 2b7dbee193 Replace interactive-p with the org-called-interactively-p macro.
Interactive-p is an obsolete function as of Emacs 23.2.
`org-called-interactively-p' takes care of the current (x)Emacs
version and use either `interactive-p' (for XEmacs and Emacs<23.2)
or `called-interactively-p'.
2011-06-29 18:24:08 +02:00
Carsten Dominik e860e08e58 Merge branch 'master' of orgmode.org:org-mode 2011-06-21 20:07:08 +02:00
Carsten Dominik 6413de8e91 Introduce alias for diary-float
* lisp/org-agenda.el (org-float): Aliases for `diary-float'.

This is just to make sure that all the diary sexp functions
have org- equivalents.  org-float is just an alias because no
arguments need to be switched around.
2011-06-21 15:43:14 +02:00
Bastien Guerry 8608b6651d Fix doubled-word typo.
Thanks to Jim Meyering <jim@meyering.net> for this upstream fixes.
2011-06-20 15:38:24 +02:00
Eric Schulte db1c3f6a3e Revert "replacing calls to now-defunct function `interactive-p'"
This reverts commit 4f084e1467.
2011-06-16 21:32:54 -07:00
Eric Schulte fa59060617 Revert "Globally replace buffer-substring-filters with filter-buffer-substring-functions."
This reverts commit 66e8a4b09a.
2011-06-16 10:29:24 -07:00
Carsten Dominik 12d51dad7b Use a new function to mark anniversaries in Org diary files
* lisp/org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
Use stable internal `org-anniversary' instead of diary-anniversary.
(org-class): New function.
(org-diary-class): Use `org-class'.
(org-anniversary, org-cyclic, org-date, org-block): New functions.

This patch provides stable alternatives for a number of diary
functions to be used in diary sexp entries. The corresponding diary-*
functions swap around their input arguments depending on
`calendar-date-style', which is unstable and evil.  The functions
provided here have a fixed order of arguments, the ISO order: year
month day.

Also, the `i a' key in the agenda now uses `org-anniversary' instead of
diary-anniversary.
2011-06-16 14:34:07 +02:00
Eric Schulte 66e8a4b09a Globally replace buffer-substring-filters with filter-buffer-substring-functions.
* lisp/org-agenda.el (org-agenda-mode): Globally replace
  buffer-substring-filters with filter-buffer-substring-functions.
* lisp/org-indent.el (org-indent-mode): Globally replace
  buffer-substring-filters with filter-buffer-substring-functions.
2011-06-14 12:45:19 -07:00
Eric Schulte 4f084e1467 replacing calls to now-defunct function `interactive-p'
* lisp/org-agenda.el (org-agenda-redo): Replacing call to now-defunct
  function `interactive-p'.
  (org-agenda-show-1): Replacing call to now-defunct function
  `interactive-p'.
  (org-agenda-set-tags): Replacing call to now-defunct function `interactive-p'.
* lisp/org-ascii.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1-to-buffer): Replacing call to now-defunct
  function `interactive-p'.
  (org-export-as-utf8): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-utf8-to-buffer): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-ascii): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-docbook.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-docbook): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-html.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-html): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-latex.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-latex): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-macs.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-called-interactively-p): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-table.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-table-blank-field): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-column): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-dline): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sort-lines): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sum): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-rotate-recalc-marks): Replacing call to now-defunct
  function `interactive-p'.
  (org-table-eval-formula): Replacing call to now-defunct function
  `interactive-p'.
  (orgtbl-send-table): Replacing call to now-defunct function `interactive-p'.
* lisp/org.el: Replacing call to now-defunct function `interactive-p'.
  (org-mode): Replacing call to now-defunct function `interactive-p'.
  (org-copy-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-paste-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-store-link): Replacing call to now-defunct function
  `interactive-p'.
  (org-todo): Replacing call to now-defunct function `interactive-p'.
  (org-occur): Replacing call to now-defunct function `interactive-p'.
2011-06-14 11:37:59 -07:00
Carsten Dominik 36dd7e2150 Fix bulk scattering command
* lisp/org-agenda.el (org-agenda-bulk-action): Fix bug caused by
`days-to-time, converting relative to 1 BC, while the code assumed it
would return a time relative to 1970.

For more information, see

http://thread.gmane.org/gmane.emacs.orgmode/42531
2011-06-14 10:39:58 +02:00
Carsten Dominik af730fec0a Get rid of some compiler warnings 2011-05-11 10:10:24 +02:00
Carsten Dominik 9dba548cd5 Agenda Views: Call `org-agenda-skip' first.
* lisp/org-agenda.el (org-agenda-get-todos): Call `org-agenda-skip' first,
then check if timestamps cause exclusion.
* lisp/org.el (org-scan-tags):  Call `org-agenda-skip' first,
then check if timestamps cause exclusion.

For more information, see the following mailing list thread:

http://thread.gmane.org/gmane.emacs.orgmode/41052/focus=41052
2011-05-10 08:58:04 +02:00
Matt Lundin ad28fc9a61 Making the output of %% functions linkable in agenda views
charles.sebold@lcms.org writes:

> On 7 Apr 2011, Charles Sebold wrote:
>
>> Here's a test.  Take the line below and put it in an agenda file, then
>> view the agenda.
>>
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>>
>> The results as I see them give me a link that I can mouse-click on,
>> but I can't move point to it and hit C-c C-o.
>>
>> What do I need to do to make this a normal org link in every way?  Or
>> is this a bug?
>>

Here's what seems to be going on.

Clicking with the mouse works because it calls org-open-at-mouse, which
(by calling org-open-at-point) simply looks at the text surrounding the
click point to find a link.

The function org-agenda-open-link, on the other hand, grabs part of the
headline as a string (the prefix), then jumps to the location in the
original buffer and calls org-offer-links-in-entry to look for links in
both the entry and the prefix of agenda text. Obviously, it won't find
your link in the original entry since it looks like this:

%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))

I think it shouldn't be a problem to pass the whole agenda line to
org-offer-links-in-entry. This will not result in duplicate links, since
org-offer-links-in-entry "uniquifies" the links.

I've attached a patch.

The bigger question, however, is why the expression above is even
showing up in the agenda, since it contains no scheduling information.
:)

Best,
Matt

>From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Tue, 3 May 2011 15:54:35 -0400
Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.

* lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
  agenda line to org-offer-links-in-entry.

This fixes bug noticed by Charles Sebold, in which links that are
dynamically formatted for the agenda view are ignored.
http://permalink.gmane.org/gmane.emacs.orgmode/40673
2011-05-04 09:43:01 +02:00
Matt Lundin 95a8b0680e Removed unecessary invocations of org-agenda-show.
lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to prevent
disrupting windows and changing point in original buffer.
(org-agenda-set-property): Same
(org-agenda-set-effort): Same
(org-agenda-toggle-archive-tag): Same

When setting a tag in the agenda, org-mode displays the corresponding
entry in the original org buffer by calling org-agenda-show. This has
the unwelcome side-effect of disrupting the current window arrangement
and changing the position of the point in the original buffer. This
behavior is inconsistent with the that of org-agenda-todo, which makes
all its changes "silently."

Here is the offending line (6799) in org-agenda-set-tags:

--8<---------------cut here---------------start------------->8---
(org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
--8<---------------cut here---------------end--------------->8---

The same line occurs in org-agenda-set-property, org-agenda-set-effort,
and org-agenda-toggle-archive tag.
2011-05-02 10:08:54 +02:00
Carsten Dominik ad4970a32e Configurable faces for clock problems
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): Allow to
set properties.
(org-agenda-show-clocking-issues): Handle faces.
2011-04-27 13:49:11 +02:00
Carsten Dominik acda0ee212 Fix typos 2011-04-24 17:21:47 +02:00
Carsten Dominik 02441ed433 Implement clock consistency check functionality for agenda
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): New option.
(org-agenda-list): Handle display change to clock check.
(org-agenda-get-progress): Show only clock entries if we are doing the
consistency check.
(org-agenda-show-clocking-issues): New function.
(org-agenda-check-clock-gap): New function.
(org-agenda-view-mode-dispatch): Offer consistency check.
(org-agenda-log-mode): Handle switch to clock only display.
(org-agenda-set-mode-name): Show lighter for Clockcheck.
* lisp/org.el (org-hh:mm-string-to-minutes): Accept an integer argument
and return it unchanged.
* doc/org.texi (Agenda commands): Document clock consistency checks.
* doc/orgcard.tex: Document key for clock consistency check.
2011-04-24 17:17:25 +02:00
Carsten Dominik c9958a3999 Fix agenda bulk commands
* lisp/org-agenda.el (org-agenda-bulk-action): Do not use the entries
variable before it is defined
2011-04-16 18:05:51 +02:00
Bernt Hansen 4262dc1cbc Fix typo in agenda local variable
* lisp/org-agenda.el (org-agenda-filter-by-tag): Fix variable name typo

maybe-reftresh -> maybe-refresh
2011-04-15 13:56:12 +02:00
Bernt Hansen 383cb5dcaa Fix agenda display when headlines are missing
* lisp/org-agenda.el (org-agenda-get-timestamps): Fix agenda display when headlines are missing

The following entry breaks the agenda display.

,----
| ****
|         :PROPERTIES:
|         :DateCreated: <2011-04-13 Mi 10:00>
|         :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----

Provide the empty string as the headline if the search for the
headline returns nil.  org-format-agenda-items requires a string for
the headline parameter.
2011-04-15 13:55:01 +02:00
Carsten Dominik e20166eb29 Fix the bulk scatter command to always schedule
* lisp/org-agenda.el (org-agenda-bulk-action): Allow bulk scatter
in all possible agenda views.  Use `org-agenda-schedule' instead of
`org-agenda-date-later'.

The bulk scatter command so far shifted the date that was causing an
entry to appear in the agenda.  However, the true intend was to
reschedule onto dates in the near future.  This patch fixes this
issue.  A side effect is that you can now bulk scatter tasks that to
not yet have a date, for example also tasks picked from the TODO
list.
2011-04-14 00:10:56 +02:00