* lisp/org.el (org-get-repeat): Make sure matching group refers to the
proper regexp.
* testing/lisp/test-org.el (test-org/get-repeat): New test.
The bug was introduced in aef7eef0f.
* lisp/org.el (org-get-repeat): Wrap call to save match data against
side effects.
* testing/lisp/test-org.el (test-org/get-repeat): New test for
`org-get-repeat'.
* lisp/org.el (org-refresh-properties): Handle inheritance from global
values (e.g., from "#+PROPERTY:" keyword).
(org-refresh-property): Handle property inheritance with a new
optional argument.
* testing/lisp/test-org.el (test-org/refresh-properties): New test.
* lisp/org.el (org--deadline-or-schedule): New function.
(org-schedule):
(org-deadline): Use new function.
* testing/lisp/test-org.el (test-org/deadline):
(test-org/schedule): New tests.
Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111569>
* lisp/org.el (org-entry-properties): Fix special property value in
current entry, do not leak into next entry.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111648>
* lisp/org.el (org-entry-delete): Also remove erroneously inserted
special properties in properties drawer. Small refactoring.
* testing/lisp/test-org.el (test-org/entry-delete): Add test.
Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111564>
* lisp/org.el (org-clone-subtree-with-time-shift): Don't choke on a
blank SHIFT argument.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
test.
This fixes a regression introduced by c31462f33.
* lisp/org.el (org-drag-element-backward): When point is on empty
lines below a headline, call `org-move-subtree-up'.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.
* lisp/org.el (org-N-empty-lines-before-current): Preserve point when
calling the function from the beginning of a line.
* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
* lisp/org.el (org-set-tags): Reveal newly inserted tags.
* testing/lisp/test-org.el (test-org/set-tags): New test.
Sometimes freshly added tags can be sucked into invisible outline
region (denoted by ellipsis) - and to see them you need to do the full
global visibilty cycle.
* lisp/org.el (org-drag-element-backward):
(org-drag-element-forward): Check that org-element-at-point returns a
non-nil value to avoid a type-error when called before first element.
* testing/lisp/test-org.el (test-org/drag-element-backward):
(test-org/drag-element-forward): Add test for when point is before
first element. Adjust existing should-error calls to specify
user-error.
* lisp/org.el (org-return): Recognize non-keywords and split text
accordingly.
* testing/lisp/test-org.el (test-org/return): Add test.
Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109929>
* lisp/org.el (org-beginning-of-line): Move to beginning of visual line
when appropriate. Fix docstring.
* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
* lisp/org.el (org-end-of-line): Correctly go to the end of visible
line, when appropriate.
* testing/lisp/test-org.el (test-org/end-of-line): Add tests.
* lisp/org.el (org-beginning-of-line): Leave point before any invisible
character at column 0. Small refactoring.
* testing/lisp/test-org.el (test-org/beginning-of-line): Add tests.
The regression was introduced in
3baf246f4f.
* lisp/org.el (org-align-tags-here): Renamed to...
(org--align-tags-here): ... this.
This change emphasizes the fact that, as an internal function, it
shouldn't be used without special care. This also prevents confusing
between this function and `org-set-tags' called with a non-nil ALIGN
argument.
* lisp/org.el (org-align-tags-here): Do not use `org-move-to-column',
which may move point on the other side of some invisible text.
Refactor code.
* testing/lisp/test-org.el (test-org/tag-align): Add test.
Reported-by: Michael Fiano <michael.fiano@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109435>