Hi Carsten,
this little patch fixes an issue Richard brought up.
We always used the "w" template as the default for `org-remember' and
also used it for `org-capture' for historical reasons.
Unfortunately, this breaks, if the user has no "w" template defined.
The patch below simply set's the custom variable
`org-protocol-default-template-key' to nil, so the interactive template
selection is used by default. This works for both, remember an capture.
I will adjust the docs, once the patch is applied.
Thanks,
Sebastian
* lisp/org-capture.el (org-capture): Remove read-only text properties
from capture text.
(org-capture-set-target-location): Throw an error if file+headline
target does not point into a file which is in Org mode.
Richard Riley writes:
> If I select a region in, in this case, an erc (emacs irc client)
> buffer in the read only section and then use my global keys to create
> a new item using the following "j" template while the text is still
> selected
>
> ("j" "Journal" entry
> (file+datetree "journal.org")
> "* %T %?\n %i\n %a")
>
> then I get the following backtrace :-
>
> Debugger entered--Lisp error: (error "Capture abort: (text-read-only)")
> signal(error ("Capture abort: (text-read-only)"))
> error("Capture abort: %s" (text-read-only))
> byte-code("\301\302!\203\n
Thanks to John Hendy for pointing out the bad behavior and to Juan
Pechiar for pointing out the problem in the code
* lisp/ob-ditaa.el (org-babel-execute:ditaa): now expanding
org-ditaa-jar-path with expand-file-name
* org-ascii.el (org-export-ascii-preprocess): allow [@start:x] and
[@x] syntax for list numbering.
* org-capture.el (org-capture-place-item): make use of new tools.
* org-capture.el (org-capture-insert-template-here): mark use of new
tools.
* org-docbook.el (org-export-as-docbook): remove list ending detection
as they are now marked explicitely.
* org-exp.el (org-export-mark-list-ending): new function.
* org-exp.el (org-export-preprocess-string): mark list endings with
`org-export-mark-list-ending'.
* org-html.el (org-export-as-html): remove list ending detection as
they are now marked explicitely. Use value option in list items
instead of start when special numbering is needed.
* org-latex.el (org-export-latex-lists): make use of new tools.
Allow [start:x] and [@x] syntax for list numbering.
* org-list.el (org-list-two-spaces-after-bullet-regexp): docstring
correction.
* org-list.el (org-list-beginning-re): variable removed.
* org-list.el (org-list-ending-method): new variable.
* org-list.el (org-empty-line-terminates-plain-lists): corrected
docstring to match new lists.
* org-list.el (org-list-end-regexp): new variable.
* org-list.el (org-list-automatic-rules): new variable.
* org-list.el (org-provide-checkbox-statistics): variable removed.
* org-list.el (org-list-end-re): new function.
* org-list.el (org-item-re): allow regexp to properly recognize items
with two spaces after bullet.
* org-list.el (org-item-beginning-re): pay attention to
`org-plain-list-ordered-item-terminator' when defining an item.
Replace `org-list-beginning-re'.
* org-list.el (org-list-ending-between): new function.
* org-list.el (org-list-maybe-skip-block): new function.
* org-list.el (org-list-search-unenclosed-generic): new function.
* org-list.el (org-search-backward-unenclosed): new function.
* org-list.el (org-search-forward-unenclosed): new function.
* org-list.el (org-list-in-item-p-with-indent): new function.
* org-list.el (org-list-in-item-p-with-regexp): new function.
* org-list.el (org-list-top-point-with-regexp): new function.
* org-list.el (org-list-bottom-point-with-regexp): new function.
* org-list.el (org-list-top-point-with-indent): new function.
* org-list.el (org-list-bottom-point-with-indent): new function.
* org-list.el (org-list-at-regexp-after-bullet-p): new function.
* org-list.el (org-list-get-item-same-level): new function.
* org-list.el (org-list-separating-blank-lines-number): new function.
* org-list.el (org-list-insert-item-generic): new function.
* org-list.el (org-list-indent-item-generic): new function.
* org-list.el (org-in-item-p): now depends on `org-list-ending-method'.
* org-list.el (org-list-first-item-p): now needs list top item as
argument.
* org-list.el (org-at-item-timer-p): new function.
* org-list.el (org-at-item-description-p): new function.
* org-list.el (org-checkbox-blocked-p): make use of new tools.
Ignore [@start:x] and [@x] constructs before any checkbox.
* org-list.el (org-list-top-point): new function.
* org-list.el (org-list-bottom-point): new function.
* org-list.el (org-get-item-beginning): new function.
* org-list.el (org-beginning-of-item): make use of new tools.
* org-list.el (org-get-beginning-of-list): new function.
* org-list.el (org-beginning-of-item-list): make use of new list
tools.
* org-list.el (org-get-end-of-list): new function.
* org-list.el (org-end-of-item-list): make use of new tools.
* org-list.el (org-get-end-of-item): new function.
* org-list.el (org-end-of-item): make use of new tools.
* org-list.el (org-end-of-item-text-before-children): function removed.
* org-list.el (org-end-of-item-or-at-child): new function.
* org-list.el (org-end-of-item-before-blank): new function.
* org-list.el (org-get-previous-item): new function.
* org-list.el (org-previous-item): make use of new tools.
* org-list.el (org-get-next-item): new function.
* org-list.el (org-next-item): make use of new tools.
* org-list.el (org-list-exchange-items): new function.
* org-list.el (org-move-item-down): preserve blank lines when moving
items.
* org-list.el (org-move-item-up): preserve blank lines when moving
items.
* org-list.el (org-cycle-list-bullet): Apply rules defined in
`org-list-automatic-rules.
* org-list.el (org-insert-item): check `org-list-automatic-rules'
before inserting a checkbox in an description list. Apply some
heuristics to guess correct number of blank lines to insert between
items.
* org-list.el (org-list-struct-assoc-at-point): new function.
* org-list.el (org-list-struct): new function.
* org-list.el (org-list-struct-origins): new function.
* org-list.el (org-list-struct-get-parent): new function.
* org-list.el (org-list-struct-get-child): new function.
* org-list.el (org-list-struct-fix-bul): new function.
* org-list.el (org-list-struct-fix-ind): new function.
* org-list.el (org-list-struct-fix-struct): new function.
* org-list.el (org-list-struct-outdent): new function.
* org-list.el (org-list-struct-indent): new function.
* org-list.el (org-list-struct-apply-struct): new function.
* org-list.el (org-shift-item-indentation): now needs bottom position
of list as second argument.
* org-list.el (org-item-indent-positions): function removed.
* org-list.el (org-outdent-item): make use of new tools. Document
region handling.
* org-list.el (org-indent-item): make use of new tools. Document
region handling.
* org-list.el (org-outdent-item-tree): make use of new tools. Document
region handling.
* org-list.el (org-indent-item-tree): make use of new tools. Document
region handling.
* org-list.el (org-suppress-item-indentation): variable removed.
* org-list.el (org-cycle-item-indentation): only cycle to meaningful
positions in the list.
* org-list.el (org-list-bullet-string): new function.
* org-list.el (org-get-bullet): remove dependence to
`org-list-item-beginning'.
* org-list.el (org-list-inc-bullet-maybe): new function.
* org-list.el (org-maybe-renumber-ordered-list): function removed.
* org-list.el (org-maybe-renumber-ordered-list): function removed.
* org-list.el (org-renumber-ordered-list): function removed.
* org-list.el (org-fix-bullet-type): function removed.
* org-list.el (org-list-repair): replace both
`org-renumber-ordered-list' and `org-fix-bullet-type'.
* org-list.el (org-toggle-checkbox): make use of new tools.
Handle [@start:x] and [@x] constructs. Check
`org-list-automatic-rules' when inserting a checkbox in a
description list.
* org-list.el (org-update-checkbox-count): make use of new tools.
* org-list.el (org-apply-on-list): new function.
* org-list.el (org-sort-list): new function.
* org-list.el (org-list-item-beginning): function removed.
* org-list.el (org-list-goto-true-beginning): function removed.
* org-list.el (org-list-end): function removed.
* org-list.el (org-list-parse-list): make use of new tools. Handle
[@start:x] and [@x] constructs.
* org-list.el (org-list-send-list): make use of new tools.
* org-list.el (org-list-to-generic): correctly transform description
items.
* org-timer.el (org-timer): added one optional argument to return the
string instead of inserting it in the buffer.
* org-timer.el (org-timer-item): insert timer item at correct column.
Return an error when inserting such item in a list of another type.
* org.el (org-set-font-lock-defaults): correctly fontify [@start:x]
and [@x] structures.
* org.el (org-cycle-internal-local): correctly cycle visibility of
items
* org.el (org-sort): now sort timer items.
* org.el (org-sort-entries-or-items): function removed.
* org.el (org-sort-entries-sort): New function. Replace
`org-sort-entries-or-items'. List sorting code has been moved to
`org-sort-list'.
* org.el (org-add-log-setup): removed extra &optional in arguments.
* org.el (org-store-log-note): make use of new tools. Indent correctly
before inserting an item.
* org.el (org-ctrl-c-ctrl-c): make use of new tools. Unconditionally
repair list when function is called.
* org.el (org-toggle-item): check
`org-list-two-spaces-after-bullet-regexp' when toggling items.
* org.el (org-in-regexps-block-p): allow string and form returning
string as END-RE argument.
* org.el (org-indent-line-function): documented code. Correctly indent
item body and text after a list. Indentation of source code is left
to `org-edit-src-exit'. Indentation of others blocks should be the
same as the #+begin line.
* org.el (org-indent-line-function): indentation of source block is
left to `org-edit-src-exit' and shouldn't be modified by
`org-indent-line-function'. Indentation of others blocks should be
the same as the #+begin line.
* org-list.el (org-list-struct): accept list boundaries as an
argument in order to avoid computing `org-list-top-point' and
`org-list-bottom-point' twice when indenting.
* org-list.el (org-list-in-item-p-with-indent): Test if first line is
the item beginning.
* org-list.el (org-list-top-point-with-indent): Test if first line is
a valid list beginning.