* lisp/org.el (org-do-sort): Properly reverse results when ?F and
a compare function is provided. Small refactoring.
* testing/lisp/test-org-table.el (test-org-table/sort-lines): New
test.
* lisp/org.el (org-do-sort): Implement the ?f and ?F sorting options
to allow user-defined table sorting. Update the DOC string.
* lisp/org-table (org-table-sort-lines): Add the GETKEY-FUNC and
COMPARE-FUNC optional parameters and pass them to the call to
`org-do-sort'. Update the DOC string.
* doc/org.texi (org-table-sort-lines): Update documentation to reflect
the addition of the ?f and ?F options.
This patch implements user-defined extraction and comparison functions
for table sorting. Thanks to Nicolas Goaziou for helpful suggestions.
This patch was discussed on the Org Mode mailing list:
http://article.gmane.org/gmane.emacs.orgmode/93334
* lisp/org-archive.el (org-archive-all-old): archive all entries with
timestamps prior to today.
(org-archive-subtree): double prefix argument invokes
org-archive-all-old.
(org-archive-all-matches, org-archive-all-done): factor out common
code into org-archive-all-matches.
* doc/org.texi (Column attributes): Emphasize estimates format.
Document degenerate case of plain numbers.
* lisp/org-colview.el (org-columns-compute): Properly sum estimates.
(org-columns-string-to-number): Recognize estimates containing an
unit.
(org-estimate-mean-and-var, org-estimate-print): Allow numbers as
a degenerate case of estimates.
Reported-by: yary <not.com@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93505>
* lisp/org.el (org-hide-archived-subtrees): Prevent an error when END
argument doesn't match the end of a subtree. Prevent false
positives. Also, archive tag is case-sensitive.
* lisp/org-table.el (org-table-recalculate): Removed message for start of
processing. When ALL is t, messages are printed at most once per second.
TINYCHANGE
* lisp/org-clock.el (org-clock-into-drawer): Update docstring. Change
default value.
(org-clock-jump-to-current-clock): Properly find current clock drawer,
if any.
(org-clock-find-position): Tiny fix.
(org-clock-out): Properly check if clock and log drawers are the same.
(org-clock-find-position, org-clock-out,
(org-clock-remove-empty-clock-drawer): Use new function.
* lisp/ob-core.el (org-babel-map-src-blocks,
org-babel-map-inline-src-blocks): Make sure to ignore case when
looking for source blocks.
Reported-by: Christopher Genovese <genovese@cmu.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/93454>
* org-mime.el (org-mime-change-element-style): Correctly capture the
HTML element instead of partially.
Passing element of "p" would end up matching and altering "pre"
elements as well. Need to properly anchor the regex to HTML elements.
TINYCHANGE
* lisp/ox-md.el (md): Do not ignore footnote references.
Footnotes do not exist in Markdown syntax, but we can fallback on
HTML.
Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93447>
* lisp/org-table.el (org-table-convert-region-max-lines): New
defcustom.
(org-table-convert-region): Use it.
This is useful primarily for babel results. If a large table-like
object is returned by a code block, this function will become bogged
down in trying to read it, and hang emacs (necessitating a C-g). This
situation most commonly arises when a :results none header has been
omitted. With the patch, the user will not experience a hang, but
rather an error message.
* lisp/org.el (org-todo-yesterday):
* lisp/org-agenda.el (org-agenda-todo-yesterday): Ignore global
`org-use-effective-time' value.
Otherwise, if `org-use-effective-time' being nil,
`org-extend-today-until' will not be considered, resulting in the
current time being used instead of 23:59 yesterday.
Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93224>
* lisp/org-timer.el (org-timer-stop): Support countdown timers in addition
to relative timers.
* lisp/org-timer.el (org-timer-cancel-timer): Remove function.
* lisp/org-timer.el (org-timer-pause-or-continue): Support countdown
timers in addition to relative timers.
* testing/lisp/test-org-timer.el: New file.
* doc/org.texi: Merge relative and countdown timer nodes.
Several previous issues are fixed with these changes.
- org-timer-set-timer and org-timer-cancel-timer did not reset
org-timer-start-time after countdown completed.
- Because org-timer-start did not return org-timer-pause-time to nil,
the modeline remained stuck at the paused time.
- When org-timer-start was called with a countdown timer, the modeline
was updated for the new relative timer, but the countdown timer
remained scheduled.
- When org-timer-pause-or-continue was called with a countdown timer
running, the modeline was put in a paused state, but the countdown
timer remained scheduled.
- When org-timer-stop was called with a countdown timer running, the
timer was removed from the modeline, but the countdown timer remained
scheduled.
- When org-timer-set-timer was called with a paused relative timer, the
relative timer was not reset properly (org-timer-pause-time was still
non-nil) and the modeline remained in the paused state of the relative
timer, even though the countdown timer was scheduled with
run-with-timer.
- Running org-timer-set-timer at the beginning of an empty buffer
resulted in an args-out-of-range error (due to the org-get-at-eol
call).
* doc/org.texi (Effort estimates): Remove `org-effort-property' from
variables index since it is a defconst, not a defcustom anymore.
See also 20dcd061a5.
* testing/lisp/test-org-table.el (test-org-table/field-formula-outside-table):
Older Emaacsen throw an 'error instead of 'user-error. Catch both
condition names to avoid spurious test failures when that happens.
* lisp/org.el (org-add-log-setup): A property drawer may be inserted
where the note is going to be added. Make sure the note ends after
the drawer.
Reported-by: Bradley M. Kuhn <bkuhn@ebb.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/93199>