Commit Graph

19231 Commits

Author SHA1 Message Date
Nicolas Goaziou 91dc1b34e3 ox: Add EXPORT_FILE_NAME keyword
* lisp/ox.el (org-export-output-file-name): Support EXPORT_FILE_NAME
  keyword.
* doc/org.texi (Export settings): Document new keyword.
* testing/lisp/test-ox.el (test-org-export/output-file-name): Add
  tests.
2016-12-20 17:10:46 +01:00
Nicolas Goaziou 2ac798af6c org.texi: Fix typo
* doc/org.texi (Sitemap): Fix typo.
2016-12-19 23:02:26 +01:00
Nicolas Goaziou bd828e2d1c ox: Add `org-export-global-macros'
* lisp/ox.el (org-export-global-macros): New variable.
(org-export-as): Use new variable.
* doc/org.texi (Macro replacement): Document new variable.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add tests.
2016-12-19 23:00:38 +01:00
Nicolas Goaziou aae5149d10 Add tests for `org-export-insert-image-links'
* testing/lisp/test-ox.el (test-org-export/insert-image-links): New
  test.
2016-12-19 18:02:38 +01:00
Nicolas Goaziou 83827952db ox-publish: Provide relative file in sitemap generation
* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.

(org-publish-property):
(org-publish--expand-file-name): New functions

(org-publish-get-base-files):
(org-publish-file):
(org-publish-projects):
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-find-property):
(org-publish-find-title):
(org-publish-find-date):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): Use new functions.

* testing/lisp/test-ox-publish.el (test-org-publish/sitemap): Update
  test.
2016-12-19 17:36:19 +01:00
Nicolas Goaziou 6663452588 ox-publish: Remove :sitemap-sans-extension
* lisp/ox-publish.el (org-publish-sitemap): Remove property.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Remove documentation.

Caches uses absolute file names as keys.  We cannot provide file names
without extension to `:sitemap-format-entry' as they are no longer
existing key, and cannot be used for `org-publish-find-property' or
`org-publish-find-title'.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou baf2e0e5ee ox-publish: Add tests
* testing/examples/pub/a.org:
* testing/examples/pub/b.org:
* testing/examples/pub/sub/c.org:
* testing/lisp/test-ox-publish.el: New files.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou fcca882876 ox-publish: Remove unused variable
* lisp/ox-publish.el (org-publish-sitemap-date-format): Remove variable.
(org-publish-projects): Apply removal.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou d5dbf761eb ox-publish: Include directories in site-map
* lisp/ox-publish.el (org-publish-temp-files): Remove variable.
(org-publish-get-base-files-1):
(org-publish-compare-directory-files): Remove functions.
(org-publish-get-base-files): Remove optional argument.  Rewrite
function.
(org-publish-projects):
(org-publish-sitemap):
(org-publish-index-generate-theindex): Apply signature change.
(org-publish-sitemap-sort-folders): Allow to include or ignore
directories in the site-map.

* doc/org.texi (Sitemap):
* lisp/ox-publish.el (org-publish-project-alist): Document change.
2016-12-19 12:19:59 +01:00
Nicolas Goaziou ca0ad0a84b ox-publish: Implement `org-publish-find-property'
* lisp/ox-publish.el (org-publish-find-property): New function.
(org-publish-find-title): Use new function.  Remove unused optional
argument.
(org-publish-find-date): Use new function.

(org-publish-project-alist):
* doc/org.texi (Sitemap): Update documentation.

Suggested-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/107219>
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 2d3e3f562a ox-publish: Improve control over site map
* lisp/ox-publish.el (org-publish-project-alist): Document
  new :sitemap-format-entry property, and change to `:sitemap-function'.
(org-publish-sitemap-file-entry-format): Make variable obsolete.
(org-publish-org-sitemap): Remove function.
(org-publish--sitemap-files-to-lisp):
(org-publish-sitemap):
(org-publish-sitemap-default-entry):
(org-publish-sitemap-default): New functions.
(org-publish-projects): Use new functions.
* lisp/org-compat: Implement directory-name-p when not available.

* doc/org.texi (Sitemap): Update documentation.

:sitemap-function is more specialized so it is easier to manipulate.  In
particular, it can make use of built-in `org-list-to-*' functions.
Also, :sitemap-format-entry, as a function, is less limited than
`org-publish-sitemap-file-entry-format' format string.
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 45d57bb4db org-list: Implement `org-list-to-org'
* lisp/org-list.el (org-list-to-org): New function.
* testing/lisp/test-org-list.el (test-org-list/to-org): New test.
2016-12-19 12:19:58 +01:00
Nicolas Goaziou 835b8e05e5 org-list: Tweak `org-list-to-generic'
* lisp/org-list.el (org-list-to-generic): :istart, :icount, :iend
  and :isep are now called with an additional argument, the type of the
  list.  Also add a new property :ifmt.
(org-list--to-generic-item): Use new property.
(org-list-to-subtree): Adapt to new requirements for :istart and :iend.

* testing/lisp/test-org-list.el (test-org-list/to-generic): Update
  tests.
2016-12-19 12:14:48 +01:00
Nicolas Goaziou 9ea8e46df0 Merge branch 'maint' 2016-12-19 12:07:07 +01:00
Nicolas Goaziou 1d7f1349c9 org-list: Clarify code
* lisp/org-list.el (org-list-item-body-column): Clarify code.
2016-12-19 12:06:30 +01:00
Nicolas Goaziou 3469830e3d ox-odt: Fix typo
* lisp/ox-odt.el (org-odt--translate-image-links): Fix typo.
2016-12-17 11:38:53 +01:00
Nicolas Goaziou 5ffb373a2c Implement `org-export-insert-image-links'
* lisp/ox.el (org-export-insert-image-links):
* lisp/ox-odt.el (org-odt--translate-image-links):
* lisp/ox-latex.el (org-latex-image-link-filter):
* lisp/ox-html.el (org-html-image-link-filter): New functions.
2016-12-17 11:36:49 +01:00
Nicolas Goaziou 753b90e321 org-element: Do not support nested links anymore
* lisp/org-element.el (org-element-object-restrictions):
(org-element--object-lex): Do not support nested links.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
* testing/lisp/test-org-lint.el (test-org-lint/link-to-local-file):
  Remove tests.
2016-12-17 11:35:50 +01:00
Nicolas Goaziou 81f4e9f651 Merge branch 'maint' 2016-12-16 22:42:53 +01:00
Nicolas Goaziou 51efd7f1db org-list: Fix "Stack overflow in regexp matcher"
* lisp/org-list.el (org-list-item-body-column): Do not backtrack as
  much in regexp.

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110885>
2016-12-16 22:41:08 +01:00
Nicolas Goaziou 0863f8d1ca Merge branch 'maint' 2016-12-15 22:18:43 +01:00
Nicolas Goaziou a1f516f8a5 org-agenda: Fix "Wrong type argument: number-or-marker-p"
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Make sure deadline and schedule are
a number and not a string.

Reported-by: Jeffrey DeLeo <JeffreyDeLeo@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110837>
2016-12-15 22:16:19 +01:00
Nicolas Goaziou a5e91f5e51 Merge branch 'maint' 2016-12-15 16:14:20 +01:00
Nicolas Goaziou 3e60cb900d ox-ascii: Fix internal and ID links
* lisp/ox-ascii.el (org-ascii--describe-datum): New function.
(org-ascii--describe-links): Use new function.  Do not ignore fuzzy
links anymore when they contain a description.
(org-ascii-link): Use new function.  Better handling of internal
links.
* lisp/ox.el (org-export-dictionary): New entries: "See figure %s",
  "See listing %s", "See table %s".

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110788>
2016-12-15 16:12:58 +01:00
Nicolas Goaziou 901d2470dd Merge branch 'maint' 2016-12-15 14:24:46 +01:00
Nicolas Goaziou 51227cff94 Fix C-c C-c on inline tasks
* lisp/org.el (org-ctrl-c-ctrl-c): Properly recognize inlinetasks as
  a valid context.
2016-12-15 14:24:01 +01:00
Nicolas Goaziou f5b7de222d Fix level of newly inserted headlines
* lisp/org.el (org-insert-heading): Fix level of new headline when
  creating it from a regular text line.

* testing/lisp/test-org.el (test-org/insert-heading): Add tests.

Reported-by: swflint@flintfam.org (Samuel W. Flint)
<http://permalink.gmane.org/gmane.emacs.orgmode/110842>
2016-12-15 00:15:12 +01:00
Nicolas Goaziou 4510075ea4 Merge branch 'maint' 2016-12-15 00:03:47 +01:00
Nicolas Goaziou 7856018d78 org-macs: Tiny refactoring
* lisp/org-macs.el (org-match-line): Use (beginning-of-line) instead
  of (goto-char (point-at-bol)).
2016-12-15 00:02:58 +01:00
Nicolas Goaziou e31598bad8 Merge branch 'maint' 2016-12-14 21:39:02 +01:00
Nicolas Goaziou 22a4896bf8 org-info: Fix docstrings
* lisp/org-info.el (org-info-other-documents):
(org-info-map-html-url): Fix docstrings.

Suggested-by: Chunyang Xu <mail@xuchunyang.me>
2016-12-14 21:37:03 +01:00
Lungang Fang 2b93cec8c2 ox-confluence.el: Export fixed-width as example-block
* contrib/lisp/ox-confluence.el (org-confluence-fixed-width):
export fixed-width as example-block so that the outcome is more
consistent with org-mode format.  Other back-ends (say ox-md.el)
also work this way.

TINYCHANGE
2016-12-14 13:22:44 +01:00
Nicolas Goaziou d29b9ee064 Merge branch 'maint' 2016-12-14 13:16:34 +01:00
Nicolas Goaziou b5cebbc412 ox-beamer: Fix target export
* lisp/ox-beamer.el (beamer): Let "latex" export-back-end handle
  targets.
2016-12-14 13:15:48 +01:00
Nicolas Goaziou 23a9492055 Fix bold emphasis around headlines
* lisp/org.el (org-do-emphasis-faces): Fix bold emphasis around
  headlines.  In particular, stars at the beginning of a headline are
  not bold markup, and bold markup cannot end with stars at the
  beginning of a headline.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110814>
2016-12-14 11:14:29 +01:00
Nicolas Goaziou 4691033abb Merge branch 'maint' 2016-12-13 22:14:02 +01:00
Nicolas Goaziou 1c95729788 ox: Fix internal references when using `org-export-(data-)with-backend'
* lisp/ox.el (org-export-data-with-backend):
(org-export-with-backend): Preserve internal references once the local
back-end has been applied.

* testing/lisp/test-ox.el (test-org-export/get-reference): Add tests.
2016-12-13 22:11:41 +01:00
Nicolas Goaziou 3322f5edfc Merge branch 'maint' 2016-12-13 14:15:33 +01:00
Nicolas Goaziou 64a2f6e22d ox-latex: Fix typo
* lisp/ox-latex.el (org-latex--text-markup): Fix typo.
2016-12-13 14:15:07 +01:00
Lungang Fang 01b2c12fec ox-confluence.el: Support quote blocks
* contrib/lisp/ox-confluence.el (org-confluence-quote-block): New
  function.

Convert quote blocks as shown below:

This is a quote   ==>   This is a quote
2016-12-13 13:59:34 +01:00
Lungang Fang dadad5fa39 ox-confluence.el: Fix error in `org-confluence-fixed-width`
* contrib/lisp/ox-confluence.el (org-confluence-fixed-width): retrieve
  value of org element "fixed-width" instead of using "content", which
  is empty.
2016-12-13 13:55:26 +01:00
Charles Durst 9e5bdb04d7 Add support for ordered list to ox-confluence.el
* contrib/lisp/ox-confluence.el (org-confluence-item): Support
  descriptive list

When converting a descriptive list item, be sure to include the "item"
part, not just the description.

TINYCHANGE
2016-12-13 13:49:34 +01:00
Nicolas Goaziou a76b000da7 Merge branch 'maint' 2016-12-13 13:48:51 +01:00
Nicolas Goaziou 8fec3d5f03 ox-latex: Fix links with special characters
* lisp/ox-latex.el (org-latex--protect-text): Properly escape special
  characters.
(org-latex--text-markup): Adapt to change above.
(org-latex-inline-src-block): Follow `org-latex-text-markup-alist'
specifications.
(org-latex-link): Escape forbidden characters in URL.
2016-12-13 13:46:38 +01:00
Nicolas Goaziou 7274786f6e Merge branch 'maint' 2016-12-13 09:13:37 +01:00
Nicolas Goaziou e491ab31c6 ox-latex: Fix nested sub/super-scripts
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Prevent merging
  multiple sub/super-scripts at the same level.  Nested scripts are
  allowed.
2016-12-13 09:13:22 +01:00
Nicolas Goaziou 591ca3a0f3 Merge branch 'maint' 2016-12-13 09:07:44 +01:00
Nicolas Goaziou f747ee43bd ox-beamer: Fix last commit
* lisp/ox-beamer.el (org-beamer-link): Fix commit
  5c28ea6aad.
2016-12-13 09:06:48 +01:00
Nicolas Goaziou 9fb2e047d2 Split `org-emph-re' and `org-verbatim-re'
* lisp/org.el (org-set-emph-re): Refactor code.  Rip "~" and "="
  markers off `org-emph-re'.
(org-do-emphasis-faces):
(org-sort-remove-invisible): Handle both `org-emph-re' and
`org-verbatim-re'.
(org-in-verbatim-emphasis): Use `org-verbatim-re' instead of
`org-emph-re'.

* lisp/org-element.el (org-element-code-parser):
(org-element-verbatim-parser): Use `org-verbatim-re' instead of
`org-emph-re'.
* testing/lisp/test-org-element.el (test-org-element/bold-parser):

(test-org-element/code-parser):
(test-org-element/italic-parser):
(test-org-element/strike-through-parser):
(test-org-element/underline-parser):
(test-org-element/verbatim-parser): Update tests, which no longer need
to bind `org-emph-re'.
2016-12-12 22:21:17 +01:00
Nicolas Goaziou 05223fc6fa Merge branch 'maint' 2016-12-12 21:25:28 +01:00