* doc/org-manual.org: Add `:tree-type month' option for capture
templates.
* lisp/org-capture.el (org-capture-set-target-location): Add
`:tree-type month' option to capture templates to group entries by
month.
* lisp/org-datetree.el (org-datetree-find-month-create): Add
`org-datetree-find-month-create' function to add datetree entries
grouped by month.
* testing/lisp/test-org-datetree.el
(test-org-datetree/find-month-create): Add test for new function.
* lisp/org-datetree.el (org-datetree--find-create):
* lisp/org-pcomplete.el (org-thing-at-point):
Fix regular expression and similar syntax.
More minor regex cleanup
e14c0d748efe35afc653151ff18c4dd93dcc456e
Paul Eggert
Tue Mar 19 18:47:53 2019 -0700
* doc/org.texi: Document the new capture templates target.
* lisp/org-capture.el (org-capture-upgrade-templates): New function.
(org-capture-templates): Implement the new file+olp+datetree target.
(org-capture): Document the C-1 prefix.
(org-capture-sanitize-olp): New function.
(org-capture-select-template): Make sure upgraded version of templates
variable is used.
* lisp/org-datetree.el (org-datetree-find-date-create): Accept
`subtree-at-point' as a value for the KEEP-RESTRICTION argument.
(org-datetree-find-iso-week-create): Accept `subtree-at-point'
as a value for the KEEP-RESTRICTION argument.
* lisp/org.el (org-find-olp): Throw an error when called in a
buffer that is not in Org mode.
* lisp/org-capture.el (org-capture-fill-template): Use overriding time
also in `?<>' escapes.
* lisp/org-datetree.el (org-datetree-find-iso-date-create): New function.
(org-datetree--find-create): Support fixed text for insert.
(org-datetree-insert-line): Support fixed text for insert.
* testing/lisp/test-org-datetree.el (test-org-datetree/find-iso-date-create):
New test.
ISO week trees order dates by week and not by month.
* lisp/org-datetree.el (org-datetree--find-create): New function.
(org-datetree-find-year-create, org-datetree-find-month-create,
org-datetree-find-day-create): Removed functions
(org-datetree-find-date-create): Use `org-datetree--find-create' instead
of removed functions. Use calendar extract functions.
(org-datetree-insert-line): Do more formatting in `format-time-string'
since we call it anyway
* testing/lisp/test-org-datetree.el (test-org-datetree/find-date-create):
Test if new entries are put at the right place.
* lisp/org-datetree.el (org-datetree-find-date-create): Ignore case and
discard false positives (e.g., a fake property in an example block).
* testing/lisp/test-org-datetree.el: New file.
Add changes from Emacs repo that should have been backported with
bb77dd2.
Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
* org-datetree.el (org-datetree-find-month-create)
(org-datetree-find-day-create): Add a docstring.
(org-datetree-find-year-create): Only match headlines with a
year or a year and one or more tags.
Thanks to Suvayu Ali for reporting this.
* lisp/org-datetree.el (org-datetree-find-year-create): Also match
headlines with tags.
Change made to fix the problem where a year headline of a
datetree was not matched if it had a tag. The :NOEXPORT: tag
is one useful case that should be matched.
Initial problem observation reported by Jeffrey McBeth on the
org-mode mailing list.
TINYCHANGE
* lisp/org-datetree.el: Fix regexp to allow datetree to find headings
with trailing whitespace. This fixes a bug in which an existing
datetree heading (e.g., "* 2012 ") would not be found by
org-datetree-find-year-create if it had trailing whitespace. This can
cause problems, for instance, if one is using column view on the date
tree, since editing subheadings with column view adds whitespace at
the end of the top heading.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.
This commit reverts back the maint branch to its state before
merging the master branch. From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html