Commit Graph

19221 Commits

Author SHA1 Message Date
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
Nicolas Goaziou b09d161873 org.texi: Fix some @xref usage
* doc/org.texi (Literal examples): @xref is expected to be followed by
  punctuation.
2016-12-12 21:24:45 +01:00
Nicolas Goaziou 091f10313a Merge branch 'maint' 2016-12-12 21:02:10 +01:00
Nicolas Goaziou 5c28ea6aad ox-beamer: Fix Beamer internal links
* lisp/ox-beamer.el (org-beamer-link): Generate a label compatible
  with "latex" back-end.  Reduce code duplication with "ox-latex.el".

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/110771>
2016-12-12 21:01:02 +01:00
Nicolas Goaziou 93b43e4bb4 Merge branch 'maint' 2016-12-11 01:37:45 +01:00
Nicolas Goaziou d777418ac6 org-colview: Fix `org-agenda-overriding-columns-format'
* lisp/org-colview.el (org-columns--collect-values): Change signature.
(org-agenda-columns): Apply signature change.

When calling `org-agenda-columns' compiled columns format is set
locally to Agenda buffer, but `org-columns--collect-values' is called
from source buffers.  Therefore, it uses default format instead of the
compiled one.

Reported-by: Christian Prothmann <ckprothmann@yahoo.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110748>
2016-12-11 01:34:55 +01:00
thibault 6c8c51c8a1 * etc/ORG-NEWS: Header arguments support for PlantUML source blocks 2016-12-10 17:04:52 +01:00
thibault cb33cd066d ob-plantuml: Add support for prologue and header variables
* lisp/ob-plantuml.el (org-babel-execute:plantuml) Include prologue and
  header variables to temporary file body.
(org-babel-plantuml-make-body): New function.
(org-babel-variable-assignments:plantuml): New function.

* testing/lisp/test-ob-plantuml.el: New file.
2016-12-10 12:06:04 +01:00
Nicolas Goaziou d2c834b215 ob-tangle: Remove useless declarations 2016-12-10 09:54:55 +01:00
Nicolas Goaziou 24219e93fb Merge branch 'maint' 2016-12-10 01:02:06 +01:00
Nicolas Goaziou 00ea6a286c ob-tangle: Fix last commit
* lisp/ob-tangle.el (org-babel-tangle-single-block):
  `org-babel-expand-noweb-references' specifically needs to be run in
  the Org document so as to resolve references.
* testing/lisp/test-ob-tangle.el (ob-tangle/continued-code-blocks-w-noweb-ref):
  Make sure a failing test doesn't leave a file behind it.
2016-12-10 00:59:08 +01:00