Commit Graph

18227 Commits

Author SHA1 Message Date
Nicolas Goaziou 633e4d4202 org-colview: Remove summarize function from format spec
* 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.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou 9dfe3d8079 org-colview: Make `org-columns-current-maxwidths' a vector
* lisp/org-colview.el (org-columns-current-maxwidths): Update docstring.
(org-columns--autowidth-alist): Rename to...
(org-columns--set-widths): ... this.
(org-columns--display-here):
(org-columns--display-here-title):
(org-columns-widen):
(org-columns-update): Use new type.

(org-columns):
(org-agenda-columns): Apply renaming.

* testing/lisp/test-org-colview.el (test-org-colview/columns-width):
  Update test.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou ebf7bbb308 org-colview: Store properties in upper case
* 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'.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou 92443160fd ox-publish: Write cache after successfully publishing a file
* 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>
2016-02-22 21:53:42 +01:00
Michael Brand 54b4be8208 orgstruct: Add `org-force-cycle-archived'
* lisp/org.el (orgstruct-setup): Add `org-force-cycle-archived' to the
list of the functions to be hijacked.
2016-02-22 20:53:48 +01:00
Aaron Ecay 84e3f23b9a ob-core: remove cruft
* 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.
2016-02-22 16:04:08 +00:00
Aaron Ecay 848a87634d Add org-babel-make-language-alias function.
* 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.
2016-02-22 16:04:03 +00:00
Nicolas Goaziou a311a85651 Merge branch 'maint' 2016-02-22 09:41:25 +01:00
Jason Furtney 1045e9e9c0 org.el: Fix typo in `org-previous-visible-heading'
* lisp/org.el (org-previous-visible-heading): Fix docstring.

TINYCHANGE
2016-02-22 09:40:37 +01:00
Nicolas Goaziou 2b3c72e231 org-colview: Fix failing test
* lisp/org-colview.el (org-columns-new): Tiny refactoring.
* testing/lisp/test-org-colview.el (test-org-colview/columns-new): Fix
  typo in test.
2016-02-21 20:21:48 +01:00
Nicolas Goaziou a16eba2a02 Fix `org-compute-property-at-point'
* lisp/org.el (org-compute-property-at-point): Properties are
  case-insensitive.
2016-02-21 15:58:11 +01:00
Nicolas Goaziou b386089ee6 org-colview: Fix `org-columns-new'
* lisp/org-colview.el (org-columns-new): Fix location of inserted
  column.  Properly handle non-interactive cases.
* testing/lisp/test-org-colview.el (test-org-colview/columns-new): New
  test.
2016-02-21 14:59:52 +01:00
Nicolas Goaziou cd5eb50fd1 org-colview: Fix CLOCKSUM and CLOCKSUM_T summaries
* 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.
2016-02-21 14:22:23 +01:00
Nicolas Goaziou fedd6be97a org-colview: Introduce custom summary types
* 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.
2016-02-21 00:44:17 +01:00
Nicolas Goaziou 15101fe7a6 org-colview: Remove now useless functions
* lisp/org-colview.el (org-columns-number-to-string):
(org-columns-string-to-number): Remove functions.

(org-columns--displayed-value): Apply removal.

* lisp/org.el (org-entry-properties): Ditto.

* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Ditto.
2016-02-21 00:44:17 +01:00
Nicolas Goaziou 58d387661a org-colview: Rationalize summary process
* 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.
2016-02-21 00:44:17 +01:00
Nicolas Goaziou 5c0a927990 org-colview: Move summary functions in a dedicated section 2016-02-21 00:44:17 +01:00
Nicolas Goaziou 58777b8200 org-colview: Remove unusued format attribute
* lisp/org-colview.el (org-columns-compile-map):
(org-columns-compile-format): Remove unused "format" attribute.

(org-columns--displayed-value):
(org-columns-new):
(org-columns-compute):
(org-columns-uncompile-format):
(org-agenda-colview-summarize): Apply removal.
2016-02-21 00:44:17 +01:00
Nicolas Goaziou d59d96efaa org-colview: Ignore "fmt" format property
* lisp/org-colview.el (org-columns--displayed-value):
(org-columns-next-allowed-value):
(org-columns-new):
(org-columns-compute):
(org-columns-number-to-string):
(org-columns-string-to-number):
(org-columns-uncompile-format):
(org-columns-compile-format):
(org-agenda-colview-summarize):
(org-agenda-colview-compute): Ignore "fmt" property.  Use "op" instead.

* lisp/org.el (org-entry-properties): Ditto.

* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Ditto.
2016-02-21 00:44:17 +01:00
Nick Dokos 73d5733d01 Fix typo. 2016-02-20 09:55:08 -05:00
Nicolas Goaziou 635161cd3e ob-core: Small refactoring
* lisp/ob-core.el (org-babel-insert-result): Exit early in case of wrong
  parameters used along with inline results.
2016-02-20 00:08:19 +01:00
Nicolas Goaziou 027681c352 Fix typo
* testing/lisp/test-ob.el (test-ob/results-in-narrowed-buffer): Fix
  typo.
2016-02-19 23:58:01 +01:00
Nicolas Goaziou 801a66c4b5 ob-core: Tiny refactoring
* 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.
2016-02-19 23:58:01 +01:00
Nicolas Goaziou e6984bd74b Merge branch 'maint' 2016-02-19 14:29:06 +01:00
Austin Walker 5a193ed485 ox-html.el: Fix TOC export of TODO headlines
* 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
2016-02-19 14:22:08 +01:00
Bastien ca842068bb Merge branch 'maint' 2016-02-19 08:39:28 +01:00
Bastien 9259de15ec Fix links in the table of contents of the HTML manual and guide.
* mk/mansplit.pl, mk/guidesplit.pl: Don't prepend "toc_" to TOC links in
the manual and the guide.

Thanks to Yasushi SHOJI for reporting this.
2016-02-19 08:38:15 +01:00
Nicolas Goaziou a4a6d65c4b ob-core: Fix inline results
* 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.
2016-02-18 23:17:15 +01:00
Nicolas Goaziou 323a945366 org-colview: Fix previous commit
* lisp/org-colview.el (org-columns-compute): Fix error introduced in
  last commit.
2016-02-18 13:56:27 +01:00
Nicolas Goaziou 62ec8c0a48 org-colview: Fix `org-columns-compute' with inlinetasks
* 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.
2016-02-18 11:40:17 +01:00
Nicolas Goaziou ca1fb80dad org-colview: Silence byte-compiler 2016-02-17 23:24:51 +01:00
Nicolas Goaziou 9e3090a5a0 org-colview: Fix `org-columns-update'
* 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.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou c158bf2f16 org-colview: Refactor low-high estimates
* lisp/org-colview.el (org-columns-string-to-number):
(org-columns-number-to-string): Handle estimates.

(org-columns-estimate-combine): Rename this to...
(org-columns--estimate-combine): ... this.

(org-columns-compile-map):
(org-columns-compute): Apply renaming.

(org-estimate-mean-and-var):
(org-estimate-print):
(org-string-to-estimate): Remove functions.

* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add tests.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou c8e7d93bbd org-colview: Remove trailing white space in headers
* lisp/org-colview.el (org-columns--display-here):
(org-columns--display-here-title): Remove trailing white space.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 3debe06bdd Rename `org-insert-columns-dblock' into `org-columns-insert-dblock'
* 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.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 2c974fc8c8 org-colview: Remove unused "calc" operator
* lisp/org-colview.el (org-columns--displayed-value):
(org-columns-compile-map):
(org-columns-compute):
(org-columns-compile-format):
(org-agenda-colview-summarize): Remove "calc" operator.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 923f512ee4 org-colview: Add tests
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  New test.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou aa2db034a0 org-colview: Fix age related summary
* 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".
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 04c405660d org-colview: Remove unused functions
* lisp/org-colview.el (org-columns-not-in-agenda):
(org-string-to-number): Remove functions.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou c551ee4dde org-colview: Fix {X%} summary type
* 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.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou d14d14b479 org-colview: Add tests
* testing/lisp/test-org-colview.el: New file.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 470f9fae08 org-colview: Fix capture view
* lisp/org-colview.el (org-columns-capture-view): Rename to...
(org-columns--capture-view): ... this.

(org-dblock-write:columnview): Fix produced table according to new
column view internals.

* lisp/org-colview.el (org-columns--clean-item): New function.

(org-listtable-to-string): Remove function.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 23f1119042 org-colview: Allow to force global column view
* lisp/org-colview.el (org-columns): Add new argument to force global
  column view.

* doc/org.texi (Using column view): Document change.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 279902ca4d org-colview: Fix column width computation
* 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.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 3196b14342 Make `org-agenda-view-columns-initially' a defcustom
* lisp/org-agenda.el (org-agenda-view-columns-initially): New variable,
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 4eada95883 Move `org-columns-modify-value-for-display-function'
* lisp/org.el (org-columns-modify-value-for-display-function): Move from
  here...
* lisp/org-colview.el (org-columns-modify-value-for-display-function):
  ... to here.
2016-02-17 22:49:19 +01:00
Nicolas Goaziou a5540c5599 org-colview: Remove compatibility cruft
* lisp/org-colview.el (org-verify-version): Remove function.
(org-columns):
(org-agenda-columns): Apply removal.
2016-02-17 22:49:19 +01:00
Erik Hetzner c56ff1071d org-attach: Fix git annex test directories
* testing/lisp/test-org-attach-annex.el: `default-directory' should end
  in a slash to function properly. This was causing test failures on
  older versions of git-annex.
2016-02-16 21:40:37 +01:00
John Foerch ff98903015 org-attach: Make use of git optional
* lisp/org-attach.el (org-attach-commit): New variable.
(org-attach-attach): Use new variable.

TINYCHANGE
2016-02-14 17:56:18 +01:00
Achim Gratz bb3dca06a5 Makefile: provide CHMOD customization, use it for cleantest
* mk/default.mk (CHMOD): Addtional customization variable for
  chmod (change file permissions).  Explain why we need it for
  git-annex.

* mk/targets.mk (cleantest): If the plain $(RMR) fails, try to make
  directories writable recursively and retry the $(RMR).
  (cleanall, $(CLEANDIRS:%=clean%)): Use "+" instead of ";" to reduce
  the number of execs.
2016-02-14 12:44:56 +01:00