Commit Graph

989 Commits

Author SHA1 Message Date
Bastien Guerry c8bfd50223 org-agenda.el: New option `org-agenda-use-tag-inheritance'
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-change-all-lines): Get local tags only.
(org-agenda-use-tag-inheritance): New option.
(org-agenda-finalize): When `org-agenda-use-tag-inheritance'
is non-nil, possibly reset tags in the agenda buffer.
(org-agenda-check-type): Enhance docstring.

See the docstring of the new option for details.
2013-01-07 16:12:52 +01:00
Bastien Guerry b27a020a83 `org-float' is now obsolete
* org-agenda.el (org-float): Don't alias `org-float'.

* org.texi (Timestamps, Deadlines and scheduling): Use
`diary-float' instead of the now obsolete alias `org-float'.

* test-org-element.el
(test-org-element/timestamp-interpreter): Ditto.
2013-01-07 13:01:36 +01:00
Bastien Guerry 6cd243468b Speed up setting/getting the APPT_WARNTIME property.
* org.el (org-refresh-properties): Rename from
`org-refresh-effort-properties' and use two new parameters.
(org-agenda-prepare-buffers): Use `org-refresh-properties'.
Also refresh the 'org-appt-warntime text property.

* org-clock.el (org-clock-in): Use the renamed defun.

* org-icalendar.el (org-icalendar-print-entries): Refresh the
'org-appt-warntime property.
(org-icalendar-print-entries): Do not use `org-entry-get' to
get the "APPT_WARNTIME" property value.

* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Ditto.
2013-01-07 12:50:49 +01:00
Bastien Guerry c4d4bf3833 New defun `org-refresh-effort-properties'
* org-agenda.el (org-agenda-format-item): Do not use
org-get-effort to get the effort text property.
(org-agenda-get-sexps): Use `org-back-to-heading' when setting
the tags.

* org-clock.el (org-clock-in): Refresh effort properties.

* org.el (org-refresh-effort-properties): New defun.
(org-get-effort): Delete.
(org-set-effort): Set the 'org-effort text property.
(org-property-next-allowed-value): Ditto.
(org-agenda-prepare-buffers): Refresh effort properties.
2013-01-07 12:33:24 +01:00
Achim Gratz 305f29776f Compatibility: Use org-define-obsolete-{function,variable}-alias
* lisp/org-compat.el (org-define-obsolete-function-alias,
  org-define-obsolete-variable-alias): Introduce new compatibility
  macros to obsolete functions and variables.

* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
  lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
  `org-define-obsolete-{function,variable}-alias´instead of
  `define-obsolate{function,variable}-alias´.
2013-01-06 18:29:05 +01:00
Bastien Guerry d621d2eac3 New default value nil for `org-agenda-dim-blocked-tasks'
* org-agenda.el (org-agenda-dim-blocked-tasks): Default to
nil.
(org-agenda-dim-blocked-tasks): Make interactive and allow an
optional parameter 'invisible to hide blocked tasks instead of
just dimming them.
(org-agenda-mode-map): Bind `org-agenda-dim-blocked-tasks' to
"#".

With a default value of t for `org-agenda-dim-blocked-tasks',
any non-nil value for `org-enforce-todo-checkbox-dependencies' or
`org-enforce-todo-dependencies' (or both) will slow down the
agenda generation too much, which might surprise the user.
2013-01-06 12:31:20 +01:00
Bastien Guerry 806a141f1e org-agenda.el (org-agenda-finalize): Don't try to align tags when there are no tags
* org-agenda.el (org-agenda-finalize): Don't try to align tags
when there are no tags.
2013-01-06 09:20:30 +01:00
Bastien Guerry cd00d36ca2 org-agenda.el (org-agenda-finalize): Only try to draw the habit consistency graph when there is a habit in the buffer
* org-agenda.el (org-agenda-finalize): Only try to draw the
habit consistency graph when there is a habit in the buffer.
2013-01-06 09:14:54 +01:00
Bastien Guerry f1191b86e3 org-agenda.el (org-agenda-finalize): Only mark clocking task when there is one
* org-agenda.el (org-agenda-finalize): Only mark clocking task
when there is one.
2013-01-06 09:11:08 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 8897a53ff4 org-agenda.el (org-agenda-open-link): Fix bug when no link is matched
* org-agenda.el (org-agenda-open-link): Fix bug when no link
is matched.  Return a message instead of an error.
2012-12-31 09:29:14 +01:00
Bastien Guerry e8aaca4de6 org-agenda.el (org-agenda-priority): Fix showing priority in agenda buffers
* org-agenda.el (org-agenda-priority): Remove useless
parameter and fix showing priority in agenda buffers.

Thanks to Michael Brand for reporting this.
2012-12-30 11:30:21 +01:00
Bastien Guerry 8477a4b215 Allow to follow internal links from the agenda
* org-agenda.el (org-agenda-open-link): Allow to open an
internal link by using the new `org-offer-links-in-entry'
function.

* org.el (org-offer-links-in-entry): Do not open the link
directly through `org-open-link-from-string', only offer to
select a link and return a cons with the link (as a string)
and the end of entry.
(org-open-at-point): Use `org-offer-links-in-entry' correctly.

Thanks to Memnon Anon for reporting this.
2012-12-29 09:20:35 +01:00
Bastien Guerry ab5e372926 org-agenda.el (org-agenda-finalize): Fix links activation
* org-agenda.el (org-agenda-finalize): Fix links activation.
2012-12-20 15:34:10 +01:00
Dmitry Antipov bfb9f9d10f Use (point-marker) instead of (move-marker (make-marker) (point))
* org-agenda.el (org-agenda-get-restriction-and-command): Use `point-marker'.
* org-capture.el (org-capture-place-template): Likewise.
* org-colview-xemacs.el (org-dblock-write:columnview): Likewise.
* org-colview.el (org-dblock-write:columnview): Likewise.
* org-mobile.el (org-mobile-locate-entry): Likewise.
* org-table.el (org-table-convert-region): Likewise.
* org.el (org-update-statistics-cookies): Likewise.
* contrib/lisp/org-invoice.el (org-dblock-write:invoice): Likewise.
2012-12-20 13:16:41 +01:00
Achim Gratz bdc95549dd Backwards compatibility: use compatibility macro
* lisp/org-agenda.el (org-agenda-write): Use
  org-called-interactively-p instead of called-interactively-p.
2012-12-19 15:30:23 +01:00
Bastien Guerry 1c57cd5a7d org-agenda.el (org-agenda-skip): Only check if point is inside a code block, not at a code block.
* org-agenda.el (org-agenda-skip): Only check if point is
inside a code block, not at a code block.

Thanks to Eric Fraga for reporting this problem.
2012-12-19 00:23:30 +01:00
Bastien Guerry 980e52282d org-agenda.el (org-agenda-finalize): Fix order of link activation.
* org-agenda.el (org-agenda-finalize): Fix order of link
activation.
2012-12-11 17:20:33 +01:00
Bastien Guerry 08e411109e org-agenda.el (org-agenda-finalize): Activate plain links.
* org-agenda.el (org-agenda-finalize): Activate plain links.
2012-12-11 17:08:00 +01:00
Bastien Guerry 5d673e890a org-agenda.el (org-agenda-schedule, org-agenda-deadline): Fix redundant messages.
* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
Fix redundant messages.
2012-12-11 16:53:44 +01:00
Bastien Guerry 1a41eeae1d org-agenda.el (org-agenda-finalize): Fix clock highlighting.
* org-agenda.el (org-agenda-finalize): Fix clock highlighting.

Thanks to Rares Pop who reported this.
2012-12-11 16:44:03 +01:00
Toby S. Cubitt 58551f1e5f Fix bug in org-agenda-diary-sexp-prefix
* lisp/org-agenda.el (org-agenda-get-sexps): Reset `extra' to nil at
beginning of re-search-forward loop, otherwise next iteration picks up
`extra' value from previous entry.
2012-10-26 14:46:24 +02:00
Bastien Guerry 93b0934d12 Fix typos fixed in Emacs (part 2)
Thanks to Paul Eggert for the fixes:
http://lists.gnu.org/archive/html/emacs-diffs/2012-10/msg00069.html
2012-10-23 18:41:33 +02:00
Nicolas Goaziou 9d00dd4a88 org-agenda: Fix `org-agenda-later' when called with an argument
* lisp/org-agenda.el (org-agenda-later): Fix function when span is
  a number and an argument was provided.  Also fix typo in docstring.
2012-10-13 12:52:43 +02:00
Bastien Guerry 562aec40dd Fix commit 1dd4228. 2012-10-03 11:14:06 +02:00
Bastien Guerry 5c762bbdc6 Remove some autoloads and clean up code.
* org.el (turn-on-orgtbl): Moved here from org-table.el.
(org-clock-persistence-insinuate): Moved here from org-clock.el.
(org-update-all-dblocks, org-map-entries)
(org-require-autoloaded-modules, org-forward-element)
(org-backward-element, org-up-element)
(org-element-greater-elements, org-drag-element-backward)
(org-drag-element-forward, org-mark-element)
(org-narrow-to-element, org-transpose-element)
(org-unindent-buffer): Don't autoload.

* org-clock.el (org-clock-get-clocktable): Rename from
`org-get-clocktable'.
(org-clock-persistence-insinuate): Move to org.el.

* org-capture.el: Do no set `generated-autoload-file' locally.
Minor code clean up.

* org-agenda.el (org-agenda-list): Use
`org-clock-get-clocktable'.  Do no set
`generated-autoload-file' locally.

* org-table.el (org-table-iterate-buffer-tables): Minor
reformatting.
(turn-on-orgtbl): Move to org.el.

* org-html.el (org-export-htmlize-generate-css): Don't autoload.

* org-timer.el (org-timer-pause-or-continue, org-timer-stop):
Ditto.

* ob-tangle.el (org-babel-tangle-lang-exts): Ditto.

* ob-lob.el (org-babel-lob-ingest): Ditto.

* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling): Ditto.

* org-lparse.el (org-lparse-and-open, org-lparse-batch)
(org-lparse-to-buffer, org-replace-region-by)
(org-lparse-region): Ditto.

* org-mobile.el (org-mobile-create-sumo-agenda): Ditto.
2012-10-02 10:03:15 +02:00
Bastien Guerry e4c31cf98b Use generated-autoload-file: "org-loaddefs.el" as a local variable. 2012-10-02 08:50:46 +02:00
Bastien Guerry 1dd42283b7 org-agenda.el: Fix bug: do not bypass `org-agenda-timerange-leaders'
* org-agenda.el (org-agenda-get-timestamps): Check if the item
is an habit when formatting it with `org-agenda-format-item'.
(org-agenda-get-blocks): Fix bug: don't assume the item is an
habit when formatting with `org-agenda-format-item'.

Thanks to George McNinch for reporting this.
2012-10-01 17:53:39 +02:00
Bastien Guerry f95e5ff1ba Fix a bug, allow "i" in calendar (and remove "k" from calendar)
* org.el (org-calendar-agenda-action-key): Delete an option.
(org-mode-map): Delete its keybinding.
(org-agenda-action-marker, org-mark-entry-for-agenda-action):
Delete.

* org-agenda.el (org-agenda-diary-entry): Don't prevent from
being used outside of Org agendas, as it can be used in
calendar buffers too.

Note that we may have to reimplement the functions related to
"k" in the calendar.
2012-09-30 20:20:22 +02:00
Bastien Guerry c8c8d0e2d9 org-agenda.el: Fix file permissions. 2012-09-30 09:24:12 +02:00
Bastien Guerry c7ffcf9246 Uncomment :version "24.3" cookies.
* org.el (org-url-hexify-p, org-doi-server-url)
(org-latex-preview-ltxpng-directory, org-custom-properties)
(org-sparse-tree-default-date-type): Add :version "24.3".

* org-agenda.el (org-agenda-sticky)
(org-agenda-custom-commands-contexts): Ditto.

* org-capture.el (org-capture-bookmark)
(org-capture-templates-contexts)
(org-capture-use-agenda-date): Ditto.

* org-latex.el (org-export-latex-hyperref-options-format)
(org-export-latex-link-with-unknown-path-format): Ditto.

* org-id.el (org-id-link-to-org-use-id): Ditto.

* org-datetree.el (org-datetree-add-timestamp): Ditto.
2012-09-29 23:46:02 +02:00
Bastien Guerry d7be8dfad2 Remove comment from previous commit. 2012-09-29 13:46:31 +02:00
Bastien Guerry a6417c62cf org-agenda.el (org-todo-list): Fix redoing of todo agenda when `org-agenda-sticky' is non-nil
* org-agenda.el (org-todo-list): Fix redoing of todo agenda
when `org-agenda-sticky' is non-nil.
2012-09-29 13:44:19 +02:00
Bastien Guerry 33213dc99a org-agenda.el: Fix some bugs about (indirect) windows handling
* org-agenda.el (org-agenda-quit): Delete last indirect buffer.
(org-agenda-pre-follow-window-conf): New variable.
(org-agenda-tree-to-indirect-buffer): Fix bug: don't split
agenda window when there an indirect buffer is already
displayed.
2012-09-29 11:10:03 +02:00
Max Mikhanosha 0be5a4e0ff org-agenda.el: Speedup redisplay of an agenda item after it has been modified
* org-agenda.el (org-agenda-change-all-lines): Speedup
refresh of a single line of agenda by narrowing the agenda
buffer to just that line before calling `org-agenda-finalize'.
2012-09-29 08:09:58 +02:00
Bastien Guerry d43f7eb475 org-agenda.el: Make sure to get a property from (1- (point-max)), not (point-max))
* org-agenda.el (org-agenda-manipulate-query)
(org-agenda-goto-date, org-agenda-goto-today)
(org-agenda-find-same-or-today-or-agenda, )
(org-agenda-later, org-agenda-change-time-span)
(org-agenda-change-all-lines)
(org-agenda-execute-calendar-command)
(org-agenda-goto-calendar, org-agenda-convert-date): Make sure
to get a property from (1- (point-max)), not (point-max)).

Thanks to Juan Pechiar for reporting a related problem.
2012-09-29 08:09:21 +02:00
Bastien Guerry 3a11d64d23 org-agenda.el (org-agenda-sticky): Don't use a function to set. Add a :version string.
* org-agenda.el (org-agenda-sticky): Don't use a function to
set.  Add a :version string.
2012-09-28 16:37:23 +02:00
Bastien Guerry e8b45bb947 Rebind `org-agenda-priority' to `C-c ," in agenda mode (`C-u C-c ,' now shows priority)
* org.el (org-priority): Use a new argument to show priority
instead of setting it.
(org-show-priority): New function to show priority both in
normal Org buffers and in Org Agenda buffers.
(org-speed-commands-default): Use "," as a speed command for
setting priority.

* org-agenda.el (org-agenda-mode-map): Bind
`org-agenda-priority' to `C-c ,' as it was before.
(org-agenda-show-priority): Delete.
(org-agenda-priority): Use a new argument to show priority
instead of setting it.

Thanks to Robert Horn for triggering this change.
2012-09-28 08:29:38 +02:00
Bastien Guerry 001d2d92ba Rename some functions and move some hooks.
* org.el (org-font-lock-hook, org-set-font-lock-defaults): Add
a docstring.
(org-display-inline-remove-overlay): Rename from
`org-display-inline-modification-hook'.
(org-speed-command-activate): Rename from
`org-speed-command-default-hook'.
(org-babel-speed-command-hook): Rename from
`org-babel-speed-command-activate'.

* org-agenda.el (org-agenda-update-agenda-type): Rename from
`org-agenda-post-command-hook'.
(org-agenda-mode): Use the new name.
(org-agenda-post-command-hook): Define as obsolete function.

* org-lparse.el (org-lparse): Temporarily activate the hooks
needed for the ODT conversion.
(org-lparse-preprocess-after-blockquote): Rename from
`org-lparse-preprocess-after-blockquote-hook'.
(org-lparse-strip-experimental-blocks-maybe): Rename from
`org-lparse-strip-experimental-blocks-maybe'.
(org-lparse-preprocess-after-blockquote-hook)
(org-lparse-strip-experimental-blocks-maybe-hook): Define as
obsolete functions.
2012-09-28 00:12:53 +02:00
Bastien Guerry 6634a30772 org-agenda.el (org-agenda-skip): Skip information retrieved from a source block
* org-agenda.el (org-agenda-skip): Skip information retrieved
from a source block.

Thanks to Sébastien Vauban for pointing at this.
2012-09-26 11:23:23 +02:00
Bastien Guerry 12ed0c3978 org-agenda.el (org-agenda-todo-custom-ignore-p): Fix typo in docstring
* org-agenda.el (org-agenda-todo-custom-ignore-p): Fix typo in docstring.
2012-09-25 18:30:55 +02:00
Bastien Guerry c92a2a5c4f org-agenda.el (org-agenda-ndays): Fix bug
* org-agenda.el (org-agenda-ndays): Don't make an alias, as
`org-agenda-span' is defined separately.

Thanks to Tassilo for reporting this.
2012-09-24 17:59:23 +02:00
Bastien Guerry 6c92eca5eb Small enhancements to the main Org menu.
* org.el (org-in-subtree-not-table-p): New utility function
for building the menu.
(org-org-menu): Add an item for refiling.  Check more contexts
when activating items.
(org-tree-to-indirect-buffer): Use `org-up-heading-safe'.

* org-agenda.el (org-agenda-tree-to-indirect-buffer)
(org-agenda-do-tree-to-indirect-buffer): Use argument `arg'.
2012-09-24 17:19:12 +02:00
Bastien Guerry 5a297114fa org-agenda.el: Use `define-obsolete-variable-alias'
* org-agenda.el (org-agenda-menu-two-column)
(org-finalize-agenda-hook, org-agenda-ndays): Use
`define-obsolete-variable-alias' instead of
`make-obsolete-variable'.
2012-09-23 12:00:44 +02:00
Bastien Guerry 348b4f3a8a org-agenda.el: Fix bug about 'time-up sorting strategy not being honored
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-blocks): Use the
dotime parameter of `org-agenda-format-item' so that 'time-up
and 'time-down agenda sorting strategies are handled correctly.

Thanks to Richard Lawrence who reported this.
2012-09-23 10:16:12 +02:00
Bastien Guerry 77a4815047 org-agenda.el (org-agenda-export-html-style): Default to nil
* org-agenda.el (org-agenda-export-html-style): Default to nil
as any string value will replace the htmlize style.

See commit 8447ea.
2012-09-21 10:04:14 +02:00
Fabrice Niessen 8447ea8341 Don't force the <style> tag to be present in `org-agenda-export-html-style'
* org-agenda.el (org-agenda-write-buffer-name): Remove the
test for the presence of <style> tag.

TINYCHANGE
2012-09-20 00:52:33 +02:00
Bastien Guerry b81485d5ff org-agenda.el: Fix bug when showing indirect agenda in another frame
* org-agenda.el (org-agenda-tree-to-indirect-buffer): Find the
correct agenda buffer.  Don't split the agenda window when the
indirect buffer is displayed in another frame.

Thanks Viktor Rosenfeld for reporting this.
2012-09-18 16:06:46 +02:00
Bastien Guerry a82797356c org-agenda.el: Fix the display of the number of commands for block agendas
* org-agenda.el (org-agenda-get-restriction-and-command): Fix
the display of the number of commands for block agendas.

Thanks to Sébastien Vauban for reporting this.
2012-09-18 09:09:41 +02:00
Bastien Guerry 6cc7ff1092 org-agenda.el: Allow `org-agenda-finalize-hook' to modify the buffer
* org-agenda.el (org-agenda-before-write-hook)
(org-agenda-add-entry-text-maxlines): Enhance phrasing.
(org-agenda-finalize-hook, org-agenda-mode-hook): Tell that
the buffer is writable when the hook is called.
(org-agenda-finalize): Allow org-agenda-finalize-hook to
modify the buffer.

Thanks to Moritz Ulrich and to Aaron Ecay for triggering this fix.
2012-09-18 08:40:11 +02:00