* lisp/org-capture.el (org-capture): if dired isn't loaded,
`dired-buffers' isn't defined, and %F will fail.
Thanks to Puneeth Chaganti for reporting this.
* lisp/org-capture.el (org-capture): if no file is associated to
current buffer, check dired buffer and try to retreive a possibly
directory associated.
* org-capture.el (org-capture-finalize): bugfix about
inserted blank line when killing the capture buffer and
`org-blank-before-new-entry' tells to not insert anything
before a heading.
Thanks to Leo for reporting this.
* lisp/org-capture.el (org-capture-current-plist): Improve docstring.
(org-capture-put): Add docstring.
(org-capture-get): Add docstring.
(org-capture-member): Add LOCAL argument. Add docstring.
(org-capture-set-target-location): Store the time received from a date
prompt into the :prompt-time property.
When using the file+datetree+prompt target for capture, the time set
by the prompt is now stored in the :prompt-time property.
* org-capture.el (org-capture-clock-keep): New local variable.
(org-capture, org-capture-finalize): Use it and fix a bug when
:clock-keep is set to `t'.
* lisp/org.el (org-end-of-meta-data-and-drawers): New function.
* lisp/org-capture.el (org-capture-place-plain-text): Implement adding
plain text templates to Org nodes.
This is something which came out of a discussion with Philip Rooke, in
the thread
Philip tried to use a capture template with template type plain, but
using a date tree as a target. Plain templates where placed at the
end of the file, not at the end of the entry. I complained first that
mixing headlined entries and plain snippets into the same capture
target is not possible, but I realized that there is a way to make
this work OK. The headlined entries become children, and the plain
text snippets become part of the text before the first child.
(org-capture-templates): Rename :no-clock-out to :clock-keep.
(org-capture): Use :clock-keep instead of :no-clock-out.
Thanks to Bernt Hansen for the suggestion.
* org-capture.el (org-capture-templates): New option
:no-clock-out.
(org-capture): Use the new option.
* org.texi (Template elements): document the new template
option :no-clock-out.
* org-capture.el (org-capture-put-target-region-and-position):
New function to store information about the target buffer.
(org-capture-set-target-location): Use it.
(org-capture-finalize): restore the target buffer in its
possibly narrowed state. Also restore the cursor position.
* org-capture.el (org-capture-finalize): New argument
clock-out, to tell whether finalizing the capture process
should clock out the running clock.
(org-capture): Use the new argument.
* lisp/org-capture.el (org-capture-expand-file): New function.
(org-capture-target-buffer):
(org-capture-set-target-location): Use `org-capture-expand-file'.
* doc/org.texi (Template elements): Document that files can be given
as function, form, or variable.
* lisp/org-list.el (org-alphabetical-lists): new variable
(org-item-re, org-list-full-item, org-cycle-list-bullet,
org-list-struct-fix-bul, org-list-inc-bullet-maybe): reflect
introduction of the new variable.
(org-item-beginning-re): changed into a function, so any modification
of `org-alphabetical-lists' will not require reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count,
org-list-parse-list, org-list-send-list): reflect changes to
`org-item-beginning-re'.
(org-list-use-alpha-bul-p): new function.
* lisp/org.el (org-check-for-hidden): reflect changes to
`org-item-beginning-re'.
* lisp/org-capture.el (org-capture-place-item): reflect changes to
`org-item-beginning-re'.
* lisp/org-docbook.el (org-export-docbook-list-line): handle new type
of items.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): reflect changes to
`org-item-beginning-re'.
* lisp/org-html.el (org-html-export-list-line): handle new type of
items.
* lisp/org-latex.el (org-export-latex-lists): handle new type of items
and reflect changes to `org-item-beginning-re'.
* lisp/org-ascii.el (org-export-ascii-preprocess): handle new counters.
Modified from a patch by Nathaniel Flath.
* lisp/org-list.el (org-list-search-generic): renamed form
org-search-unenclosed-generic to reflect now behavior. Now, match
can only be in a valid context for lists, as determined by
`org-list-context'.
(org-list-search-backward): renamed from
org-search-backward-unenclosed.
(org-list-search-forward): renamed from org-search-forward-unenclosed.
(org-toggle-checkbox,org-update-checkbox-count): use new functions.
(org-sort-list): using default regexp search functions as context is
not required in this case.
* lisp/org-ascii.el (org-export-ascii-preprocess): use new function
* lisp/org-capture.el (org-capture-place-item): use new function
* org-capture.el (org-capture-templates): document currentfile
for capture template.
(org-capture-templates): Allow to use currentfile for capture
templates.
(org-capture-set-target-location): Handle currentfile as a way
to setting the capture buffer.
* org.texi (Template elements): document currentfile for
capture templates.
* lisp/org-capture.el (org-capture-templates): Add %f and %F escapes
(org-capture): Add more information to capture property list
(org-capture-fill-template): Handle %f and %F escapes
* org-capture.el (org-capture-fill-template): Use `org-set-property'
directly.
* org.el (org-set-property): Split property and values reading.
(org-read-property-name, org-read-property-value)
(org-set-property-function): New functions.
(org-property-set-functions-alist): New variable.
The goal of this patch is to introduce a special variable
`org-property-set-functions-alist'. This variable allows to read
properties values in a more intelligent way from `org-set-property' or
from `org-capture'.
For that, it simplifies the `org-set-property' code and remove
duplication between `org-capture' and `org-set-property'.
Signed-off-by: Julien Danjou <julien@danjou.info>
* doc/org.texi (Template elements): Document the new entry type.
* lisp/org-capture.el (org-capture-templates): Add new option to customize
type and docstring.
(org-capture-set-target-location): Interpret the file+datetree+prompt
entry.