Commit Graph

20484 Commits

Author SHA1 Message Date
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 d788d1b00e Merge branch 'maint' 2017-11-20 00:15:05 +01:00
Nicolas Goaziou 3226129036 org.texi: Fix typo
* doc/org.texi (Export settings): Fix typo introduced in last commit.
2017-11-20 00:14:22 +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 de289d1fe8 Merge branch 'maint' 2017-11-15 22:50:56 +01:00
Nicolas Goaziou 946f76d707 org-table: Better fix for `:org-untouchable'
* lisp/org-table.el (org-table-recalculate): Fix typo in existing
  `remove-text-properties' call instead of adding a new one.

Also, cleaning property before processing formulas is more robust,
e.g., if last process raised an error.
2017-11-15 22:47:06 +01:00
Nicolas Goaziou 04e0532ef5 Merge branch 'maint' 2017-11-15 18:59:05 +01:00
Nicolas Goaziou 696ec60341 org-macs: Fix typos in docstrings
* lisp/org-macs.el (org-split-string):
(org-string-width): Fix typo in docstring.
2017-11-15 18:58:44 +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 64ac3bb5b3 ox-ascii: Lighten numbering in table of contents
* lisp/ox-ascii.el (org-ascii--build-title): Use only last number in
  headline numbering when building table of contents.
2017-11-15 17:43:08 +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 a49ac98f3f org-attach: Refactor. Replace self made with available function.
* lisp/org-attach.el (org-attach-dired-marked-files-or-file-at-cursor-in-dired)
  (org-attach-dired-marked-files-in-dired): Removed.  Use
  `dired-get-marked-files' instead.
2017-11-15 12:21:18 +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
Kyle Meyer c029c4d45d Merge branch 'maint' 2017-11-13 22:09:46 -05:00
Charles A. Roelli 18af0f88d7 Backport commit 98288ecaf from Emacs
* lisp/org-clock.el (org-clock--oldest-date): Fix an issue when
compiling on macOS 10.6 with a western time zone (a continuation of
Bug#27736).

Further workaround for faulty localtime() under macOS 10.6
98288ecaffbc0947ec3193088172ea85ad5e42a5
Charles A. Roelli
Wed Nov 8 20:51:48 2017 +0100
2017-11-13 22:07:59 -05:00
Nicolas Goaziou 9cac9d7bc7 Merge branch 'maint' 2017-11-12 23:29:38 +01:00
Chunyang Xu 3f8d67c490 ox-html: Allow disabling htmlize
* lisp/ox-html.el (org-html-fontify-code): Do it.

Disable htmlize by setting org-html-htmlize-output-type to nil.

TINYCHANGE
2017-11-12 23:28:57 +01:00
Nicolas Goaziou 4c703513a7 Merge branch 'maint' 2017-11-12 22:38:26 +01:00
Martin Šlouf fcf4bb61ec Add CS export translations
* lisp/ox.el (org-export-dictionary): Add translations for CS.

TINYCHANGE
2017-11-12 22:37:04 +01:00
Marco Wahl 44189a72d5 Merge branch 'maint' 2017-11-10 19:40:15 +01:00
Marco Wahl 12e41c445b org-attach: Fix handling of ATTACH tag at sychronize
* lisp/org-attach.el (org-attach-sync): Remove ATTACH tag at
  synchronize when no files left.
2017-11-10 19:35:35 +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
Marc Ihm 8f3077d14a v5.7.2 of org-index 2017-11-07 20:49:58 +01:00
Nicolas Goaziou 28ebfa6d77 Merge branch 'maint' 2017-11-06 23:10:13 +01:00
Nicolas Goaziou 0880fc580e ox-ascii: Small fix to items that do not start with a paragraph
* lisp/ox-ascii.el (org-ascii-item): Use better heuristics to
  determine if contents should follow bullet or start a new line.

Contents follow bullet when the first contributing line is
a paragraph.  As a consequence, the following snippet

    -
      #+html: ...
      This is a paragraph.

is exported as

    - This is a paragraph.

instead of

    -
      This is a paragraph.

previously.
2017-11-06 23:07:17 +01:00
Nicolas Goaziou 05034ec6ed ORG-NEWS: Document user-visible changes with new template system 2017-11-06 14:47:55 +01:00
Nicolas Goaziou 76a9e1d01d Merge branch 'maint' 2017-11-06 14:32:11 +01:00
Nicolas Goaziou 7000ed9ee0 ox-ascii: Fix descriptive lists
* lisp/ox-ascii.el (org-ascii-quote-margin): Update docstring.
(org-ascii--current-text-width): Properly handle width of text within
nested plain-list items.
(org-ascii-item): Always start a new line for description contents.
Indent them by `org-ascii-quote-margin' characters.
2017-11-06 14:27:45 +01:00
Nicolas Goaziou 8d43a0c49f ox-texinfo: Gracefully handle node collision in the same hierarchy
* lisp/ox-texinfo.el (org-texinfo--get-node): Ensure the upper element
  get the shorter node.

Considering the following document:

* Headline
** Headline

the level 1 headlines get "Headline" node and the other one
"Headline (1)".
2017-11-05 12:22:18 +01:00
Nicolas Goaziou 04f35fc473 ox-texinfo: Preserve target name as node.
* lisp/ox-texinfo.el (org-texinfo--get-node): Use target's value as
  base for the node name, instead of using `org-export-get-reference'.
2017-11-05 10:32:13 +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 fd50740c96 Merge branch 'maint' 2017-11-04 22:41:07 +01:00
Nicolas Goaziou 271e58f2dd Fix characters conversion issue when loading `org-id-locations-file'
* lisp/org-id.el (org-id-locations-load): Use `insert-file-contents'
  instead of `insert-file-contents-literally'.

Reported-by: Anders Johansson <mejlaandersj@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00037.html>
2017-11-04 22:40:02 +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 db16370c0b ox-texinfo: Fix @ref without description
* lisp/ox-texinfo.el (org-texinfo--@ref): Prefer @ref{} with a single
  argument when no description is provided.
2017-11-04 21:50:00 +01:00
Nicolas Goaziou 9bee79a102 Merge branch 'maint' 2017-11-03 23:11:07 +01:00
Nicolas Goaziou 08c9de2a74 Fix typo in docstring
* lisp/org.el (org-speed-commands-user): Fix typo in docstring.
2017-11-03 23:10:38 +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 902bfe1892 Merge branch 'maint' 2017-11-03 12:22:33 +01:00
Nicolas Goaziou b5f075aa05 ox-texinfo: Fix spurious blank lines in detailed menu.
* lisp/ox-texinfo.el (org-texinfo--build-menu): Prevent spurious blank
  lines in detailed menu.
2017-11-03 12:21:56 +01:00
Nicolas Goaziou c470edba77 ox-texinfo: Prettify adjunct for indentical nodes.
* lisp/ox-texinfo.el (org-texinfo--get-node): Nicer adjunct for
  identical nodes.
2017-11-03 11:35:53 +01:00
Nicolas Goaziou f9c09b194f ox-texinfo: Allow cross-references to headlines excluded from TOC
* lisp/ox-texinfo.el (org-texinfo-headline): Use @anchor instead of
  @node for headlines outside TOC.
2017-11-03 11:34:21 +01:00