Commit Graph

507 Commits

Author SHA1 Message Date
Nicolas Goaziou 892ae3c2e1 Merge branch 'maint' 2018-02-04 00:13:36 +01:00
Nicolas Goaziou 19dcbab6f0 ox: Fix select tags and exclude tags and tags hierarchy
* lisp/ox.el (org-export--selected-trees): Expand select tags groups.
(org-export--prune-tree): Expand exclude tags groups.
(org-export--skip-p): Change signature.

* testing/lisp/test-ox.el (test-org-export/handle-options): Add tests.

Reported-by: Pierre-Luc Gauthier <p.luc.gauthier@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-02/msg00039.html>
2018-02-04 00:12:45 +01:00
Nicolas Goaziou 2a91f967ca Merge branch 'maint' 2018-01-31 21:20:54 +01:00
Nicolas Goaziou ddc8e8eb23 ox: Fix typo in docstring
* lisp/ox.el (org-export-with-toc): Fix typo in docstring.  Slightly
  rephrase it.
2018-01-31 21:20:21 +01:00
Nicolas Goaziou 0155441358 Merge branch 'maint' 2018-01-19 18:22:00 +01:00
Tim Landscheidt b289a65be7 Use https for links to orgmode.org
TINYCHANGE
2018-01-19 18:14:58 +01:00
Nicolas Goaziou c82c21c7ac Merge branch 'maint' 2018-01-08 20:40:16 +01:00
Nicolas Goaziou ed2bcab0ea ox: Fix typo in docstring
* lisp/ox.el (org-export-search-cells): Fix typo.
2018-01-08 20:39:31 +01:00
Kyle Meyer d94f7024bc Merge branch 'maint' 2018-01-07 00:28:35 -05:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05: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 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 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
Nicolas Goaziou 5f5d82ed51 Remove second pass for macro expansion
* lisp/org-macro.el (org-macro-initialize-templates): Initialize all
  macros, including {{{title}}} and al.
(org-macro-replace-all): Change signature.
(org-macro--find-keyword-value): New function.
* lisp/ox.el (org-export-as): Remove second macro expansion
2017-11-21 22:27:42 +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 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
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
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 ad0662bbe7 Revert "Table of contents ignore unnumbered headlines"
This reverts commit bd2378161e.
2017-09-21 21:14:41 +02:00
Kyle Meyer 297acd7517 Merge branch 'maint' 2017-09-17 01:17:10 -04:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04: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
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
Kyle Meyer 6496d0ca95 Correct defcustom version information
* lisp/ob-lilypond.el (org-babel-lilypond-commands):
* lisp/ob-lua.el (org-babel-lua-command):
(org-babel-lua-mode):
(org-babel-lua-hline-to):
(org-babel-lua-None-to):
* lisp/org-agenda.el (org-agenda-search-view-max-outline-level):
* lisp/org.el (org-mouse-1-follows-link):
(org-src-fontify-natively):
(orgstruct-heading-prefix-regexp):
* lisp/ox-ascii.el (org-ascii-format-inlinetask-function):
* lisp/ox-latex.el (org-latex-format-drawer-function):
(org-latex-listings-langs):
* lisp/ox-odt.el (org-odt-format-drawer-function):
* lisp/ox.el (org-export-with-properties): Correct ":version" value.

* lisp/org-attach.el (org-attach-annex-auto-get): Correct
":package-version" value.
2017-09-07 16:56:11 -04:00
Nicolas Goaziou ea4e3dac6d Use `split-string' instead of `org-split-string'
* contrib/lisp/org-depend.el (org-depend-trigger-todo):
(org-depend-block-todo):
* contrib/lisp/ox-bibtex.el (org-bibtex-get-arguments):
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-unique-id):
(org-taskjuggler-resolve-dependencies):
* lisp/ob-core.el (org-babel-insert-result):
* lisp/org-agenda.el (org-search-view):
* lisp/org-lint.el (org-lint-duplicate-target):
(org-lint-wrong-header-value):
* lisp/org.el (org--setup-collect-keywords):
(org-make-org-heading-search-string):
(org-search-radio-target):
(org-local-logging):
(org-entry-add-to-multivalued-property):
(org-entry-remove-from-multivalued-property):
(org-entry-member-in-multivalued-property):
(org-entry-get-multivalued-property):
(org-entry-put-multivalued-property):
(org-wrap):
* lisp/ox-beamer.el (org-beamer-allowed-property-values):
* lisp/ox.el (org-export--get-subtree-options):
(org-export--get-inbuffer-options): Use `split-string' instead of
`org-split-string'.
2017-09-07 14:36:50 +02:00
Nicolas Goaziou 750071accd Tiny refactoring
* lisp/ox.el (org-export-with-drawers): Tiny refactoring.
2017-08-26 11:27:51 +02:00
Nicolas Goaziou 5f410132b5 Merge branch 'maint' 2017-08-13 15:13:47 +02:00
Nicolas Goaziou 5bf7730674 Fix exporting LaTeX fragments within inline footnotes
* lisp/ox.el (org-export--prune-tree): Do not change parent by side
  effect. It affects footnote references already in the tree.

Reported-by: Paul Stansell <paulstansell@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00302.html>
2017-08-13 15:11:48 +02:00
Kaushal Modi 1e92f5ed39 Allow org-file-contents to fetch file contents from a URL
* lisp/org.el (org--file-cache): New variable.
(org-reset-file-cache):
(org-file-url-p): New function.
(org-mode-restart): Use new function.

* lisp/org.el (org-file-contents): Allow the FILE argument to be a
URL.  If the URL contents are already cached, return the cache
contents, else download the file and return contents of that.  The
file is automatically cached each time it is downloaded.  Add a new
optional argument NOCACHE.  If this is non-nil, the URL is always
downloaded afresh.  Use `org--file-cache' and `org-file-url-p'.

* lisp/org.el (org-edit-special): Do not allow editing the "file" if a
URL is specified for the "#+SETUPFILE".

* lisp/ox.el (org-export--list-bound-variables)
(org-export--prepare-file-contents):
* lisp/org-macro.el (org-macro--collect-macros) : Adapt to the
possibility that the input to `org-file-contents' can be a URL too.

* doc/org.texi (Export settings, In-buffer settings)
(The very busy C-c C-c key): Mention that #+SETUPFILE keyword can now
take a URL as a value, and that C-c C-c on the #+SETUPFILE line will
clear the org file cache.

* testing/lisp/test-org.el (test-org/org-file-contents-url)
(test-org/org-file-contents-file): Add tests for org-file-contents.

* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
test for reading setupfile specified via a URL.
2017-06-13 11:41:58 -04:00
Nicolas Goaziou 52e0a83f32 Merge branch 'maint' 2017-06-08 21:00:51 +02:00
Nicolas Goaziou 6921d84198 ox: Fix search cell error on footnote sections
* lisp/ox.el (org-export--install-footnote-definitions):
  Provide :raw-value property when building a virtual footnote
  section, as `org-export-search-cells' expects it.
2017-06-08 20:59:29 +02:00
Nicolas Goaziou 6834142d87 Merge branch 'maint' 2017-04-29 14:34:09 +02:00
Nicolas Goaziou 1332bbd616 ox: Do not trim leading and trailing blank lines from code
* lisp/ox.el (org-export-get-loc):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default): Do not trim leading and trailing
blank lines from code during export.

* testing/lisp/test-ox.el (test-org-export/unravel-code): Update tests.
(test-org-export/format-code-default): Add tests.

Reported-by: Li DebugFan <debugfanli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113205>
2017-04-29 14:32:29 +02:00
Nicolas Goaziou 5e1f7ff04b ox: Ignore INCLUDE keywords in commented headlines
* lisp/ox.el (org-export-expand-include-keyword): Ignore INCLUDE
  keywords in commented headlines.
* testing/lisp/test-ox.el (test-org-export/expand-include): Add test.
2017-04-23 19:48:50 +02:00
Nicolas Goaziou 0f51e643c4 Merge branch 'maint' 2017-03-23 16:46:52 +01:00
Nicolas Goaziou b791cd59a5 ox: Fix "Fix :filter-options"
* lisp/ox.el (org-export-as): Remove uninterpreted data from back-end
  specific parsed keywords.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.

This fixes 6cd42b08f9.
2017-03-23 16:46:28 +01:00
Nicolas Goaziou aadde88799 ox: Clarify a docstring
* lisp/ox.el (org-export-get-all-options): Specify return value for
  unknown back-ends.
(org-export--parse-option-keyword):
(org-export--get-subtree-options):
(org-export--get-inbuffer-options):
(org-export--get-global-options): Remove useless check.
2017-03-23 16:38:59 +01:00
Nicolas Goaziou 10dc237eee Merge branch 'maint' 2017-03-14 18:14:32 +01:00
Nicolas Goaziou 6cd42b08f9 ox: Fix :filter-options
* lisp/ox.el (org-export--remove-uninterpreted-data): Do not modify
  communication channel.  Change "blob" to "datum".
(org-export--remove-uninterpreted-data-1): Remove function.
(org-export-as): Remove uninterpreted data from parsed keyword before
applying filters.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/112730>
2017-03-14 18:10:07 +01:00
Nicolas Goaziou 473ca5c86c Merge branch 'maint' 2017-02-17 08:37:55 +01:00
Fabrice Popineau b5a67ebddd Fix file:// uri handling for windows-nt and cygwin
* lisp/org-element.el (org-element-link-parser):
  Handle drive names in uri like file:///c:/dir/file

* lisp/ox.el (org-export-file-uri):
  Handle drive names in uri like file:///c:/dir/file

* testing/lisp/test-ox.el (test-org-export/file-uri):
  Generate the right uri to be tested against link exporter.
2017-02-17 08:36:00 +01:00
Martin Vuk e01000a94c ox.el: Slovenian translations for exporting
* lisp/ox.el (org-export-dictionary): Slovenian translations.

* lisp/ox.el (org-export-smart-quotes-alist): Slovenian quotes and
apostrophes for exporting documents.

TINYCHANGE
2017-02-03 22:17:31 +01:00