Commit Graph

7940 Commits

Author SHA1 Message Date
Bastien Guerry 7369cada30 Merge branch 'maint' 2013-01-13 11:17:56 +01:00
Nicolas Goaziou 9d26797448 Move functions operating on timestamp objects into org.el
* contrib/lisp/org-export.el (org-export-timestamp-has-time-p,
  org-export-format-timestamp, org-export-split-timestamp-range,
  org-export-translate-timestamp): Removed functions.
* lisp/org.el (org-timestamp-has-time-p, org-timestamp-format,
  org-timestamp-split-range, org-timestamp-translate): New functions.
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Apply move.
* contrib/lisp/org-e-groff.el (org-e-groff-timestamp): Apply move.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Apply move.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Apply move.
* contrib/lisp/org-e-odt.el (org-e-odt--format-timestamp,
  org-e-odt-timestamp): Apply move.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-timestamp): Apply move.
* testing/lisp/test-org-export.el: Remove tests.
* testing/lisp/test-org.el: Add tests.
2013-01-13 10:01:05 +01:00
Bastien Guerry e8f5b0ad72 Delete `org-condition-case-unless-debug'
* org-compat.el (org-condition-case-unless-debug): Delete.

* org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case' instead of `org-condition-case-unless-debug',
which is now deleted.
2013-01-13 09:27:08 +01:00
Bastien Guerry 3a5a4ddd41 Revert "Backwards compatibility: don't defalias special forms"
This reverts commit b63275350f.
2013-01-13 09:24:43 +01:00
Bastien Guerry 04eb4b08c3 Revert "Compatibility: Use org-define-obsolete-{function,variable}-alias"
This reverts commit 305f29776f.
2013-01-13 09:19:24 +01:00
Achim Gratz 409ee8a2f2 Compatibility: XEmacs does not have user-emacs-directory, use user-init-directory instead
* lisp/org-compat.el (user-emacs-directory): If not bound, define as an alias to
  `user-init-directory´ so that XEmacs continues to be happy with Org.
2013-01-12 18:24:18 +01:00
Bastien Guerry 4b1fcd04e8 Merge branch 'maint' 2013-01-12 15:44:01 +01:00
Bastien Guerry d815f025e9 * org-mobile.el (org-mobile-write-agenda-for-mobile): Fix bug
when replacing the heading.

Thanks to Jeff Myer for reporting this.
2013-01-12 15:43:53 +01:00
Bastien Guerry 09f108ec57 Merge branch 'maint' 2013-01-12 09:20:22 +01:00
Bastien Guerry a0ad34b8d4 Docstring fixes.
* org-capture.el (org-capture-templates-contexts):
* org-agenda.el (org-agenda-custom-commands-contexts):
Docstring fix.
2013-01-12 09:20:17 +01:00
Yasushi SHOJI 0499f0a939 org-clock.el: New option `org-clock-x11idle-program-name'
* org-clock.el (org-clock-x11idle-program-name): New option.
(org-x11idle-exists-p, org-x11-idle-seconds): Use it.

* org.texi (Resolving idle time): Document
`org-clock-x11idle-program-name'.

Debian and other OSes already have a program called 'xprintidle',
which does the same thing as x11idle. It also handles the DPMS bug[1]
some version of X servers have.

In order to use an alternative, introduce a customizable variable
'org-clock-x11idle-program-name' to hold the actual command name.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502226
2013-01-11 23:16:45 +01:00
Bastien Guerry 71f2befb61 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
2013-01-11 17:19:52 +01:00
Bastien Guerry 3c4df588e8 Restore previous behavior for inherited tags, now just more flexible
* org.el (org-get-tags-at): Remove duplicate inherited tags.

* org-agenda.el (org-agenda-show-inherited-tags): Allow to be
set to 'always or to a list of agenda types.
(org-agenda-finalize): Rework conditions under which inherited
tags should be made available even when not displayed.
(org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-scheduled)
(org-agenda-get-blocks): Use new possible values of
`org-agenda-show-inherited-tags'.

Thanks to Karl Voit and Tassilo Horn who first reported this.
2013-01-11 17:15:17 +01:00
Bastien Guerry 69133332aa Merge branch 'maint' 2013-01-11 12:31:51 +01:00
Bastien Guerry db7ece9fa2 org.el ("org-loaddefs.el"): use `load', not `org-load-noerror-mustsuffix'
* org.el ("org-loaddefs.el"): Load org-loaddefs.el before
requiring any org library.  Also use `load', not
`org-load-noerror-mustsuffix'.
(org-effort-durations): Move up to fix a compiler warning.

This patch should reduce complexity without breaking compatibility
with XEmacs.  Before this patch, users with a wrong load path would
require org-compat.el from this wrong load path, and loading
org-loaddefs.el would not work.
2013-01-11 12:31:40 +01:00
Bastien Guerry de10210cf9 org.el (org-open-at-point): Fix opening all links at point
* org.el (org-open-at-point): Fix opening all links at point.

Thanks to Ingo Lohmar for reporting this.
2013-01-11 12:11:09 +01:00
Eric Schulte f94d81a17e `org-load-noerror-mustsuffix' requires an autoload
* lisp/org-macs.el: `org-load-noerror-mustsuffix' requires an autoload.
2013-01-10 16:43:26 -07:00
Bastien Guerry 535750d705 Merge branch 'master' of orgmode.org:org-mode 2013-01-10 14:37:58 +01:00
Nicolas Goaziou b68103a344 org-element: Correctly interpret timestamps ranges with repeaters
* lisp/org-element.el (org-element-timestamp-interpreter): Interpret
  timestamps ranges with repeaters.
* testing/lisp/test-org-element.el: Add test.
2013-01-10 14:02:19 +01:00
Bastien Guerry 67e83a10c8 Merge branch 'maint' 2013-01-10 12:15:37 +01:00
Bastien Guerry 8b0fe31386 org-agenda.el (org-get-entries-from-diary): Turn off `diary-file-name-prefix'
* org-agenda.el (org-get-entries-from-diary): Turn off
`diary-file-name-prefix' instead of
`diary-file-name-prefix-function', the former is checked
before the latter.

Thanks to Andreas Merziger for reporting this as Emacs bug#13396.
2013-01-10 12:15:24 +01:00
Nicolas Richard da0276cba5 * org-attach.el (org-attach-reveal, org-attach-reveal-in-emacs): Fix the docstrings. 2013-01-09 18:01:54 +01:00
Nicolas Richard f82004840a * org-id.el (org-id-locations-file):
* org-clock.el (org-clock-persist-file): Fix hardcoded
reference to "~/.emacs.d".

* contrib/lisp/org-track.el (org-track-directory): Fix hardcoded
reference to "~/.emacs.d".
2013-01-09 17:59:17 +01:00
Bastien Guerry d1d7da4267 org.el (org-edit-special): Fix typo in docstring
* org.el (org-edit-special): Fix typo in docstring.
2013-01-09 17:57:06 +01:00
Nicolas Goaziou 3ea93df5a6 Rewrite `org-edit-special' with Elements
* lisp/org.el (org-edit-special): Rewrite `org-edit-special' using Org
  Elements tools.  Behaviour should be unchanged.
2013-01-09 15:41:41 +01:00
Nicolas Goaziou 2fd88bfd56 org-element: Small optimization to `org-element-context'
* lisp/org-element.el (org-element-context): Add an optional argument
  so (org-element-context)
  and (org-element-context (org-element-at-point)) are equivalent.
* testing/lisp/test-org-element.el: Add test.
2013-01-09 15:33:29 +01:00
Bastien Guerry 1dd1b10d5a Merge branch 'maint' 2013-01-09 14:11:12 +01:00
Michael Albinus 79dd795fe4 ob-eval.el (org-babel-shell-command-on-region): Use `executable-find' for local `shell-file-name'
* ob-eval.el (org-babel-shell-command-on-region): Use
`executable-find' for local `shell-file-name'.
2013-01-09 14:11:08 +01:00
Bastien Guerry 94ea6bca08 Merge branch 'maint' 2013-01-08 23:44:59 +01:00
Bastien Guerry e53f22c615 org.el (org-edit-special): Check for table.el before checking for Org tables
* org.el (org-edit-special): Check for table.el before
checking for Org tables.

Thanks to Jacobo de Vera for reporting this.
2013-01-08 23:44:54 +01:00
Bastien Guerry bb15139ab7 Merge branch 'maint' 2013-01-08 18:40:01 +01:00
Bastien Guerry 4cac751536 org-agenda.el (org-agenda-finalize): Inhibit readonly for the whole function
* org-agenda.el (org-agenda-finalize): Inhibit readonly for
the whole function.

Thanks to J. David Boyd for hitting this bug and reporting it.
2013-01-08 18:39:45 +01:00
Bastien Guerry 7330e2a8a4 Merge branch 'maint' 2013-01-08 18:33:09 +01:00
Bastien Guerry a5815f3f5b org-src.el (org-edit-src-find-region-and-lang): Try to find table.el tables first
* org-src.el (org-edit-src-find-region-and-lang): Try to find
table.el tables first.

Thanks to Jacobo de Vera for insisting on this.
2013-01-08 18:26:06 +01:00
Bastien Guerry b4ff6d9727 Merge branch 'maint' 2013-01-08 16:34:38 +01:00
Bastien Guerry afc7b7bf4b org-jsinfo.el (org-infojs-template): Fix copyright years
* org-jsinfo.el (org-infojs-template): Fix copyright years.
2013-01-08 16:34:31 +01:00
Bastien Guerry f5e478a401 Merge branch 'maint' 2013-01-08 15:57:17 +01:00
Bastien Guerry a4b4143132 org-src.el (org-edit-src-code): Fix bug when trying to edit a table.el table
* org-src.el (org-edit-src-code): Fix bug when trying to edit
a table.el table.

Thanks to Jacobo de Vera for reporting this regression.
2013-01-08 15:57:10 +01:00
Bastien Guerry 679dce0fda Merge branch 'maint' 2013-01-08 15:26:17 +01:00
Bastien Guerry 31c1aeabae Various small fixes 2013-01-08 15:26:04 +01:00
Bastien Guerry 5fc740a230 Merge branch 'maint' 2013-01-08 15:04:40 +01:00
Bastien Guerry 72bc144c15 Update Copyright lines to match Emacs format. 2013-01-08 15:04:32 +01:00
Bastien Guerry 1e38a8162c Merge branch 'maint' 2013-01-08 14:30:44 +01:00
Bastien Guerry 05f5f726fb org-agenda (org-agenda-finalize): Don't remove tag alignment
* org-agenda.el (org-agenda-finalize): Don't remove tag
alignment depending on `org-prefix-has-tag', this should
depend on `org-agenda-remove-tags'.

Thanks to Rainer Stengele for reporting this.
2013-01-08 14:29:29 +01:00
Bastien Guerry 7a186dc005 Merge branch 'maint' 2013-01-08 11:34:18 +01:00
Bastien Guerry 93b0cf60e7 org-agenda.el (org-agenda-finalize): Downcase tags when readding them after agenda generation
* org-agenda.el (org-agenda-finalize): Downcase tags when
readding them after agenda generation.
2013-01-08 11:34:09 +01:00
Nicolas Goaziou d9649ca7a2 Merge branch 'maint' 2013-01-08 10:36:47 +01:00
Nicolas Goaziou 7684fbd6a2 Ignore `auto-fill-inhibit-regexp'
* lisp/org.el (org-setup-filling): Ignore `auto-fill-inhibit-regexp'.
  The idea behind this is that `org-adaptive-fill-function' already
  determines which lines should be filled.
2013-01-08 10:34:40 +01:00
Bastien Guerry daa35c0c68 Merge branch 'maint' 2013-01-08 08:04:36 +01:00
Bastien Guerry 44d1a69eab org.el (org-setup-filling): Set `auto-fill-inhibit-regexp' from `org-outline-regexp'
* org.el (org-setup-filling): Set `auto-fill-inhibit-regexp'
from `org-outline-regexp'.

Thanks to John Hendy for reporting a problem in this area.
2013-01-08 08:04:24 +01:00
Bastien Guerry 45ed388387 Merge branch 'maint' 2013-01-08 00:00:03 +01:00
David Engster 195173eef0 org-icalendar.el (org-icalendar-ts-to-string): Fix bug in converting timezone
org-icalendar.el (org-icalendar-ts-to-string): Fix bug in converting
timezone.

TINYCHANGE
2013-01-07 23:59:30 +01:00
Bastien Guerry 7feec64988 Merge branch 'maint' 2013-01-07 22:29:11 +01:00
Bastien Guerry 3d1c9a42c3 org-agenda.el (org-agenda-use-tag-inheritance): Fix custom definition
* org-agenda.el (org-agenda-use-tag-inheritance): Fix custom
definition.
2013-01-07 22:02:33 +01:00
Bastien Guerry 68c1ad99ea New option `org-time-clocksum-use-effort-durations'
* org.el (org-time-clocksum-format): Add a version tag and add
to the 'org-clock group.
(org-time-clocksum-use-fractional): Ditto.
(org-time-clocksum-use-effort-durations): New option to allow
using `org-effort-durations' when computing clocksum durations.
(org-minutes-to-clocksum-string): Use the new option.

* org-clock.el (org-clocktable-write-default): Let-bind
`org-time-clocksum-use-effort-durations' to a new clocktable
parameter ":effort-durations".

Thanks to Sébastien Vauban for pointing the inconsistency.
2013-01-07 21:44:00 +01:00
Bastien Guerry 5c8cc17d39 Merge branch 'maint' 2013-01-07 18:21:39 +01:00
Bastien Guerry 0de96daa95 org.el (org-entry-get): Speed up by let-binding some variables only if needed
* org.el (org-entry-get): Speed up by let-binding some
variables only if needed.  Also fix a bug: consider an empty
drawer as no drawer.

Thanks to William Léchelle for reporting this.
2013-01-07 18:18:27 +01:00
Bastien Guerry b54d6f5965 Merge branch 'maint'
Conflicts:
	lisp/org-agenda.el
	lisp/org.el
	testing/lisp/test-org-element.el
2013-01-07 16:19:37 +01:00
Bastien Guerry c8bfd50223 org-agenda.el: New option `org-agenda-use-tag-inheritance'
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-change-all-lines): Get local tags only.
(org-agenda-use-tag-inheritance): New option.
(org-agenda-finalize): When `org-agenda-use-tag-inheritance'
is non-nil, possibly reset tags in the agenda buffer.
(org-agenda-check-type): Enhance docstring.

See the docstring of the new option for details.
2013-01-07 16:12:52 +01:00
Bastien Guerry babba02750 org.el (org-use-tag-inheritance): Fix typo in docstring
* org.el (org-use-tag-inheritance): Fix typo in docstring.
2013-01-07 13:47:59 +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 aaf14258eb org.el (org-scan-tags): The skipper already checks for archived entries
* org.el (org-scan-tags): The skipper already checks for
archived entries.
2013-01-07 12:57:27 +01:00
Bastien Guerry e4df4e9ffd org-clock.el: Fix last commit. 2013-01-07 12:52:34 +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 334596e3c7 org.el (org-adaptive-fill-function): Fix checking of post-affiliated
* org.el (org-adaptive-fill-function): Fix checking of
post-affiliated.
(org-id-link-to-org-use-id): Fix compiler warning.
2013-01-07 12:39:09 +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
Bastien Guerry 3a1c270607 org-entities.el (org-entities): "neg" should be used in LaTeX math mode
* org-entities.el (org-entities): "neg" should be used in LaTeX
math mode.

Thanks to Florian Beck for spotting this.
2013-01-07 00:25:58 +01:00
Achim Gratz 5484a33b8d Compatibility: Use org-load-noerror-mustsuffix
* lisp/org-macs.el: New macro to allow the 5-argument form of load to
  be used where possible without breaking compatibility with XEmacs.

* lisp/org.el (org-version, org-reload): Use
  `org-load-noerror-mustsuffix´ instead of adding a fifth argument to
  load directly.  Guard against undefined variable load-suffixes,
  which doesn't exist in XEmacs.

Since load-suffixes doesn't exist in XEmacs, (org-reload 'uncompiled)
will not work.  If it doesn't complicate the compatibility macro too
much this can be added later.
2013-01-06 18:33:34 +01:00
Achim Gratz 8fcdb5179b Compatibility: Use org-define-obsolete-{function,variable}-alias
* lisp/org.el: Use
  `org-define-obsolete-{function,variable}-alias´instead of
  `define-obsolate{function,variable}-alias´.
2013-01-06 18:33:23 +01:00
Achim Gratz 19460418a0 Merge branch 'maint' 2013-01-06 18:33:16 +01:00
Achim Gratz 305f29776f Compatibility: Use org-define-obsolete-{function,variable}-alias
* lisp/org-compat.el (org-define-obsolete-function-alias,
  org-define-obsolete-variable-alias): Introduce new compatibility
  macros to obsolete functions and variables.

* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
  lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
  `org-define-obsolete-{function,variable}-alias´instead of
  `define-obsolate{function,variable}-alias´.
2013-01-06 18:29:05 +01:00
Achim Gratz d524e7d611 Compatibility: Define face alias mode-line for XEmacs
* lisp/org-faces.el: Define face alias mode-line for XEmacs (it's
  called modeline there).
2013-01-06 18:28:24 +01:00
Bastien Guerry 8c5b47935f Merge branch 'maint' 2013-01-06 12:46:33 +01:00
Bastien Guerry 7b26ec60a9 Merge branch 'maint-agenda-optimization' into maint 2013-01-06 12:46:25 +01:00
Bastien Guerry b75b46620b org-entities.el (org-entities): Add the "neg" entity
* org-entities.el (org-entities): Add the "neg" entity.

Thanks to Florian beck for triggering this issue.
2013-01-06 12:38:45 +01:00
Bastien Guerry 47583ba1e4 org.el (org-read-date): Let-bind `mouse-autoselect-window' to nil
* org.el (org-read-date): Let-bind `mouse-autoselect-window'
to nil so that the mouse doesn't jump when the option is set
to t globally.

Thanks to E Sabof for reporting this.
2013-01-06 12:37:18 +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 8d7990acfa Merge branch 'maint'
Conflicts:
	lisp/org.el
2013-01-05 17:29:06 +01:00
Bastien Guerry cad0b388dd org.el (org-adaptive-fill-function): DTRT in `message-mode'
* org.el (org-adaptive-fill-function): DTRT in `message-mode'.

This is too hackish, but do the job for now.  Instead of
having exceptions for `message-mode' filling wrapped into
org-*-fill* functions, we should let orgstruct++-mode do
this job.
2013-01-05 17:23:34 +01:00
Bastien Guerry 5c2dd988a5 Merge branch 'maint' 2013-01-04 18:15:56 +01:00
Bastien Guerry 6a0c650dd2 org.el (org-get-priority): Save match data even when using `org-get-priority-function'
* org.el (org-get-priority): Save match data even when using
`org-get-priority-function'.
2013-01-04 18:15:51 +01:00
Bastien Guerry 576f43b743 Merge branch 'maint' 2013-01-04 17:23:27 +01:00
Henning Weiss f90bc18561 org-mobile.el: Remove match description from block agendas when they have a title
* org-mobile.el (org-mobile-sumo-agenda-command): Remove match
description from block agendas when they have a title.

This makes the generated agendas.org file more readable, as
complicated block agendas otherwise have long titles.

TINYCHANGE
2013-01-04 17:20:57 +01:00
Bastien Guerry 9c7fa8cca9 Merge branch 'maint' 2013-01-03 13:37:13 +01:00
Bastien Guerry 7716b9c890 org-mobile.el (org-mobile-create-index-file): Possibly normalize `org-todo-keywords'
* org-mobile.el (org-mobile-create-index-file): Possibly
normalize `org-todo-keywords'.

Thanks to Ben Finney (and others) for reporting this.
2013-01-03 13:22:05 +01:00
Bastien Guerry fc65e379b0 org-mobile.el (org-mobile-allpriorities): New option
* org-mobile.el (org-mobile-allpriorities): New option.
(org-mobile-create-index-file): Use the new option.

Thanks to J. David Boyd for pointing this.
2013-01-03 13:07:08 +01:00
Bastien Guerry 3f4ad90975 org-mobile.el (org-mobile-push): Use the correct agenda buffer names
* org-mobile.el (org-mobile-push): Use the correct agenda
buffer names.

Thanks to Ramon Diaz-Uriarte for reporting this issue.
2013-01-03 12:39:58 +01:00
Bastien Guerry ab17f9959e Merge branch 'maint' 2013-01-02 23:54:12 +01:00
Bastien Guerry 56b47cd0fe org-latex.el (org-export-latex-inline-images): New option
* org-latex.el (org-export-latex-inline-images): New option.

This fixes a bug introduced in 4aaf1a, as
`org-export-latex-inline-images' is now needed.
Thanks to Gary Oberbrunner for reporting this
and to Nick Dokos for pointing at the problem.
2013-01-02 23:50:18 +01:00
Bastien Guerry fd0380b52f org.el (org-store-link): Use `org-id-link-to-org-use-id'
* org.el (org-store-link): Use `org-id-link-to-org-use-id'
instead of the obsolete variable name.
2013-01-02 23:46:14 +01:00
Bastien Guerry c1934ccfb4 org.el (org-fontify-meta-lines-and-blocks-1): Fix bug when fontifying keywords with no value
* org.el (org-fontify-meta-lines-and-blocks-1): Fix bug when
fontifying keywords with no value.
2013-01-02 23:43:53 +01:00
Bastien Guerry af5514b848 Merge branch 'maint' 2013-01-02 10:48:06 +01:00
Bastien Guerry 68acb955f1 org.el: Various fixes to the org-goto interface
* org.el (org-goto-auto-isearch): Enhance docstring.
(org-goto-map): Make a defun, so that the customized value of
org-goto-auto-isearch is correctly initialized.
(org-goto): Initialize the keymap with `org-goto-map'.
(org-get-location): Use *Org Help* as a temporary buffer.
Tell whether auto-isearch is on or off.

Thanks to Tyler Smith for reporting this.
2013-01-02 10:47:59 +01:00
Bastien Guerry a584268071 Merge branch 'maint' 2013-01-02 00:32:44 +01:00
Bastien Guerry 6272ff2d18 Fix number of arguments for org-export-as-org/docbook
* org-exp.el (org-export-as-org): Remove useless
argument.

* org-docbook.el (org-export-as-docbook-batch)
(org-export-region-as-docbook, org-export-as-docbook-pdf): Fix
the number of arguments.
(org-export-as-docbook): Remove useless argument.

Thanks to George McNinch for reporting this.
2013-01-02 00:32:35 +01:00
Bastien Guerry fb8ba17e69 Merge branch 'maint' 2013-01-01 23:49:16 +01:00
Bastien Guerry 2718888f8e Fix behavior of `org-forward/backward-h-s-l' before first headline
* org.el (org-forward-heading-same-level): Before the first
headline, go to the first headline.
(org-backward-heading-same-level): Before the first headline,
go to the beginning of the buffer, like
`outline-previous-visible-heading' does.
2013-01-01 23:49:12 +01:00
Bastien Guerry a9ece57df8 org.el (org-speed-commands-default): Use ":" instead of ";" for `org-set-tags-command'
* org.el (org-speed-commands-default): Use ":" instead of ";"
for `org-set-tags-command', which is consistent with ":" in
agenda view.  Use "=" for `org-columns".

Thanks to Alan Schmitt for pointing this.
2013-01-01 23:43:34 +01:00
Bastien Guerry bc0b221203 Merge branch 'maint' 2013-01-01 17:40:31 +01:00
Bastien Guerry fc2aae5d81 org.el (org-sparse-tree): Fix redundant information in prompt
* org.el (org-sparse-tree): Fix redundant information in prompt.
2013-01-01 17:40:13 +01:00
Bastien Guerry 55e1489d98 Merge branch 'maint' 2013-01-01 17:35:50 +01:00
Bastien Guerry 0f2bb6a56f org-exp.el (org-export-string): Fix number of arguments passed to the org-export-as-* functions.
* org-exp.el (org-export-string): Fix number of arguments
passed to the org-export-as-* functions.

This fixes commit 43a242, thanks to George McNinch for reporting this.
2013-01-01 17:35:35 +01:00
Bastien Guerry dbd84ad655 org-latex.el (org-export-as-latex): Fix typo in docstring
* org-latex.el (org-export-as-latex): Fix typo in docstring.
2013-01-01 17:29:54 +01:00
Bastien Guerry b6615d0179 Merge branch 'maint' 2013-01-01 17:11:12 +01:00
Bastien Guerry f1067fb47c org-list.el (org-cycle-include-plain-lists): Docstring enhancement
* org-list.el (org-cycle-include-plain-lists): Docstring
enhancement.

Thanks to James Harkins for raising this issue.
2013-01-01 16:31:26 +01:00
Bastien Guerry 4aaf1a4df2 Don't use `org-export-html-inline-images' to set the :inline-images property
* org-exp.el (org-export-plist-vars): Don't use
`org-export-html-inline-images' to set the :inline-images
property, use distinct properties for the various backends.

* org-publish.el (org-publish-project-alist): Ditto.

* org-latex.el (org-export-latex-links): Use
:latex-inline-images instead of :inline-images.
2013-01-01 16:27:15 +01:00
Bastien Guerry 60b23bdeac Merge branch 'maint'
Conflicts:
	contrib/lisp/htmlize.el
	etc/schema/od-manifest-schema-v1.2-os.rnc
	etc/schema/od-schema-v1.2-os.rnc
	lisp/org-exp-blocks.el
2013-01-01 16:06:17 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry bd7c2a59e8 Merge branch 'maint' 2012-12-31 15:12:16 +01:00
Bastien Guerry 841a81007d Revert "org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification bug"
This reverts commit 001b6d1ebd.
2012-12-31 15:12:09 +01:00
Bastien Guerry bf537b5139 Merge branch 'maint' 2012-12-31 11:29:26 +01:00
Bastien Guerry 001b6d1ebd org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification bug
* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification bug when fontifying a keyword with no associated
value.
2012-12-31 11:29:17 +01:00
Bastien Guerry 6fd066fb18 Merge branch 'maint' 2012-12-31 11:07:06 +01:00
Bastien Guerry 61993bc4bf org.el (org-cycle-internal-local): Don't run hooks when cycling a plain list before first headline
* org.el (org-cycle-internal-local): Don't run hooks when
cycling a plain list before first headline.
2012-12-31 11:06:55 +01:00
Bastien Guerry 6a758e26ff Merge branch 'maint' 2012-12-31 09:30:19 +01:00
Bastien Guerry a62beff06d org.el (org-ctrl-c-ctrl-c): Throw a user error when trying to toggle a blocked checkbox
* org.el (org-ctrl-c-ctrl-c): Throw a user error when trying
to toggle a blocked checkbox.
2012-12-31 09:29:45 +01:00
Bastien Guerry aa80e441dc org.el (org-indent-line): Fix table formulas indenting
* org.el (org-indent-line): Fix table formulas indenting.
2012-12-31 09:29:18 +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 839c8cdd14 Merge branch 'maint' 2012-12-30 11:35:19 +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 d46f0e4072 org-odt.el (org-compat): Require
* org-odt.el (org-compat): Require.
2012-12-30 11:05:38 +01:00
Bastien Guerry e1c491e72d org.el (org-parse-time-string): Parse <+1w> and friends
* org.el (org-parse-time-string): Allow strings supported by
tags/properties matcher (eg <now>, <yesterday>, <-7d>).

* test-org.el (test-org/org-parse-time-string): New test.

This is based on Ilya's commit 001bcb9.  This commit was
wrong because active timestamps were not parsed correctly
anymore.  This commit handles them correctly.

Thanks to Ivan Vilata i Balaguer for pushing this forward.
2012-12-30 10:27:02 +01:00
Bastien Guerry 460c4d4ed0 Merge branch 'maint' 2012-12-30 01:21:32 +01:00
Bastien Guerry 14c3635a0d New macro `org-with-buffer-modified-unmodified'
* org-macs.el (org-with-buffer-modified-unmodified): New
macro.

* org.el (org-entry-blocked-p): Use the new macro.

Thanks to Nick Dokos for reporting this.

The macro is a copy of `with-buffer-modified-unmodified'
which (wrongly?) lives in bookmark.el.
2012-12-30 01:21:27 +01:00
Bastien Guerry b5f93f8fe3 New option `org-clock-rounding-minutes'
* org-clock.el (org-clock-rounding-minutes): New option to
round the time by N minutes in the past when clocking in or out.
(org-clock-in, org-clock-in-last, org-clock-out): Use the new
option.

* org.el (org-current-time): New optional parameter
`rounding-minutes' to override the use of
`org-time-stamp-rounding-minutes' for rounding.

Thanks to Kevin Buchs for a preliminary patch for this feature.
2012-12-29 18:45:07 +01:00
Michael Brand a77442b37b Use nan for empty fields in Calc formulas
* doc/org.texi (Formula syntax for Calc): Add explanation and example
for empty field.
* lisp/org-table.el (org-table-eval-formula): Use `keep-empty' in more
places.
(org-table-make-reference): Use nan (not a number) for empty fields in
Calc formulas.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.
(test-org-table/empty-field): New examples dealing with empty fields.
(test-org-table/copy-field): New ert-deftest with examples dealing with
empty fields.

This makes it possible to write spreadsheet Calc formulas that check
for empty fields:  To sum the first two columns unless one or both
empty:
$3 = if("$1" = "nan" || "$2" = "nan", string(""), $1 + $2); E
2012-12-29 14:33:52 +01:00
Michael Brand 764315b3fc org-table.el: Fix range len bugs and inconsistencies
* lisp/org-table.el (org-table-eval-formula): Keep empty fields during
preprocessing.
(org-table-make-reference): A range with only empty fields should not
always return 0 but also empty string, consistent with field reference
of an empty field.  Use future design for nan but replicate current
behavior.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.

The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant.  Affects typically
Calc vmean on simple range and without format specifier EN.  Also
Lisp with e. g. `length' on simple range or with L.
2012-12-29 14:33:52 +01:00
Michael Brand 0ce406151f Extend org-table-number-regexp
* lisp/org-table.el (org-table-number-regexp): Extend 0x hex to
fixed-point number, add <radix>#<number>, add Calc infinite numbers
uinf, -inf and inf.
* testing/lisp/test-org-table.el (test-org-table/align): Adapt
alignment.
2012-12-29 14:33:52 +01:00
Bastien Guerry 3b994e78fb org-clock.el (org-clock-special-range): Small docstring fix
* org-clock.el (org-clock-special-range): Small docstring fix.
2012-12-29 12:35:51 +01:00
Bastien Guerry 0bca49801e org-clock.el: Implement a new parameter :wstart to define the week start day
* org-clock.el (org-clock-special-range): New parameter
'weekstart to define the week start day.
(org-clock-special-range, org-dblock-write:clocktable)
(org-dblock-write:clocktable, )
(org-clocktable-write-default, org-clocktable-steps)
(org-clock-get-table-data): Use the new parameter.
(org-clocktable-defaults): Set monday as the starting day of
the week by setting :wstart to 1.

* org.texi (The clock table): Document :wstart as a way to set
the starting day of the week.

Thanks to Raghavendra D Prabhu for suggesting this feature.
2012-12-29 12:35:18 +01:00
Bastien Guerry 271bbb0a6d Merge branch 'maint' 2012-12-29 11:47:46 +01:00
Bastien Guerry e4ca9f44e3 org-src.el (org-edit-src-exit): Don't comma-escape the content of a fixed width region
* org-src.el (org-edit-src-exit): Don't comma-escape the
content of a fixed width region.

Thanks to Bernt Hansen for reporting this.
2012-12-29 11:20:10 +01:00
Bastien Guerry 42df907d48 Merge branch 'maint' 2012-12-29 11:04:47 +01:00
Bastien Guerry 7133e71242 org-inlinetask.el: Add a note about mixing inline tasks and plain list
The note reads:

;; Note that you should not try to use inline tasks within plain list,
;; visibility cycling is known to be problematic when doing so.

Thanks to Gregor Zattler for pointing at limitations in this area.
2012-12-29 11:04:33 +01:00
Bastien Guerry 7773e0d94c Merge branch 'maint' 2012-12-29 10:26:03 +01:00
Bastien Guerry aa3786bc20 org.el (org-entry-blocked-p): Don't set the buffer as modified
* org.el (org-blocker-hook): Update the docstring to mention
that functions in this hook should not modify the buffer.
(org-trigger-hook): Small docstring fix.
(org-entry-blocked-p): Use `with-buffer-modified-unmodified'
so that the function never modifies the buffer.

Thanks to Sven Bretfeld for reporting this.

When building the agenda, checking for blocked items should not
set the buffers as modified, otherwise exiting the agenda will ask
for confirmation each time it kills a buffer.
2012-12-29 09:39:42 +01:00
Bastien Guerry 197881bc1a Merge branch 'maint' 2012-12-29 09:23:28 +01:00
Bastien Guerry bdbdc4cb2c org-src.el: Fix compiler warning 2012-12-29 09:23:11 +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 95096f14b6 org.el (org-store-link): Fix the naming of internal links to lines starting with a keyword
* org.el (org-store-link): Fix the naming of internal links to
lines starting with a keyword.

Thanks to Thomas S. Dye for reporting a related issue.
2012-12-29 06:30:47 +01:00
Bastien Guerry 9cf6800a95 Revert "org.el: (org-mode): Use `face-background' instead of `org-find-invisible-foreground'"
This reverts commit 4549f0c99c.
2012-12-28 19:01:18 +01:00
Bastien Guerry 0276cf0975 Merge branch 'maint' 2012-12-28 18:37:53 +01:00
Bastien Guerry 2792bc11a0 org-agenda.el: Docstring fixes.
* org-agenda.el (org-agenda-Quit, org-agenda-quit)
(org-agenda-exit, org-agenda-kill-all-agenda-buffers):
Docstring fixes.
2012-12-28 18:37:47 +01:00
Abdó Roig-Maranges 5954ba9a73 org.el: Don't re-generate latex previews if already present
* org.el (org-format-latex): Do not re-generate a latex preview if the
image already exists.

This feature was lost in commit 27101a3e0e
2012-12-28 18:37:47 +01:00
Eric Schulte 43a242c44d Pass the dir option on through org-export-as-string
* lisp/org-exp.el (org-export-string): Pass the dir option on through to
  any subsequent export functions.
2012-12-28 18:37:07 +01:00
Bastien Guerry ffcd23cf30 org.el (org-cycle-internal-local): Fix bug: allow headings with leading blank characters
* org.el (org-cycle-internal-local): Fix bug: allow headings
with leading blank characters.

Thanks to Rémi Vanicat for sending a patch for this.
2012-12-28 18:37:07 +01:00
Bastien Guerry 5c4d3cbcbf org-clock.el (org-clock-persist): Docstring fix: document the 'history value
* org-clock.el (org-clock-persist): Docstring fix: document
the 'history value.

Thanks to Ivan Andrus for reporting this.
2012-12-28 18:37:07 +01:00