* lisp/org-colview.el (org-columns-check-computed): Check if current
column contains an operator instead of looking for an `org-computed'
text property.
(org-columns--compute-spec): Do not apply `org-computed' text property.
* lisp/org-colview.el (org-edit-headline): Move from here...
* lisp/org.el (org-edit-headline): ... to here. Also refactor code.
Accept to set headline non-interactively.
* testing/lisp/test-org.el (test-org/edit-headline): New test.
* lisp/org-colview.el (org-columns-store-format): Make sure we're really
at a COLUMNS keyword before replacing it. Also replace only the first
one, not all of them.
* testing/lisp/test-org-colview.el (test-org-colview/columns-new): Add
tests.
* lisp/org-colview.el (org-columns--collect-values):
(org-agenda-colview-summarize): Use column format specification as the
unique identifier for the returned alist.
* lisp/org-colview.el (org-columns--display-here): Store column format
specification in a new overlay property.
(org-columns--set-widths):
(org-columns--display-here): Use column format specification instead of
(org-columns--displayed-value): Since the same property can have
multiple titles, use column specification instead of property as keys.
(org-columns--collect-values): Apply signature change.
(org-columns-update): Handle multiple columns for the same property.
Also apply signature change to `org-columns--displayed-value'.
(org-columns--compute-spec): New function.
(org-columns-compute):
(org-columns-compute-all): Use new function.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
(test-org-colview/columns-update): Add tests.
* doc/org.texi (Column attributes): Document computation with multiple
summary types for a given property.
* lisp/org-colview.el (org-columns--summarize): Throw an error when no
summarize function is associated to a given operator.
(org-columns-compile-format): Do not provide summarize function, which
can be found using the accessor `org-columns--summarize'.
(org-columns-new):
(org-columns-uncompile-format):
(org-columns-compute):
(org-columns-compute-all):
(org-agenda-colview-summarize): Use new compiled format.
* lisp/org-colview.el (org-columns-compile-format): Property is
upper-cased. Title is not, however.
(org-columns--displayed-value):
(org-columns--collect-values):
(org-columns--autowidth-alist):
(org-columns--overlay-text):
(org-columns--display-here):
(org-columns--display-here-title):
(org-columns-next-allowed-value):
(org-columns):
(org-columns-widen):
(org-columns-update):
(org-columns--capture-view):
(org-dblock-write:columnview):
(org-agenda-colview-summarize): Since properties in compiled format are
upper-cased, remove the `upcase' or `assoc-string' dance.
* testing/lisp/test-org-colview.el (test-org-colview/columns-new):
(test-org-colview/columns-update): Add case-sensitivity tests.
`assoc-string' is still necessary in functions where property is
provided by the user, e.g. `org-columns-update'.
* lisp/ox-publish.el (org-publish-file): Ignore NO-CACHE parameter when
writing cache to file. This is needed to recover from an interrupted
publishing process.
Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/105046>
* lisp/ob-core.el (org-babel-execute-src-block): Simplify.
(org-babel-tramp-handle-call-process-region): Remove.
Commit 57104f9f changed an org-flet to a let, rendering the whole
apparatus of modifying call-process-region inoperative. Supposedly this
was put in place to work around a bug in
tramp-handle-call-process-region, which was removed from tramp in
2012 (after being renamed to tramp-sh-call-process-region). *shrug*
This commit just removes the whole thing.
It also no longer consults ‘org-src-lang-modes’, following on from
commit 6287416.
* lisp/ob-core.el (org-babel-make-language-alias): New function.
* lisp/ob-emacs-lisp.el: Use it.
Previously this was accomplished via org-src-lang-modes, but that is a
poor solution, as it conflates the remapping of language mode names with
the creation of aliases.
* lisp/org-colview.el (org-columns--summarize): New function.
(org-columns-new):
(org-columns-compile-format): Use new function.
(org-agenda-colview-summarize): Use new function. Fix return value for
CLOCKSUM and CLOCKSUM_T.
* lisp/org-colview.el (org-columns-summary-types): New variable.
(org-columns-compile-map): Rename into...
(org-columns-summary-types-default): ... this.
(org-columns-new):
(org-columns-compile-format): Use new variables.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
Add test.
* doc/org.texi (Column attributes): Document new variable. Improve
description of time and age based summary types.
* lisp/org-colview.el (org-columns-compile-map): Externalize summary
functions. Remove "none" summary.
(org-columns-new): Apply previous removal.
(org-columns--fractional-duration-re): Rename variable to...
(org-columns--duration-re): ... this.
(org-columns-compute): Change how values are computed. This is now done
in one pass. A summarize function is given a list of strings and
possible a format string. It has to return the computed value as
a string.
(org-columns--time-to-seconds):
(org-columns--age-to-seconds):
(org-columns--summary-apply-times):
(org-columns--summary-sum):
(org-columns--summary-currencies):
(org-columns--summary-checkbox):
(org-columns--summary-checkbox-count):
(org-columns--summary-checkbox-percent):
(org-columns--summary-min):
(org-columns--summary-max):
(org-columns--summary-mean):
(org-columns--summary-sum-times):
(org-columns--summary-min-time):
(org-columns--summary-max-time):
(org-columns--summary-mean-time):
(org-columns--summary-min-age):
(org-columns--summary-max-age):
(org-columns--summary-mean-age): New functions.
(org-columns--summary-estimate):
(org-agenda-colview-summarize): Update functions to new process.
(org-columns-string-to-number): Apply variable renaming.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
Fix test. Add some more.
* lisp/ob-core.el (org-babel-insert-result): Delegate removal of old
inline results to...
(org-babel-where-is-src-block-result): ... this.
Now `org-babel-where-is-src-block-result' behaves in a symmetric way for
inline an non-inline source blocks.
* lisp/ox-html.el (org-html--todo): Don't show nil in format string for
TODO class
Use empty string if :html-todo-kwd-class-prefix is not present.
TINYCHANGE
* lisp/ob-core.el (org-babel-where-is-src-block-result): Find results
for inline src-blocks or inline babel call not located on a subsequent
line, e.g., because of filling.
(org-babel-insert-result): When inline results exist, replace them
in-place.
(org-babel-remove-inline-result): Also remove results not located on the
same line as the source code.
(org-babel-examplify-region): Change signature. Properly mark inline
results at the beginning of a line.
* testing/lisp/test-ob.el (test-ob/inline-src_blk-default-results-replace-line-1):
Add tests.
* lisp/org-colview.el (org-columns-compute): Properly summarize values
obtained through inline tasks.
* testing/lisp/test-org-colview.el (test-org-colview/columns-update):
Add test.
Previously, the summary of values from inline tasks was added to to the
summary of values from children.
* lisp/org-colview.el (org-columns--overlay-text): New function.
(org-columns--display-here): Use new function.
(org-columns-update): Properly handle additional decorations to
displayed values (e.g., ellipses).
* testing/lisp/test-org-colview.el (test-org-colview/columns-update):
New test.
* lisp/org-colview.el (org-columns-dblock-insert): Rename to...
(org-columns-insert-dblock): ... this. Also fix a bug that would insert
"local" instead of `local' as the :id value.
* lisp/org.el (org-mode-map):
(org-org-menu): Use new name.
* lisp/org-colview.el (org-columns-time): Rename to...
(org--columns-time): ... this.
(org-columns--fractional-duration-re): New variable.
(org-columns-edit-value):
(org-columns):
(org-columns-compute-all):
(org-agenda-columns): Use new variable.
(org-columns-compile-map): Remove unneeded "calc" attribute.
(org-columns-number-to-string):
(org-columns-string-to-number): Fix ages set as a duration (e.g., "1d
12h"). Compare ages as seconds, not number of days.
* doc/org.texi (Column attributes): Document syntax for "age".
* lisp/org-colview.el (org-columns-compute-all): Small refactoring.
(org-columns-number-to-string): Handle special case of 0 among 0. Small
refactoring.
(org-nofm-to-completion):
(org-format-time-period): Remove functions.
* lisp/org-colview.el (org-columns-current-widths): Remove variable.
(org-columns--value): Remove function.
(org-columns--displayed-value): New function.
(org-columns--collect-values): New function.
(org-columns-display-here): Rename function to...
(org-columns--display-here): ... this. First argument is now mandatory.
(org-columns-display-here-title): Rename function to...
(org-columns--display-here-title): ... this.
(org-columns-autowidth-alist): Rename function to...
(org-columns--autowidth-alist): ... this. Remove one argument.
(org-columns-edit-value):
(org-columns-next-allowed-value): Always refresh all columns, not only
the current one. Otherwise, the current column may end up with
a different width than the others.
(org-columns):
(org-dblock-write:columnview):
(org-agenda-columns):
(org-agenda-colview-summarize): Apply changes above.
Columns width is now computed according to displayed values, not real
ones.