* org-pcomplete.el (pcomplete/org-mode/file-option/x): New macro.
(pcomplete/org-mode/file-option/options)
(pcomplete/org-mode/file-option/title)
(pcomplete/org-mode/file-option/author)
(pcomplete/org-mode/file-option/email)
(pcomplete/org-mode/file-option/date): Use the new macro to
offer completion over default values for #+OPTIONS, #+TITLE,
#+AUTHOR, #+EMAIL and #+DATE.
* 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!
* org.el (org-version): Improve docstring.
(org-self-insert-cluster-for-undo): The default value should
be nil for Emacs >=24.1. See bug#11774.
See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11774 for a
discussion about this.
* org.el (org-options-keywords): New constant.
(org-additional-option-like-keywords): Remove duplicates with
keywords in the new constant.
(org-additional-option-like-keywords-for-flyspell): Use the
new constant.
(org-mode-flyspell-verify): Exclude keywords from the new
constant.
* org-pcomplete.el (pcomplete/org-mode/file-option): Use
`org-options-keywords'.
* org.el: Update a few keybindings.
Use [(control down)] and "\M-}" for `org-element-forward'.
Use [(control up)] and "\M-{ `org-element-backward'.
Use "\C-c\C-^" for `org-element-up'.
Use "\C-c\C-_" for `org-element-down'.
Use "\C-c\C-@" for `org-element-mark-element'.
* org-element.el (org-element-down): Throw an error when the
element has no content.
* org-table.el (orgtbl-radio-table-templates): Add a template
for org-mode.
(orgtbl-to-orgtbl): Complete and align the table created with
orgtbl-to-orgtbl, in case the user use the function for radio
tables.
(orgtbl-to-table.el): New function to export a table to
another one using the table.el format.
(orgtbl-to-unicode): New function to export a table using
unicode characters.
* lisp/org.el (org-mode): Set comments related variables.
(org-insert-comment, org-comment-or-uncomment-region): New functions.
* testing/lisp/test-org.el: Add test.
* org-exp.el (org-export-language-setup): Use "Sommaire"
for the french translation of "Table of contents", to avoid a
possible bug when exporting to ODT.
* org.el (org-additional-option-like-keywords): Add keywords.
(org-additional-option-like-keywords-for-flyspell): New
constant to use with flyspell.
(org-mode-flyspell-verify): Use the dedicated constant and
don't check `org-startup-options'.
Thanks to Bjarte Johansen for bringing this up.
* 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.
* lisp/org-element.el (org-element-at-point): Add :parent property to
output.
(org-element-context): Add :parent property to output. Also return
a single element or object instead of a list of parents.
(org-element-forward, org-element-up): Apply changes.
* testing/lisp/test-org-element.el: Add tests.
* org.el (org-auto-fill-function): Don't call `do-auto-fill'
within (org-let org-fb-vars ...) as `do-auto-fill' should do
the right thing whether orgstruct++-mode is turned on or off.
* org.el (org-sparse-tree-default-date-type): New option.
(org-ts-type): New variable.
(org-sparse-tree): New argument `type'. Use the new option
`org-sparse-tree-default-date-type' as the default value for
`type'. Fix docstring.
(org-re-timestamp): New function.
(org-check-before-date, org-check-after-date)
(org-check-dates-range): Use `org-ts-type' and
`org-re-timestamp' to tell compute the date regexp.
Thanks to John Hendy who triggered this change.
* lisp/org.el (org-fill-context-prefix): New function.
(org-fill-paragraph, org-auto-fill-function): Use new function. Also
handle comments.
(org-adaptive-fill-function): Remove function.
(org-get-local-variables, orgstruct++-mode): Don't store now unused
adaptive-fill* functions.
* lisp/org-element.el (org-element-at-point): Fix function when buffer
starts with an inlinetask. Also fix it when called on the last
element in a greater element or the buffer.
* 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.
* org-faces.el (org-document-title): Use the normal height.
The :height 1.44 was ugly, visually disruptive. If you disagree
and miss the good old fat face, set `org-document-title' to whatever
suits you.
* lisp/org.el (org-planning-or-clock-line-re): Make it a defconst.
It's no use to make it a buffer-local variable since variables on
which it depends are not buffer-local anyway.
* org.el (org-insert-all-links): New command.
(org-insert-link): `org-keep-stored-link-after-insertion' is
now checked when the link to insert has been defined,
regardless on how it has been defined. Also don't read the
description interactively when the `default-description'
parameter was given.
(org-mode-map): Bind `org-insert-all-links' to `C-c C-L'.
* org.el (org-inc-effort): New command to increment the effort
property.
(org-set-effort): Use it.
(org-mode-map): Bind it to `C-c C-x E'.
(org-speed-commands-default): Use `E' as a speed command for it.
* org.el (org-re-property-keyword): New function.
(org-entry-put): Use it to fix a bug with respect to setting
the value of a property when a property line with no value
already exists.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org-clock.el (org): Don't require org.
* ob-exp.el (org-list-forbidden-blocks): Add declarations.
* org.el (org-mode-map): Bind `org-resolve-clocks' to `C-c C-x C-z'.
* org.texi (Resolving idle time): Document new keybinding.
Thanks to Joseph Thomas for suggesting this.
* org.el (org-mode-map): Add keybindings to
`org-element-transpose' and `org-narrow-to-element'.
(org-metaup): Fall back on `org-element-drag-backward'.
(org-metadown): Fall back on `org-element-drag-forward'.
Also move chunks of declarations and require statements to
get rid of compiler warnings.
* org-exp-blocks.el (org): Don't require org. Add declarations.
* org-clock.el (org): Don't require org.
* ob-exp.el (org-list-forbidden-blocks): Add declarations.
* org.el (org-clock-history, org-clock-adjust-closest): New
variables.
(org-timestamp-change): Maybe adjust the next or previous
clock in `org-clock-history'.
(org-shiftmetaup, org-shiftmetadown): On clock logs, update
the timestamp at point and adjust the next or previous clock
in `org-clock-history', when possible.
* org.texi (Clocking commands): Document the use of
S-M-<up/down> on clock timestamps.
Thanks to Joseph Thomas who suggested this.
* org-clock.el (org-clock-in): Set the marker for
`org-clock-history' at a safer position.
The clock marker stored in `org-clock-history' used to be at the
beginning of the heading. When manually inserting content here,
the marker is not updated because it is *before* the point. So
set the clock marker right after the first "*" of the headline
so that it will always be correctly updated.
Thanks to dunib from #org-mode for pointing this out.
* lisp/org.el (org-babel-load-languages): Common lisp should be
mentioned as a supported babel language.
* lisp/ob.el (org-babel-exeext): New defconst to hold extension for
executables or nil if none. Should be ".exe" for both Windows and
Cygwin.
* lisp/ob-C.el (org-babel-C-execute): Use org-babel-exeext when
constructing the target file name for the compiled executable.
* lisp/ob-fortran.el (org-babel-execute:fortran): Add org-babel-exeext
when constructing the target file name for the compiled executable.
Thanks to Achim for pointing out this careless oversight in my last
commit.
* lisp/org-clock.el (org-clock-special-range): "concat 'string" ->
"concat"
(org-clocktable-shift): "concat 'string" -> "concat"
This allows more calculations to be performed, but at what cost?
* lisp/ob-calc.el (org-babel-execute:calc): Strip single quotes from
calc internal representations.
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.
* lisp/org-compat.el (org-flet): Compatibility function now that flet
has been removed from cl-macs.
(org-labels): Compatibility function now that labels has been removed
from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
function.
(org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
function.
(org-babel-tangle): Switch to compatibility function.
(org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
function.
(org-babel-execute-src-block): Switch to compatibility function.
(org-babel-edit-distance): Switch to compatibility function.
(org-babel-switch-to-session-with-code): Switch to compatibility
function.
(org-babel-sha1-hash): Switch to compatibility function.
(org-babel-balanced-split): Switch to compatibility function.
(org-babel-join-splits-near-ch): Switch to compatibility function.
(org-babel-get-rownames): Switch to compatibility function.
(org-babel-format-result): Switch to compatibility function.
(org-babel-insert-result): Switch to compatibility function.
(org-babel-examplize-region): Switch to compatibility function.
(org-babel-merge-params): Switch to compatibility function.
(org-babel-noweb-p): Switch to compatibility function.
(org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
function.
(org-bibtex-fleshout): Switch to compatibility function.
(org-bibtex-read): Switch to compatibility function.
(org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
function.
(org-mouse-set-priority): Switch to compatibility function.
(org-mouse-popup-global-menu): Switch to compatibility function.
(org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
compatibility function.
(org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
(org-fill-paragraph): Switch to compatibility function.
(org-auto-fill-function): Switch to compatibility function.
* lisp/org-clock.el (org-clock-idle-time): Org-mode assumed that x11idle
was an available command, and returned an idle time of 0 if it was not
(never idle). Added checks so that org-idle-time will come from emacs'
own current-idle-time if x11idle cannot be found or if it cannot
retrieve the idle time from X11
TINYCHANGE
* lisp/org-compat.el (org-condition-case-unless-debug): Alias
to `condition-case' when both `condition-case-no-debug' and
`condition-case-unless-debug' is unavailable.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.
* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
* lisp/Makefile: Add LISPN (empty by default) which is used to filter
out files from LISPC. This means that install will not fail due to
a corresponding .elc missing. This might become useful if lisp
source files set "no-byte-compile: t" for whatever reason.
* UTILITIES/org-fixup.el (org-make-org-version): Provide feature
'org-version.
* lisp/org-compat.el (org-check-version): New macro. Check if
org-version.el exists and provide autoloads to that. Otherwise check
if org-fixup.el exists and use it to provide definitions. Finally
if nothing worked, complain about a botched installation and provide
fallback definitions.
* lisp/org.el: Use org-check-version.
This should finally provide the correct behaviour in all supported
use-cases as well as a few corner scenarios that were reported on the
mailing list and allow to always build on Git, ELPA and Emacs Bzr
correctly. The file org-version.el must be added to the Emacs sources
and should be re-generated each time orgmode Git is synced to Emacs
Bzr (it would be best to automate this).
Note that the internal functions (org-release) and (org-git-release)
are not autoloaded when org-version is not present and become only
available when org.el is loaded. This should pose no problem since
they are only used by (org-version), which is autoloaded from org.el.
* UTILITIES/org-fixup.el: Clean up and add doc strings.
* UTILITIES/org-fixup.el (org-make-autoloads): Add optional arguments
and implementation for comopiling and force compiling.
* UTILITIES/org-fixup.el (org-make-autoloads-compile,
org-make-autoloads-compile-force): Convenience definitions with
pre-selected arguments, avoids complicated quoted on invocation from
command line.
* UTILITIES/org-fixup.el (org-fixup): Add "-git" to git version when
run from a bare Git worktree. Give message instead of returning
string inside quoted progn for easier tracing.
* lisp/org.el: Fix a subtle error resulting in version functions
sometimes not being defined and byte-compiling failing. Always
compile in fallback definitions into org.elc -- org-fixup either
provides re-definitions at compile-time or checks org-version.el and
then the git work tree when run uncompiled. So the fallback
definitions will only come into effect when org-fixup is not
available.
* org.texi (Fast access to TODO states): Explicitely says only
letters are supported as fast TODO selection keys.
* org.el (org-todo-keywords): Ditto.
Thanks to Samuel Wales for pointing at this.
* org.el (org-flag-drawer): Add a docstring.
(org-mode-map): Bind ̀org-clock-cancel' to "C-cC-xC-q" and
`org-clock-in-last' to "C-cC-xC-x". This fixes a bug in the
previous keybinding for `org-clock-in-last', which would
override the one for `org-clock-in'.
* org-clock.el (org-clock-in-last): Prevent errors when there
is no clocking history.
(org-clock-cancel): Fix bug when checking against a clock log
in a folded drawer.
Thanks to Bernt Hansen who reported the problem.
* org.el (org-link-expand-abbrev): Implement "%(my-function)"
as a new specifier. Update the docstring.
* org.texi (Link abbreviations): Illustrate the use of the
"%h" specifier. Document the new "%(my-function)" specifier.
Thanks to Takaaki ISHIKAWA who came all the way down from Tokyo
to Paris and raised a not-so-distant issue: "could we translate
emails from the mailing list and have a URI for each translated
email?" See the update in the manual for an answer.
* org.el (org-mode-map): Add `C-c C-x C-I' as a keybinding for
`org-clock-in-last'.
* org-clock.el (org-clock-continuously): New option.
(org-clock-in): Three universal prefix arguments set
`org-clock-continuously' to `t' temporarily.
(org-clock-in-last): Fix call to `org-clock-select-task' and
support continuous clocking.
(org-clock-out-time): New variable.
(org-clock-out): set `org-clock-out-time' when clocking out.
Small docstring rewriting.
(org-clock-remove-empty-clock-drawer): Fix "invalid search
bound" bug when trying to delete empty logbook drawer.
(org-clock-cancel): If the clock log is gone, send a warning
instead of deleting the region that is supposed to contain it.
* org.texi (Clocking commands): New cindex.
(Clocking commands): Update documentation for `org-clock-in'.
Document `org-clock-in-last'. Mention `org-clock-out' and
`org-clock-in-last' as commands that can be globally bound.
(Resolving idle time): Document continuous clocking.
* org.el (org-move-line-down, org-move-line-up): Remove.
(org-metaup, org-metadown): When the region is active, move it
up/down by one line, with no regard to the context.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.
* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
* org-pcomplete.el (org-thing-at-point): Ignore trailing
whitespaces while looking-back at properties.
Thanks to David Coate who reported a related issue.
* lisp/org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case-no-debug' instead of
`condition-case-unless-debug'. This ensures backward
compatibility with Emacs versions < 24.1.
* org.el (org-mode): Set `indent-region-function'.
(org-indent-region): New function.
(org-fill-paragraph): When in a src block, use `indent-region'
to indent the whole source code instead of falling back on
`fill-paragraph', as this function messes up the code.