Commit Graph

1532 Commits

Author SHA1 Message Date
Nicolas Goaziou 85acebdc2e Remove auto-repair of malformed property drawers
* lisp/org.el (org-buffer-property-keys): Remove optional argument
  IGNORE-MALFORMED.
* lisp/org-pcomplete.el (pcomplete/org-mode/prop): Update call to
  previous function.

* testing/lisp/test-org.el (test-org/buffer-property-keys): Remove
  a test.

More often than not, the question just gets in the way.  Use `M-x
org-lint' instead.
2017-09-16 14:15:57 +02:00
Nicolas Goaziou 9e062df65d Merge branch 'maint' 2017-09-14 15:44:06 +02:00
Nicolas Goaziou 25f12218d2 Fix `org-auto-repeat-maybe'
* lisp/org.el (org-auto-repeat-maybe): Fix `org-auto-repeat-maybe'.

* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Add test.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00298.html>
2017-09-14 15:40:28 +02:00
Nicolas Goaziou 04498a4fbd Merge branch 'maint' 2017-09-14 15:25:36 +02:00
Nicolas Goaziou 63f1ffac32 ob-scheme: Fix results error on unspecified and void values
* lisp/ob-scheme.el (org-babel-scheme-execute-with-geiser): Return
  "#<void>" or "#<unspecified>" when the REPL says so.

* testing/lisp/test-ob-scheme.el (test-ob-scheme/unspecified): New
  test.
(test-ob-scheme/prologue): Fix tests.

Reported-by: Lawrence Bottorff <borgauf@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00346.html>
2017-09-14 15:25:04 +02:00
Nicolas Goaziou c59cb987eb Merge branch 'maint' 2017-09-12 09:02:43 +02:00
Nicolas Goaziou 95271315cc Fix `org-forward-sentence' on a headline
* lisp/org.el (org-forward-sentence): Fix `org-forward-sentence' on a headline.

* testing/lisp/test-org.el (test-org/forward-sentence): Add tests.

Reported-by: Mat Vibrys <vibrysec@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00282.html>
2017-09-12 09:02:02 +02:00
Nicolas Goaziou bd2378161e Table of contents ignore unnumbered headlines
* doc/org.texi (Table of contents): Document behavior.
* lisp/ox-texinfo.el (org-texinfo-classes): Use @heading commands and
  alike for unnumbered sections.
* lisp/ox.el (org-export-collect-headlines): Ignore unnumbered
  headlines.

* testing/lisp/test-ox.el (test-org-export/collect-headlines): Add
  test.
2017-09-10 15:53:20 +02:00
Stig Brautaset 2b2314d46d org-colview: Allow custom COLLECT functions for derived properties
* lisp/org-colview.el (org-columns-summary-types): Allow new format.
(org-columns--summarize): Update to new summary type format.
(org-columns--collect): New function.
(org-columns--compute-spec): Apply changes.

* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add test.

In addition to (LABEL . SUMMARIZE), org-columns-summary-types now
accepts (LABEL SUMMARIZE COLLECT) entries. The new COLLECT function is
called with one argument, the property being summarized.

TINYCHANGE
2017-09-10 11:06:43 +02:00
Nicolas Goaziou 007bbddbcc ox-html: Prevent spurious target below headlines
* lisp/ox-html.el (org-html-headline):
(org-html-link): Do not insert an additional target.

* lisp/ox-publish.el (org-publish-resolve-external-link): Add an
  optional argument.

* lisp/ox.el (org-export-get-reference): Improve docstring.

* testing/examples/pub/a.org:
* testing/examples/pub/b.org: New files.
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link):
  New test.
2017-09-10 00:23:42 +02:00
Nicolas Goaziou c8aaf8f694 Merge branch 'maint' 2017-09-08 13:21:22 +02:00
Nicolas Goaziou 7ce9a24115 Fix duplicate tests
Reported-by: Stig Brautaset <stig@brautaset.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00187.html>
2017-09-08 13:20:48 +02:00
Nicolas Goaziou 17013d6f38 Remove duplicate test
* testing/lisp/test-org-table.el (test-org-table/align): Remove test.
2017-09-08 13:14:55 +02:00
Nicolas Goaziou 11979e298d org-archive: Fix failing tests
* testing/lisp/test-org-archive.el (test-org-element/archive-update-status-cookie):
Fix failing tests.
2017-09-07 15:25:00 +02:00
Nicolas Goaziou 6cfc7cb958 Merge branch 'maint' 2017-09-07 15:21:35 +02:00
Nicolas Goaziou 91a76063d8 org-duration: Fix `org-duration-to-minutes' with the empty string
* lisp/org-duration.el (org-duration-to-minutes): Accept the empty
  string.

* testing/lisp/test-org-duration.el (test-org-duration/to-minutes):
  Add test.

For backward compatibility with `org-duration-string-to-minutes'
accept the empty string as a duration.
2017-09-07 15:20:26 +02:00
Nicolas Goaziou 70d2b3c96f org-table: Obey <c> cookie when aligning a table
* lisp/org-table.el (org-table--align-field): New function.
(org-table-align): Use new function.  Refactor code.
(org-table-justify-field-maybe): Use new function.
(org-table-get-remote-range): Remove duplicate bindings.

* doc/org.texi (Column width and alignment): Remove footnote.

* testing/lisp/test-org-table.el (test-org-table/align): New test.
2017-09-06 15:21:20 +02:00
Nicolas Goaziou 882f3f3fc0 org-table: Change behavior of `org-table-toggle-column-width'
* lisp/org-table.el (org-table-toggle-column-width): Change behavior
  of `org-table-toggle-column-width'.
(org-table-shrink): Allow optional arguments.

* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
  Update tests.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 23a2fde6fe Remove visual effect of width cookies in tables
* lisp/org-colview.el (org-dblock-write:columnview): Remove :width
  parameter.

* lisp/org-table.el (org-narrow-column-arrow): Remove variable.
(org-table-cleanup-narrow-column-properties): Remove function.
(org-table-align): Ignore width cookies when aligning table.
(org-table-justify-field-maybe):
(org-table-finish-edit-field):
(org-table-follow-fields-with-editor):
(orgtbl-setup): Remove reference to `org-cwidth' property.

* lisp/org.el (org-mode):
(org-hide-wide-columns): Remove function.
(org-set-font-lock-defaults): Apply previous removal.
(org-shorten-string): Ignore `org-cwidth' property.

* testing/lisp/test-org-colview.el (test-org-colview/dblock): Remove
  a test.

Export back-ends may still use width cookie to alter table's output.
2017-09-06 15:18:37 +02:00
Nicolas Goaziou 6d6a30d4cd org-table: Implement shrunk columns
* lisp/org-table.el (org-table-shrunk-column-indicator): New variable.
(org-table-with-shrunk-columns): New macro.
(org-table--shrunk-field):
(org-table--list-shrunk-columns):
(org-table--shrink-field):
(org-table--read-column-selection):
(org-table--expand-all-columns):
(org-table-toggle-column-width): New functions.

(org-table-align):
(org-table-get-field):
(org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-move-row):
(org-table-insert-row):
(org-table-insert-hline):
(org-table-kill-row):
(org-table-sort-lines): Use new functions.

(org-table-overlay-coordinates):
(org-table-toggle-coordinate-overlays): Tiny refactoring.

* testing/lisp/test-org-table.el (test-org-table/toggle-column-width):
(test-org-table/shrunk-columns): New tests.
2017-09-06 15:18:37 +02:00
Jay Kamat 331ba68495 org-archive.el: Update statistic cookies when archiving
* lisp/org-archive.el (org-archive-subtree): Update todo statistics
  when calling `org-archive-subtree'.
(org-archive-to-archive-sibling): Update cookie statistics when
calling `org-archive-to-archive-sibling'.

* testing/lisp/test-org-archive.el: New file.

This can be disabled by setting `org-provide-todo-statistics' to nil.
2017-09-06 14:31:01 +02:00
Eduardo Bellani 6edec1bef5 Fix table variable with commas in ob-sqlite
* lisp/ob-sqlite.el (org-babel-sqlite-expand-vars): Stop interfering
  with the 'orgtbl-to-csv' default formatting.

* testing/lisp/test-ob-sqlite.el: New file.

The problem here was that ob-sqlite was providing a format to the
`orgtbl-to-csv' that actually overwrote the default format in that
function, and in the case where there were commas in the content of
the table, broke the table as argument mechanism.

TINYCHANGE
2017-09-06 13:18:30 +02:00
Nicolas Goaziou 8a0c89244d Merge branch 'maint' 2017-08-31 23:15:56 +02:00
Nicolas Goaziou 1654a5a98a Fix `:jump-to-captured' when refiling a capture target
* lisp/org-capture.el (org-capture-refile): Call
  `org-capture-goto-last-stored' at the appropriate time.

* testing/lisp/test-org-capture.el (test-org-capture/refile): Add
  test.

Reported-by: "Raymond Zeitler" <zeitra@yahoo.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00704.html>
2017-08-31 23:14:04 +02:00
Nicolas Goaziou 64bfa2d931 Remove `inline-only' option for `org-export-use-babel'
* lisp/ob-exp.el (org-export-use-babel): Remove `inline-only' option.
(org-babel-exp-process-buffer): Ignore `inline-only' value.

* doc/org.texi (Exporting code blocks): Remove documentation.

* testing/lisp/test-ob-exp.el (ob-export/babel-evaluate): Remove tests.
2017-08-26 10:32:26 +02:00
Nicolas Goaziou e0682619dd Merge branch 'maint' 2017-08-26 00:12:46 +02:00
Nicolas Goaziou a6840598ed Fix `org-copy-visible'
* lisp/org.el (org-copy-visible): Rewrite function.  Do not use
  dubious `org-find-visible' and `org-find-invisible'.

* testing/lisp/test-org.el (test-org/copy-visible): New test.

Reported-by: Gary Cheng <garycheng12@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00568.html>
2017-08-26 00:09:51 +02:00
Nicolas Goaziou a68d117459 Merge branch 'maint' 2017-08-25 15:25:02 +02:00
Nicolas Goaziou c1b9d38c89 org-lint: Fix wrong warning with inline footnotes
* lisp/org-lint.el (org-lint-undefined-footnote-reference): Do not
  warn when definition is inline.

* testing/lisp/test-org-lint.el (test-org-lint/undefined-footnote-reference):
  Add tests.

Reported-by: Eric S Fraga <esflists@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00577.html>
2017-08-25 15:24:07 +02:00
Nicolas Goaziou bae41a277e org-table: Fix sorting with times > 100 hours
* lisp/org-table.el (org-table-sort-lines): Fix regexp.  Also test
  durations.

* testing/lisp/test-org-table.el (test-org-table/sort-lines): Update
  tests.  Add a new one.
2017-08-25 00:06:27 +02:00
Nicolas Goaziou 526b3d4b98 Merge branch 'maint' 2017-08-21 21:27:06 +02:00
Nicolas Goaziou 6980b02b6f Revert "org-macro: Expand macros only within narrowed part of buffer"
This reverts commit 82db669de6.
2017-08-21 21:21:30 +02:00
Nicolas Goaziou 5cde947766 test-org-agenda: Small refactoring
* testing/lisp/test-org-agenda.el (org-test-agenda--agenda-buffers):
(org-test-agenda--kill-all-agendas): Use appropriate prefix.

(test-org-agenda/empty):
(test-org-agenda/one-line):
(test-org-agenda/scheduled-non-todo):
(test-org-agenda/sticky-agenda-name):
(test-org-agenda/sticky-agenda-name-after-reload): Find a human
readable name.
2017-08-19 19:42:20 +02:00
Nicolas Goaziou bc8360c702 Fix failing test
* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
  Fix failing test.
2017-08-19 19:12:08 +02:00
Nicolas Goaziou 8590c79b3a Fix some failing tests
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-headers):
(test-ob-exp/org-babel-exp-src-blocks/w-no-file): Fix test.

These tests fail when "htmlize" is not available on the machine.
2017-08-19 18:56:31 +02:00
Nicolas Goaziou 15e992c6da Merge branch 'maint' 2017-08-13 16:21:21 +02:00
Nicolas Goaziou 24a76fbe57 ob-core: Fix improper results indentation
* lisp/ob-core.el (org-babel-insert-result): Fix improper results
  indentation.
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation): Add
  test.

Reported-by: Chunyang Xu <mail@xuchunyang.me>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00308.html>
2017-08-13 16:20:20 +02:00
Galen Menzel 8fa6c015a4 Fix false test failure
* testing/lisp/test-org.el (test-org/refile-get-targets): Fix false
failures when test temp-file path contains a symlink.

TINYCHANGE
2017-08-10 22:43:39 +02:00
Nicolas Goaziou 9945e029f5 Merge branch 'maint' 2017-08-10 22:40:34 +02:00
Galen Menzel bff63cbeb3 Fix false test failure
* testing/lisp/test-org.el (test-org/deadline-close-p): Fix false
failures due to time-zone differences.
2017-08-10 22:39:30 +02:00
Nicolas Goaziou 829ffa977c Merge branch 'maint' 2017-08-10 12:42:51 +02:00
Nicolas Goaziou febab2fedb Add test for `org-open-at-point'
* testing/lisp/test-org.el (test-org/open-at-point/tag): New test.
2017-08-10 12:41:54 +02:00
Christian Garbs 4d2c8354ee ob-vala.el: Add Vala support to Babel
* lisp/ob-vala.el: Add support for the Vala language to Babel.

* testing/lisp/test-ob-vala.el: Add tests for ob-vala.el.

* doc/org.texi (Working with source code): Add Vala to the list of
  supported languages.
2017-08-07 11:40:25 +02:00
Nicolas Goaziou a7e11643a9 Merge branch 'maint' 2017-08-06 10:31:06 +02:00
Nicolas Goaziou 9974ed39b2 org-src: Fix remote footnote edition
* lisp/org-src.el (org-edit-footnote-reference): Clone local variables
  in remote editing buffer.

* testing/lisp/test-org-src.el (test-org-src/footnote-references): Add
  test.
2017-08-06 10:30:48 +02:00
Nicolas Goaziou b0776e39b5 org-table: Small refactoring
* lisp/org-table.el (org-table-previous-field): Small refactoring.

* testing/lisp/test-org-table.el (test-org-table/previous-field): New
  test.
2017-08-02 10:35:57 +02:00
Nicolas Goaziou 29d8d407e8 org-macs: Add tests for `org-split-string.
* testing/lisp/test-org-macs.el (test-org/split-string): New test.
2017-08-01 20:29:23 +02:00
Nicolas Goaziou 90f606d9c2 org-macs: Fix `org-string-width' with `display' property
* lisp/org-macs.el (org-string-display): New function.
(org-string-width): Use new function.

* testing/lisp/test-org-macs.el: New file.
2017-07-28 12:15:47 +02:00
Nicolas Goaziou e79b0bd9f3 Merge branch 'maint' 2017-07-28 10:15:35 +02:00
Nicolas Goaziou 808089ee04 `org-forward/backward-paragraph' do not error at buffer boundaries
* lisp/org.el (org-forward-paragraph):
(org-backward-paragraph): Do not error at buffer boundaries.

Reported-by: Omar Antolín Camarena <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-07/msg00478.html>
2017-07-28 10:07:53 +02:00