Commit Graph

1668 Commits

Author SHA1 Message Date
Nicolas Goaziou e9f30779de Merge branch 'maint' 2017-12-31 15:49:55 +01:00
Nicolas Goaziou af58a6dbf7 Change Org-mode into Org mode
* lisp/ob-core.el (org-babel-result-to-file):
* lisp/ob-picolisp.el:
* lisp/org-agenda.el (org-check-for-org-mode):
(org-search-view):
(org-tags-view):
(org-agenda-cleanup-fancy-diary):
(org-agenda-get-day-entries):
* lisp/org-table.el (orgtbl-mode):
* lisp/org-w3m.el (org-w3m-copy-for-org-mode):
* lisp/org.el (org-modules):
(org-startup-options):
(org-fontify-meta-lines-and-blocks):
* mk/default.mk:
* mk/manfull.pl:
* mk/org-fixup.el (org-make-org-version):
(org-make-org-loaddefs):
* mk/orgcard2txt.pl (rep_esc):
* mk/targets.mk ($(info):
* testing/README:
(Example):
* testing/examples/no-heading.org:
* testing/examples/normal.org: Change Org-mode into Org mode
2017-12-31 15:48:09 +01:00
Nicolas Goaziou c5208634ba Fix failing tests.
* testing/lisp/test-org-list.el (test-org-list/send-list): Remove
  test.
(test-org-list/to-html):
(test-org-list/to-latex):
(test-org-list/to-texinfo): Update tests.
2017-12-31 15:19:56 +01:00
Nicolas Goaziou 2fb65b73b6 test-org-table: Tiny refactoring
* testing/lisp/test-org-table.el (test-org-table/org-table-make-reference/mode-string-EL):
(test-org-table/org-table-make-reference/mode-string-E):
(test-org-table/org-table-make-reference/mode-string-EN):
(test-org-table/org-table-make-reference/mode-string-L):
(test-org-table/org-table-make-reference/mode-string-none):
(test-org-table/org-table-make-reference/mode-string-N): Tiny
refactoring.
2017-12-30 00:24:01 +01:00
Marco Wahl 144451143a Merge branch 'maint' 2017-12-28 19:15:43 +01:00
Marco Wahl e401afffde inlinetask: Fix folding of directly consecutive inlinetask children 2017-12-28 19:12:36 +01:00
Marco Wahl 6311c12556 Merge branch 'maint' 2017-12-28 18:05:54 +01:00
Marco Wahl b29a972307 org-inlinetask:Fix folding of inline tasks within plain list
This is the fix proposed by Nicolas.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2017-12/msg00564.html

Add and accommodate some tests.
2017-12-28 17:59:52 +01:00
Marco Wahl 269009d297 Merge branch 'maint' 2017-12-28 15:44:34 +01:00
Marco Wahl ab61357791 testing/README Document use of regexp filter for testing 2017-12-28 15:35:19 +01:00
Nicolas Goaziou 774e553f11 Merge branch 'maint' 2017-12-23 14:03:47 +01:00
Nicolas Goaziou d9125e435f Fix recursive Noweb expansion
* lisp/ob-core.el (org-babel-expand-noweb-references): Recursive Noweb
  expansion obey to :noweb parameter.
* testing/lisp/test-ob.el (test-ob/noweb-expansion): Add tests.

Fixes: 17523
2017-12-23 13:58:25 +01:00
Nicolas Goaziou 913aad68c3 Merge branch 'maint' 2017-12-20 13:16:28 +01:00
Nicolas Goaziou 3acc212c8f ob-core: Get :noweb-ref from definition instead of point of call
* lisp/ob-core.el (org-babel-expand-noweb-references): Get :noweb-ref
  from definition instead of point of call.

* testing/lisp/test-ob.el (test-ob/noweb-expansion-1):
(test-ob/noweb-expansion-2): Merge tests.  Add test.
2017-12-20 13:15:08 +01:00
Kyle Meyer 06b49cd837 Merge branch 'maint' 2017-12-19 00:00:49 -05:00
Jack Kamm b506bb68d0 ob-python: Fix :session :results output multiline behavior
* lisp/ob-python.el (orb-babel-python-evaluate-session): When :session
:results output, send multiline code blocks to tmpfile and execute in
Python with exec().
(org-babel-python--exec-tmpfile): New variable.
* testing/lisp/test-ob-python.el (test-ob-python/session-multiline):
Test for :session with multiple lines and indentation.
2017-12-18 23:59:04 -05:00
Nicolas Goaziou fdb2eb6701 Preserve file local variables during some operations
* lisp/org-macs.el (org-preserve-local-variables): New macro.
* lisp/org-footnote.el (org-footnote--clear-footnote-section):
(org-footnote--goto-local-insertion-point):
(org-footnote-create-definition):
(org-footnote-delete):
(org-footnote-renumber-fn:N):
(org-footnote-sort):
(org-footnote-normalize):
* lisp/org.el (org-move-subtree-down):
(org-copy-subtree):
(org-sort-entries):
(org-refile): Use new macro.
* testing/lisp/test-org-footnote.el (test-org-footnote/normalize):
(test-org-footnote/delete):
(test-org-footnote/sort):
(test-org-footnote/normalize):
* testing/lisp/test-org.el (test-org/sort-entries): Add tests.

Operations affected include copying, killing, refiling, archiving and
moving subtrees.  It also affects sorting, creating and deleting
footnotes.
2017-12-18 16:01:41 +01:00
Nicolas Goaziou 3ac619c8ac org-macro: Placeholders in (eval ...) macros are always strings
* lisp/org-macro.el (org-macro-initialize-templates): Update
  templates.
(org-macro-expand): Ensure placeholders in "eval" macros are strings.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Update
  tests.
2017-12-17 09:40:56 +01:00
Nicolas Goaziou 6ffcdcbf02 Merge branch 'maint' 2017-12-16 13:45:43 +01:00
Nicolas Goaziou 84cb63a44a ox: Fix plain text export with `org-export-with-backend'
* lisp/ox.el (org-export-with-backend): Handle arity for plain text
  transcoder.
* testing/lisp/test-ox.el (test-org-export/with-backend): Add test.
2017-12-16 13:44:56 +01:00
Nicolas Goaziou 5d4691dfbf Merge branch 'maint' 2017-12-15 00:00:55 +01:00
Nicolas Goaziou 327ca051ae ob-ref: Fix parsing arguments with a newline character
* lisp/ob-ref.el (org-babel-ref-split-regexp): Remove variable.
(org-babel-ref-parse): Handle arguments containing a newline
character (e.g., strings).

* testing/lisp/test-ob-lob.el (test-ob-lob/assignment-with-newline):
  New test.
2017-12-15 00:00:30 +01:00
Nicolas Goaziou 6fc4a1c53b Merge branch 'maint' 2017-12-14 22:40:55 +01:00
Nicolas Goaziou fe98379fce Fix fuzzy link escaping
* lisp/org.el (org-make-link-string): Properly escape square brackets
  and percent sings in fuzzy links.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link):
  Update tests.

Reported-by: Paulo Matos <paulo@matos-sorge.com>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00269.html>
2017-12-14 22:39:54 +01:00
Nicolas Goaziou f8849e92e5 org-archive: Add a test
* testing/lisp/test-org-archive.el (test-org-archive/to-archive-sibling):
New test.
2017-12-11 23:22:21 +01:00
Nicolas Goaziou c3c1c52eb8 ox: Fix inline source block evaluation
* lisp/ox.el (org-export-as): Specifically expand {{{results}}} macro
  after Babel code execution.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add test.

Reported-by: "Berry, Charles" <ccberry@ucsd.edu>
<http://lists.gnu.org/r/emacs-orgmode/2017-12/msg00202.html>
2017-12-11 14:56:57 +01:00
Nicolas Goaziou fc5abc2d55 ob-core: Insert lowercase results
* lisp/ob-core.el (org-babel-insert-result): Insert lower case blocks
  and drawers.

* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-wrap):
(test-ob/org-babel-remove-result--results-org):
(test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
(test-ob/org-babel-remove-result--results-code): Update tests.
2017-12-10 23:05:32 +01:00
Rasmus 94f1a58438 org-tempo.el: New file for expansion of templates
* lisp/org-tempo.el: New file.
* doc/org.texi (Structure templates):
* lisp/org.el (org-modules): Add org-tempo.
* testing/lisp/test-org-tempo.el: New file.
2017-12-08 00:29:08 +01:00
Nicolas Goaziou 259656a76e Merge branch 'maint' 2017-12-03 09:03:37 +01:00
Nicolas Goaziou 2faaacfeeb Revert the whole time zone mess
* lisp/org.el (org-time-string-to-time):
(org-time-string-to-seconds): Remove optional ZONE argument.
(org-2ft):
(org-check-before-date):
(org-check-after-date):
(org-check-dates-range):
(org-parse-time-string):
* lisp/org-clock.el (org-clock-get-sum-start):
(org-clock-out):
(org-clock-timestamps-change):
(org-clock-sum):
(org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes): Apply change.
* testing/lisp/test-org-clock.el (org-test-clock-create-clock):
(test-org-clock/clocktable/scope):
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Apply change.  Simplify tests to avoid daylight saving time issue.
2017-12-03 08:57:37 +01:00
Nicolas Goaziou bdaf5dacf4 Merge branch 'maint' 2017-12-02 17:27:53 +01:00
Nicolas Goaziou ca43c1f262 Fix RET past the last column of a table
* lisp/org.el (org-return): Split the table before first column or
  after last one.
* lisp/org-table.el (org-table-next-row): Remove code handling split.

* testing/lisp/test-org.el (test-org/return): Add test.
2017-12-02 17:23:03 +01:00
Nicolas Goaziou 0ace32b045 Merge branch 'maint' 2017-12-02 12:23:02 +01:00
Nicolas Goaziou f53d1e2005 Let `or-export-last-sibling-p' handle discontinuous headlines
* lisp/ox.el (org-export-last-sibling-p): Handle discontinuous
  headlines.
* testing/lisp/test-ox.el (test-org-export/last-sibling-p): Add test.

Fixes: 24836
2017-12-02 12:22:32 +01:00
Alex Branham ee7ead62aa Make `org-comment-dwim' check if on a heading
* lisp/org.el (org-comment-dwim): If on a heading, comment the
  heading.

* testing/lisp/test-org.el: Add test.

TINYCHANGE
2017-11-29 14:41:12 +01:00
Nicolas Goaziou acfb1ca4b8 Merge branch 'maint' 2017-11-29 14:37:33 +01:00
Nicolas Goaziou 12ea0f08f4 Fix some tests
* testing/lisp/test-org.el (test-org/comment-dwim): Fix tests
2017-11-29 14:37:12 +01:00
Nicolas Goaziou b0ab7008df Merge branch 'maint' 2017-11-26 10:47:55 +01:00
Nicolas Goaziou 6aac798f25 Fix publishing links to absolute file names belonging to project
* lisp/ox-publish.el (org-publish-file-relative-name): New function.
* lisp/ox-html.el (org-html-link): Use new function.

* testing/lisp/test-ox-publish.el (test-org-publish/file-relative-name):
  New test.
2017-11-26 10:46:53 +01:00
Nicolas Goaziou be1e807942 Merge branch 'maint' 2017-11-25 21:13:58 +01:00
Nicolas Goaziou 1d8126385c ob-core: Fix results removal without blank line between source and results
* lisp/ob-core.el (org-babel-remove-result): Delete blank lines before
  results.
(org-babel-result-end): Use `org-element-at-point'.
* testing/lisp/test-ob.el (test-ob-verify-result-and-removed-result):
  Remove duplicate.
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--no-blank-line):
  New test.
* testing/lisp/test-ob.el (test-ob/results-in-narrowed-buffer): Small
  refactoring.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00338.html>
2017-11-25 21:07:52 +01:00
Nicolas Goaziou 51234f9555 org-macro: Implement "keyword" macro
* lisp/org-macro.el (org-macro-initialize-templates): Implement
  "keyword" macro.
* doc/org.texi (Macro replacement): Document new macro.

* testing/lisp/test-org-macro.el (test-org-macro/keyword): New test.
2017-11-21 23:38:24 +01:00
Nicolas Goaziou 7455f4bf83 ox: Allow a less strict UNNUMBERED inheritance
* lisp/ox.el (org-export-collect-headlines):
(org-export-excluded-from-toc-p): Allow to number headlines in the
middle of an otherwise unnumbered tree.

* testing/lisp/test-ox.el (test-org-export/collect-headlines):
(test-org-export/excluded-from-toc-p):
(test-org-export/toc-entry-backend): Update tests.  Add more tests.

Reported-by: Akater <nuclearspace@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00219.html>
2017-11-20 14:07:03 +01:00
Nicolas Goaziou f482cfa785 Merge branch 'maint' 2017-11-20 00:14:05 +01:00
Nicolas Goaziou 82812ff086 ox: Fix UNNUMBERED strict inheritance
* lisp/ox.el (org-export-numbered-headline-p): Use a less opinionated
  definition of inheritance.

* testing/lisp/test-ox.el (test-org-export/numbered-headline-p):
  Update test.

* doc/org.texi (Export settings): Insist on UNNUMBERED inheritance.

It is now possible to number a headline within an unnumbered tree.
2017-11-20 00:09:59 +01:00
Nicolas Goaziou b8d473a04f org-table: Insert new column to the right instead of the left
* lisp/org-table.el (org-table-insert-column): Insert new column to
  the right instead of the left.

* testing/lisp/test-org-table.el (test-org-table/insert-column): New
  test.
2017-11-19 23:22:16 +01:00
Nicolas Goaziou 966af419f9 Merge branch 'maint' 2017-11-15 18:14:44 +01:00
Nicolas Goaziou 40f73953f6 Fix `org-string-display'
* lisp/org-macs.el (org-string-display): Preserve original string's
  display property when computing displayed width.

* testing/lisp/test-org-macs.el (test-org/string-display): Add test.

Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00160.html>
2017-11-15 18:13:34 +01:00
Nicolas Goaziou 8ff3673dfc Merge branch 'maint' 2017-11-15 17:41:48 +01:00
Nicolas Goaziou 6059c3a057 org-table: Clean left-over `:org-untouchable' property
* lisp/org-table.el (org-table-recalculate): Clean `:org-untouchable'
  property once we no longer need it.

* testing/lisp/test-org-table.el (test-org-table/formula-priority):
  New test.

Reported-by: Ruy Exel <ruyexel@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00159.html>
2017-11-15 17:40:22 +01:00
Marco Wahl 5c382f2ee2 org-attach,test-org-attach: Refactoring.
* lisp/org-attach.el (org-attach-dired-to-subtree): Renamed from
  `org-attach-dired-attach-to-next-best-subtree'.  Convenience
  functions have been dropped.

* testing/lisp/test-org-attach.el: Tests use
  `org-test-with-temp-text-in-file' now and are cleaner now.
2017-11-15 14:39:26 +01:00
Marco Wahl 615b147031 org-attach: Attach files specified in a dired buffer.
* lisp/org-attach.el (org-attach-attach-files): New.
(org-attach-dired-marked-files-in-dired): New
(org-attach-dired-marked-files-or-file-at-cursor-in-dired): New.
(org-attach-dired-attach-to-next-best-subtree): New command.
(org-attach-dired-attach-to-next-best-subtree-cp): New command.
(org-attach-dired-attach-to-next-best-subtree-mv): New command.
(org-attach-dired-attach-to-next-best-subtree-ln): New command.
(org-attach-dired-attach-to-next-best-subtree-lns): New command.
* testing/lisp/test-org-attach.el: Tests.
2017-11-15 11:25:51 +01:00
Nicolas Goaziou d07ee7f7f2 Implement :pre-blank property for items and footnotes definitions
* lisp/org-element.el (org-element-footnote-definition-parser):
(org-element-item-parser): Add `:pre-blank' property.
(org-element-footnote-definition-interpreter):
(org-element-item-interpreter):
(org-element-interpret-data):
* lisp/ox.el (org-export-data): Use new property.
* testing/lisp/test-org-element.el (test-org-element/footnote-definition-parser):
(test-org-element/item-parser): Add tests.
2017-11-10 00:38:31 +01:00
Eric Abrahamsen c04e357f3d Replace easy templates with org-insert-structure-template
* lisp/org.el (org-insert-structure-template): New function for
  wrapping region (or element at point) in a begin/end block.
  (org-structure-predefined-blocks): New option holding predefined
  blocks, for completion.
  (org-try-structure-completion,
  org-complete-expand-structure-template): Remove functions.
* doc/org.texi (Inserting structure templates): Document.
* testing/lisp/test-org.el (test-org/insert-template): New test.
2017-11-05 09:56:26 +01:00
Nicolas Goaziou 7ba058963e Merge branch 'maint' 2017-11-04 21:51:40 +01:00
Nicolas Goaziou 6186ed3a22 org-element: Fix item parser
* lisp/org-element.el (org-element--list-struct): Correctly handle end
  of sub-lists and end of last item.

* testing/lisp/test-org-element.el (test-org-element/item-parser):
(test-org-element/plain-list-parser): Add tests.
2017-11-04 21:50:11 +01:00
Nicolas Goaziou 6a273e30d7 Merge branch 'maint' 2017-11-03 22:20:46 +01:00
Xavier Martinez-Hidalgo f38a7d433b org-capture: Fix aborting after inserting text at end of buffer
* lisp/org-capture.el (org-capture-mark-kill-region): Set end marker
  insertion type so that it advances when inserting text at the end of
  the capture buffer.

* testing/lisp/test-org-capture.el (test-org-capture/insert-at-end-abort):
  Add test case.

Inserting text at the end of the capture buffer does not advance the
end kill marker.  This causes the narrowing region and the kill
markers to get out of sync, which prevents 'org-capture-finalize' from
correctly cleaning the target buffer when aborting the capture.

Setting the kill end marker insertion type fixes this.

TINYCHANGE
2017-11-03 22:20:11 +01:00
Nicolas Goaziou ee3a9e9a77 Fix failing test
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link):
  Rewrite test to prevent race condition which could affect results.
* testing/examples/pub/b.org: Add missing keyword.
2017-11-03 22:15:41 +01:00
Nicolas Goaziou 99dbca3d4f Remove `org-babel-use-quick-and-dirty-noweb-expansion'
* lisp/ob-core.el (org-babel-use-quick-and-dirty-noweb-expansion):
  Remove variable.
(org-babel-expand-noweb-references): Update function.

* doc/org.texi (noweb-ref): Document new behaviour.
(Noweb reference syntax): Delete reference to removed variable.

`org-babel-use-quick-and-dirty-noweb-expansion' main use is to speed
up Noweb expansion when expanding only by name.  By distinguishing
name and reference expansion, we no longer need this variable.  In the
first case, the expansion is quicker anyway, and in the second case,
we most certainly need an accurate expansion.
2017-10-26 13:09:23 +02:00
Nicolas Goaziou 1b9a66487a Move a test
* testing/lisp/test-org-macs.el (test-org/in-regexp): Moved from...
* testing/lisp/test-org.el: ... here.
2017-10-24 09:55:49 +02:00
Nicolas Goaziou 96c7fd7541 Merge branch 'maint' 2017-10-24 09:53:47 +02:00
Nicolas Goaziou 3aa4d44ba8 Fix comma escaping with multiple leading commas
* lisp/org-src.el (org-escape-code-in-region):
(org-escape-code-in-string):
(org-unescape-code-in-region):
(org-unescape-code-in-string): Fix comma escaping with multiple
leading commas.

* testing/lisp/test-org-src.el (test-org-src/escape-code-in-string):
(test-org-src/unescape-code-in-string): New tests.

Reported-by: Michal Politowski <mpol@meep.pl>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00359.html>
2017-10-24 09:51:43 +02:00
Nicolas Goaziou bed03c4b42 Merge branch 'maint' 2017-10-22 12:42:35 +02:00
thibault 1613153aac Fix tangling of org block with nested source block
* lisp/ob-tangle.el (org-babel-tangle-single-block): Prevent double unescaping
of source block by removing unnecessary call to `org-unescape-code-in-string'.

* testing/lisp/test-ob-tangle.el (ob-tangle/nested-block) New function.
2017-10-22 12:42:05 +02:00
Nicolas Goaziou cd9cccb4b2 Merge branch 'maint' 2017-10-18 22:49:10 +02:00
Allen Li 8c5c030c64 Fix `org-insert-todo-heading'
* lisp/org.el (org-insert-todo-heading): Insert TODO keyword relative
  to the original headline, not to the headline above.

* testing/lisp/test-org.el (test-org/insert-todo-heading-respect-content):
  Add test.
2017-10-18 22:48:16 +02:00
Nicolas Goaziou b401d3a44b Implement `org-export-excluded-from-toc-p'
* lisp/ox.el (org-export-excluded-from-toc-p): New function.

* testing/lisp/test-ox.el (test-org-export/excluded-from-toc-p): New
  test.
2017-10-15 16:51:13 +02:00
Nicolas Goaziou 9b13e44ad7 ox: Implement "notoc" UNNUMBERED value
* lisp/ox.el (org-export-collect-headlines): Exclude headlines with
  UNNUMBERED property set to "notoc".

* doc/org.texi (Export settings):
(Table of contents): Document new value.

* testing/lisp/test-ox.el (test-org-export/collect-headlines): Add
  test.
2017-10-15 16:51:10 +02:00
Nicolas Goaziou 7df5d21f79 Merge branch 'maint' 2017-10-14 12:30:59 +02:00
Nicolas Goaziou 827af59873 Fix links without contents in table of contents' entries
* lisp/ox.el (org-export-toc-entry-backend): New function.

* lisp/ox-html.el (org-html--format-toc-headline):
* lisp/ox-md.el (org-md--build-toc):
* lisp/ox-odt.el (org-odt-toc): Use new function.

* lisp/ox-texinfo.el (org-texinfo--sanitize-title):
(org-texinfo--wrap-float): Handle links without contents.

* testing/lisp/test-ox.el (test-org-export/toc-entry-backend): New
  test.

Reported-by: ConcreteVitamin <concretevitamin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00235.html>
2017-10-14 12:29:52 +02:00
Nicolas Goaziou 2a55d206e3 Merge branch 'maint' 2017-10-08 10:54:00 +02:00
Georgiy Tugai 07f939f419 org-clock: Fix clock report sometimes ignoring hours before :wstart
* lisp/org-clock (org-clocktable-steps): Fix weekly-step clock report
  ignoring hours between start of period and start of week, when start
  of period is on a day of week numerically less than start of week.

  Clock report now always inserts a "week" starting at the start of
  the period, if necessary; all following weeks start on the start of
  the week as expected.

TINYCHANGE
2017-10-08 10:53:39 +02:00
Nicolas Goaziou fa56da61a7 Merge branch 'maint' 2017-10-08 10:36:48 +02:00
Nicolas Goaziou d747e51fbf Consider headlines as sentences by themselves
* lisp/org.el (org-forward-sentence): Consider headlines as sentences
  by themselves.

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

Reported-by: Mat Vibrys <vibrysec@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00130.html>
2017-10-08 10:35:22 +02:00
Nicolas Goaziou 44e3745c78 Merge branch 'maint' 2017-10-06 19:35:25 +02:00
Nicolas Goaziou fb403ca34e Fix `org-backward-paragraph' on an empty heading
* lisp/org.el (org-backward-paragraph): Fix behavior on greater
  elements without contents.

* testing/lisp/test-org.el (test-org/backward-paragraph): Add test.

Reported-by: Omar Antolin <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00099.html>
2017-10-06 19:34:28 +02:00
Nicolas Goaziou 1b12ad5cf6 Merge branch 'maint' 2017-10-04 12:58:41 +02:00
Nicolas Goaziou ef6dac812b Fix `org-backward-paragraph' on block opening line
* lisp/org.el (org-backward-paragraph): Do not error when called from
  a block opening line.
* testing/lisp/test-org.el (test-org/backward-paragraph): Add tests.

Reported-by: Omar Antolin <omar.antolin@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00051.html>
2017-10-04 12:57:14 +02:00
Nicolas Goaziou 73df53f185 Merge branch 'maint' 2017-10-01 22:58:24 +02:00
Nicolas Goaziou fcdcfe682f Fix typo in comment
* testing/lisp/test-org.el (test-org/buffer-property-keys): Remove
  spurious word.
2017-10-01 22:56:57 +02:00
Nicolas Goaziou 428368af2f Merge branch 'maint' 2017-10-01 19:02:47 +02:00
Nicolas Goaziou 018fb0149d Fix parsing properties with title or summary type
* testing/lisp/test-org.el (test-org/buffer-property-keys): Ignore
  title and summary type when extracting name.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00001.html>
2017-10-01 19:01:58 +02:00
Nicolas Goaziou 3056abe781 Merge branch 'maint' 2017-09-24 10:58:43 +02:00
Nicolas Goaziou d40deb6967 ox-publish: Fix :base-extension any with :recursive t
* lisp/ox-publish.el (org-publish-get-base-files): Ensure MATCH regexp
  is always a string since `directory-files-recursively' requires it.
* testing/lisp/test-ox-publish.el (test-org-publish/get-project-from-filename):
  Add test.

Suggested-by: Jens Lechtenboerger <lechten@wi.uni-muenster.de>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00528.html>
2017-09-24 10:57:11 +02:00
Nicolas Goaziou ad0662bbe7 Revert "Table of contents ignore unnumbered headlines"
This reverts commit bd2378161e.
2017-09-21 21:14:41 +02:00
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