* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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´.
* 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.
* 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.
* 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.
* 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
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* org-agenda.el (org-agenda-priority): Remove useless
parameter and fix showing priority in agenda buffers.
Thanks to Michael Brand for reporting this.
* 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.
* 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.
* 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.
* 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
* 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.
* 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.
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.
* 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.
* 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.
* lisp/org-bibtex.el (org-bibtex-read-buffer): Reads all bibtex entries
in a buffer.
(org-bibtex-read-file): Read all bibtex entries in a file.
(org-bibtex-import-from-file): Import all bibtex entries from a file
into the current buffer.
* org-agenda.el (org-agenda-search-view-max-outline-level):
New option to define the max level for the entries shown by
the search view. A value of 1 means to show the top parent
of the entries.
* org.el (org-last-set-property-value): New variable.
(org-read-property-name): Fix dangling parentheses.
(org-set-property-and-value): New command to manually set
both the property and the value. A prefix arg will use the
last property-value pair set without prompting the user.
(org-set-property): Set `org-last-set-property-value'.
(org-mode-map): Bind the new command to `C-c C-x P'.
This is useful when you need to set the same property-value
pair for several entries.
* lisp/org-compat.el (org-condition-case-unless-debug): Do not use
defalias for special forms, the Emacs 22 byte-compiler does not
recognize them correctly when compiling macros. Use a macro instead
and rely on macro expansion. That however makes the decision at
compile time, which should be acceptable in this case since it only
affects debugging.
* org-compat.el (org-delete-directory): New compatibility
function for Emacs 22, where `delete-directory' does not
support recursive deletion.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new
compatibility function.
Thanks to Achim and Jambunathan for suggesting this.
* org.el (org-find-invisible-foreground): Delete.
(org-mode): Use `face-background' instead of
`org-find-invisible-foreground'.
Thanks to Achim for suggesting this.
* org.el (org-table-map-tables): Fix allowed blocks.
(org-edit-special): Fix regression: allow editing HTML and
LaTeX source blocks again.
* org-src.el (org-edit-src-code): Ditto.
Thanks to Nicolas Richard and Bernt Hansen for reporting bugs
in this area.
* org.el (org-startup-options): New startup keywords.
(org-log-into-drawer): Update docstring to explain how to set this
variable through the startup keyword "logdrawer" and "nologdrawer".
(org-log-states-order-reversed): Document the new startup keywords
"logstatesreversed" and "nologstatesreversed".
* org.texi (In-buffer settings): Document new startup keywords.
Thanks to John J Foerch for this idea.
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.
* org.el (org-delete-backward-char, org-delete-char): Save
match data.
* etc/schema/od-schema-v1.2-os.rnc: OASIS standard
* etc/schema/od-manifest-schema-v1.2-os.rnc: OASIS standard
* etc/schema/schemas.xml: Fix uri to rnc files.
* lisp/org-odt.el (org-export-odt-schema-dir): Modified to
accommodate change in rnc file names.
* contrib/lisp/org-e-odt.el (org-e-odt-schema-dir): Modified
to accommodate change in rnc file names.
* org.el (org-delete-backward-char, org-delete-char): Save
match data (`delete-backward-char' and `delete-char' don't.)
(org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
Use `delete-backward-char' instead of `backward-delete-char'.
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Ditto.
* org-latex.el (org-export-latex-subcontent): Ditto.
* org-clock.el (org-clocktable-write-default): Ditto.
* org-ascii.el (org-export-ascii-preprocess): Ditto.
Thanks to Vegard Vesterheim for raising this issue and proposing a patch,
and to Carsten for pointing at the root of the problem.
* org.el (org-syntax-table): New variable.
(org-transpose-words): New command, simply wrapping the new
syntax table around `transpose-words'.
(org-mode-map): Bind `org-transpose-words' to `M-t'.
Thanks to Eric Abrahamsen for this idea.
* org.el (org-store-link): When creating a link to a heading
with a bracket link, don't escape this link with curly braces
as the escaped link is not active anyway; use the description
instead. If the headline only consists of a bracket link, add
a star to the description so that the user knows this is an
internal link.
Thanks to Dave Abrahams for triggering this.
* org.el (org-store-link): Update the error message when no
method is available for storing a link. Use `user-error' for
this. Remove handling w3m links from this function.
* org.el (org-insert-heading, org-insert-todo-heading): A
double prefix arg force the insertion of the subtree at the
end of the parent subtree.
Thanks to Esben Stien for asking this.
* org.el (org-store-link): A double prefix argument now skips
module store-link functions to only use Org's core functions.
Also, when several modular store-link functions match, ask for
which one to use.
Thanks to Jonas Bernoulli for this idea.
* org.el (org-cycle, org-cycle-internal-global)
(org-cycle-internal-local, org-display-outline-path): Let-bind
`message-log-max' to nil so that messages don't populate the
*Messages*.
Thanks to Michael Heerdegen for raising this and to Christopher Schmidt
and Michael Brand for suggesting a fix.